Example Code for ESPHome-Integration with HomeAssistant

The LoRaWAN ESP32-S3 Development Board can be integrated with the HomeAssistant gateway, enabling the gateway to receive sensor data over long distances.

Usage Method

  1. Go to Settings -> Add-ons -> Add-on Store -> Search for "ESPHome" -> Select "ESPHome Device Builder (beta)" -> Click Install.
    Usage Method
    Usage Method
  2. Click ESPHome Builder in the sidebar -> Click NEW DEVICE -> Click CONTINUE in the pop-up window -> Enter a name and click NEXT -> Select ESP32-S3 -> Click SKIP in the pop-up window.
    Usage Method
  3. Click EDIT to enter the code editing page -> Add the following code below the "captive_portal" section.
    Usage Method
    Usage Method
  4. Burn the code to the development board.

Sample Code

# Example configuration entry
spi:
  clk_pin: GPIO7
  mosi_pin: GPIO6
  miso_pin: GPIO5

sx126x:
  dio1_pin: GPIO4
  cs_pin: GPIO10
  busy_pin: GPIO40
  rst_pin: GPIO41
  pa_power: 3
  bandwidth: 125_0kHz
  crc_enable: true
  frequency: 433920000
  modulation: LORA
  hw_version: sx1262
  rf_switch: true
  sync_value: [0x14, 0x24]
  preamble_size: 8
  spreading_factor: 7
  coding_rate: CR_4_6
  tcxo_voltage: 1_8V
  tcxo_delay: 5ms

For more configuration parameters, please refer to: https://beta.esphome.io/components/sx126x

Was this article helpful?

TOP