Hi,
I try to setup wmbus integration using component available here: GitHub - SzczepanLeon/esphome-components
Here is my esphome config (without sensors for now, I just want to see telegrams in logs):
esphome config
esphome:
name: esp-32-wmbus
friendly_name: esp-32-wmbus
min_version: 2024.6.0
esp32:
board: esp32doit-devkit-v1
framework:
type: arduino
logger:
level: VERBOSE
api:
encryption:
key: !secret encryption_key
ota:
- platform: esphome
password: !secret ota_password
wifi:
output_power: 8.5
domain: .lan
networks:
- priority: 0
ssid: !secret iot_wifi_ssid
password: !secret iot_wifi_password
- priority: 1
ssid: !secret wifi_ssid
password: !secret wifi_password
- priority: 2
ssid: !secret second_wifi_ssid
password: !secret second_wifi_password
external_components:
- source: github://SzczepanLeon/[email protected]
components: [ wmbus ]
wmbus:
frequency: 868.950
mosi_pin: GPIO13 # blue
clk_pin: GPIO14 # purple
miso_pin: GPIO12 # green
gdo2_pin: GPIO4 # gray
gdo0_pin: GPIO5 # yellow
cs_pin: GPIO15 # orange
time:
- platform: sntp
id: time_sntp
After starting Home Assistant API server, my ESP is being restarted:
restart
[13:56:53][C][api:025]: Setting up Home Assistant API server...
[13:56:58]E (45682) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
[13:56:58]E (45682) task_wdt: - loopTask (CPU 1)
[13:56:58]E (45682) task_wdt: Tasks currently running:
[13:56:58]E (45682) task_wdt: CPU 0: IDLE
[13:56:58]E (45682) task_wdt: CPU 1: loopTask
[13:56:58]E (45682) task_wdt: Aborting.
[13:56:58]
[13:56:58]abort() was called at PC 0x400f9878 on core 0
[13:56:58]
[13:56:58]
[13:56:58]Backtrace:0x400838b1:0x3ffbeb1c |<-CORRUPTED
[13:56:58]
[13:56:58]
[13:56:58]
[13:56:58]
[13:56:58]ELF file SHA256: 0000000000000000
[13:56:58]
[13:56:58]Rebooting...
[13:56:58]ets Jul 29 2019 12:21:46
[13:56:58]
[13:56:58]rst:0xc (SW_CPU_RESET),boot:0x16 (SPI_FAST_FLASH_BOOT)
[13:56:58]configsip: 0, SPIWP:0xee
[13:56:58]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[13:56:58]mode:DIO, clock div:2
[13:56:58]load:0x3fff0030,len:1184
[13:56:58]load:0x40078000,len:13132
[13:56:58]load:0x40080400,len:3036
[13:56:58]entry 0x400805e4
[13:57:00][ 6][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
Almost full device logs:
logs
[13:56:20][I][logger:156]: Log initialized
[13:56:20][V][esp32.preferences:059]: nvs_get_blob('233825507'): ESP_ERR_NVS_NOT_FOUND - the key might not be set yet
[13:56:20][C][safe_mode:079]: There have been 0 suspected unsuccessful boot attempts
[13:56:20][D][esp32.preferences:114]: Saving 1 preferences to flash...
[13:56:20][V][esp32.preferences:163]: nvs_get_blob('233825507'): ESP_ERR_NVS_NOT_FOUND - the key might not be set yet
[13:56:20][V][esp32.preferences:126]: sync: key: 233825507, len: 4
[13:56:20][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[13:56:20][I][app:029]: Running through setup()...
[13:56:20][V][app:030]: Sorting components by setup priority...
[13:56:20][C][wifi:048]: Setting up WiFi...
[13:56:20][C][wifi:061]: Starting WiFi...
[13:56:20][C][wifi:062]: Local MAC: 14:2B:2F:C5:70:B8
[13:56:20][V][esp32.preferences:059]: nvs_get_blob('394994235'): ESP_ERR_NVS_NOT_FOUND - the key might not be set yet
[13:56:20][V][wifi_esp32:067]: Enabling STA.
[13:56:20][ 120][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 0 - WIFI_READY
[13:56:20][V][wifi_esp32:486][arduino_events]: Event: WiFi ready
[13:56:20][ 291][V][WiFiGeneric.cpp:338] _arduino_event_cb(): STA Started
[13:56:20][ 292][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 2 - STA_START
[13:56:20][V][wifi_esp32:497][arduino_events]: Event: WiFi STA start
[13:56:23][ 6214][V][WiFiGeneric.cpp:381] _arduino_event_cb(): SCAN Done: ID: 128, Status: 0, Results: 13
[13:56:23][ 6215][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 1 - SCAN_DONE
[13:56:24][V][wifi_esp32:491][arduino_events]: Event: WiFi Scan Done status=0 number=13 scan_id=128
[13:56:24][D][wifi:497]: Found networks:
[13:56:24][I][wifi:541]: - 'NASAGuest' (06:EB:D8:AE:91:EE) [redacted]▂▄▆█
[13:56:24][D][wifi:542]: Channel: 2
[13:56:24][D][wifi:543]: RSSI: -50 dB
[13:56:24][I][wifi:541]: - 'NASAGuest' (06:EB:D8:AE:95:02) [redacted]▂▄▆█
[13:56:24][D][wifi:542]: Channel: 2
[13:56:24][D][wifi:543]: RSSI: -68 dB
[13:56:24][I][wifi:541]: - 'NASAGuest' (06:EB:D8:AE:98:46) [redacted]▂▄▆█
[13:56:24][D][wifi:542]: Channel: 2
[13:56:24][D][wifi:543]: RSSI: -81 dB
[13:56:24][I][wifi:541]: - 'NASA' (00:EB:D8:AE:91:EE) [redacted]▂▄▆█
[13:56:24][D][wifi:542]: Channel: 2
[13:56:24][D][wifi:543]: RSSI: -49 dB
[13:56:24][I][wifi:541]: - 'NASA' (00:EB:D8:AE:95:02) [redacted]▂▄▆█
[13:56:24][D][wifi:542]: Channel: 2
[13:56:24][D][wifi:543]: RSSI: -68 dB
[13:56:24][I][wifi:541]: - 'NASA' (00:EB:D8:AE:98:46) [redacted]▂▄▆█
[13:56:24][D][wifi:542]: Channel: 2
[13:56:24][D][wifi:543]: RSSI: -81 dB
[13:56:24][I][wifi:541]: - 'nasaiot' (00:31:92:CE:9D:3A) [redacted]▂▄▆█
[13:56:24][D][wifi:542]: Channel: 7
[13:56:24][D][wifi:543]: RSSI: -61 dB
... redacted to limit logs...
[13:56:24][I][wifi:313]: WiFi Connecting to 'NASAGuest'...
[13:56:24][V][wifi:315]: Connection Params:
[13:56:24][V][wifi:316]: SSID: 'NASAGuest'
[13:56:24][V][wifi:319]: BSSID: 06:EB:D8:AE:91:EE
[13:56:24][V][wifi:349]: Password: 'XXXXXXX'[redacted]
[13:56:24][V][wifi:354]: Channel: 2
[13:56:24][V][wifi:363]: Using DHCP IP
[13:56:24][V][wifi:365]: Hidden: NO
[13:56:36][ 18245][V][WiFiGeneric.cpp:360] _arduino_event_cb(): STA Disconnected: SSID: NASAGuest, BSSID: 06:eb:d8:ae:91:ee, Reason: 204
[13:56:36][ 18245][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[13:56:36][ 18253][W][WiFiGeneric.cpp:950] _eventCallback(): Reason: 204 - HANDSHAKE_TIMEOUT
[13:56:36][ 18260][D][WiFiGeneric.cpp:966] _eventCallback(): WiFi Reconnect Running
[13:56:36][W][wifi:669]: Connecting to WiFi network failed. Are the credentials wrong?[ 18268][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
[13:56:36]
[13:56:36][D][wifi:697]: Retrying with hidden networks...
[13:56:36][I][wifi:313]: WiFi Connecting to 'NASAGuest'...
[13:56:36][V][wifi:315]: Connection Params:
[13:56:36][V][wifi:316]: SSID: 'NASAGuest'
[13:56:36][V][wifi:319]: BSSID: 06:EB:D8:AE:91:EE
[13:56:36][V][wifi:349]: Password: 'XXXXX'[redacted]
[13:56:36][V][wifi:354]: Channel: 2
[13:56:36][V][wifi:363]: Using DHCP IP
[13:56:36][V][wifi:365]: Hidden: NO
[13:56:36][W][wifi:669]: Connecting to WiFi network failed. Are the credentials wrong?
[13:56:41][I][wifi:313]: WiFi Connecting to 'nasaiot'...
[13:56:41][V][wifi:315]: Connection Params:
[13:56:41][V][wifi:316]: SSID: 'nasaiot'
[13:56:41][V][wifi:321]: BSSID: Not Set
[13:56:41][V][wifi:349]: Password: 'XXXX'[redacted]
[13:56:41][V][wifi:356]: Channel: Not Set
[13:56:41][V][wifi:363]: Using DHCP IP
[13:56:41][V][wifi:365]: Hidden: NO
[13:56:41][W][wifi:669]: Connecting to WiFi network failed. Are the credentials wrong?
[13:56:41][I][wifi:313]: WiFi Connecting to 'NASAGuest'...
[13:56:41][V][wifi:315]: Connection Params:
[13:56:41][V][wifi:316]: SSID: 'NASAGuest'
[13:56:41][V][wifi:319]: BSSID: 06:EB:D8:AE:91:EE
[13:56:41][V][wifi:349]: Password: 'XXXX'[redacted]
[13:56:41][V][wifi:354]: Channel: 2
[13:56:41][V][wifi:363]: Using DHCP IP
[13:56:41][V][wifi:365]: Hidden: NO
[13:56:41][W][wifi:669]: Connecting to WiFi network failed. Are the credentials wrong?
[13:56:46][I][wifi:313]: WiFi Connecting to 'nasaiot'...
[13:56:46][V][wifi:315]: Connection Params:
[13:56:46][V][wifi:316]: SSID: 'nasaiot'
[13:56:46][V][wifi:321]: BSSID: Not Set
[13:56:46][V][wifi:349]: Password: 'XXXX'[redacted]
[13:56:46][V][wifi:356]: Channel: Not Set
[13:56:46][V][wifi:363]: Using DHCP IP
[13:56:46][V][wifi:365]: Hidden: NO
[13:56:46][W][wifi:669]: Connecting to WiFi network failed. Are the credentials wrong?
[13:56:46][D][wifi:697]: Retrying with hidden networks...
[13:56:46][I][wifi:313]: WiFi Connecting to 'NASAGuest'...
[13:56:46][V][wifi:315]: Connection Params:
[13:56:46][V][wifi:316]: SSID: 'NASAGuest'
[13:56:46][V][wifi:319]: BSSID: 06:EB:D8:AE:91:EE
[13:56:46][V][wifi:349]: Password: 'XXXX'[redacted]
[13:56:46][V][wifi:354]: Channel: 2
[13:56:46][V][wifi:363]: Using DHCP IP
[13:56:46][V][wifi:365]: Hidden: NO
[13:56:46][W][wifi:669]: Connecting to WiFi network failed. Are the credentials wrong?
[13:56:46][D][wifi:697]: Retrying with hidden networks...
[13:56:47][ 30146][V][WiFiGeneric.cpp:353] _arduino_event_cb(): STA Connected: SSID: NASAGuest, BSSID: 06:eb:d8:ae:91:ee, Channel: 2, Auth: WPA2_WPA3_PSK
[13:56:47][ 30148][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
[13:56:47][V][wifi_esp32:516][arduino_events]: Event: Connected ssid='NASAGuest' bssid=06:EB:D8:AE:91:EE[redacted] channel=2, authmode=WPA2/WPA3 PSK
[13:56:48][ 30305][V][WiFiGeneric.cpp:367] _arduino_event_cb(): STA Got New IP:192.168.1.154
[13:56:48][ 30306][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[13:56:48][ 30309][D][WiFiGeneric.cpp:991] _eventCallback(): STA IP: 192.168.1.154, MASK: 255.255.255.0, GW: 192.168.1.1
[13:56:48][V][wifi_esp32:570][arduino_events]: Event: Got IP static_ip=192.168.1.154 gateway=192.168.1.1
[13:56:51][I][wifi:313]: WiFi Connecting to 'nasaiot'...
[13:56:51][V][wifi:315]: Connection Params:
[13:56:51][V][wifi:316]: SSID: 'nasaiot'
[13:56:51][V][wifi:321]: BSSID: Not Set
[13:56:51][V][wifi:349]: Password: 'XXXXX'[redacted]
[13:56:51][V][wifi:356]: Channel: Not Set
[13:56:51][V][wifi:363]: Using DHCP IP
[13:56:51][V][wifi:365]: Hidden: NO
[13:56:51][ 33587][V][WiFiGeneric.cpp:360] _arduino_event_cb(): STA Disconnected: SSID: NASAGuest, BSSID: 06:eb:d8:ae:91:ee, Reason: 8
[13:56:51][ 33588][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[13:56:51][ 33595][W][WiFiGeneric.cpp:950] _eventCallback(): Reason: 8 - ASSOC_LEAVE
[13:56:51][W][wifi_esp32:532][arduino_events]: Event: Disconnected ssid='NASAGuest' bssid=06:EB:D8:AE:91:EE[redacted] reason='Association Leave'
[13:56:51][W][wifi:674]: WiFi Unknown connection status 0
[13:56:51][W][wifi:690]: Restarting WiFi adapter...
[13:56:51][V][wifi_esp32:069]: Disabling STA.
[13:56:51][ 33636][V][WiFiGeneric.cpp:341] _arduino_event_cb(): STA Stopped
[13:56:51][ 33637][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 3 - STA_STOP
[13:56:51][V][wifi_esp32:507][arduino_events]: Event: WiFi STA stop
[13:56:51][I][wifi:313]: WiFi Connecting to 'NASAGuest'...
[13:56:51][V][wifi:315]: Connection Params:
[13:56:51][V][wifi:316]: SSID: 'NASAGuest'
[13:56:51][V][wifi:319]: BSSID: 06:EB:D8:AE:91:EE
[13:56:51][V][wifi:349]: Password: 'XXXXX'[redacted]
[13:56:51][V][wifi:354]: Channel: 2
[13:56:51][V][wifi:363]: Using DHCP IP
[13:56:51][V][wifi:365]: Hidden: NO
[13:56:51][V][wifi_esp32:067]: Enabling STA.
[13:56:51][ 33781][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 0 - WIFI_READY
[13:56:51][V][wifi_esp32:486][arduino_events]: Event: WiFi ready[ 33785][V][WiFiGeneric.cpp:338] _arduino_event_cb(): STA Started
[13:56:51]
[13:56:51][ 33792][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 2 - STA_START
[13:56:52][V][wifi_esp32:497][arduino_events]: Event: WiFi STA start
[13:56:53][ 35431][V][WiFiGeneric.cpp:353] _arduino_event_cb(): STA Connected: SSID: NASAGuest, BSSID: 06:eb:d8:ae:91:ee, Channel: 2, Auth: WPA2_WPA3_PSK
[13:56:53][ 35433][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
[13:56:53][V][wifi_esp32:516][arduino_events]: Event: Connected ssid='NASAGuest' bssid=06:EB:D8:AE:91:EE[redacted] channel=2, authmode=WPA2/WPA3 PSK
[13:56:53][ 35493][V][WiFiGeneric.cpp:367] _arduino_event_cb(): STA Got Same IP:192.168.1.154
[13:56:53][ 35494][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[13:56:53][ 35497][D][WiFiGeneric.cpp:991] _eventCallback(): STA IP: 192.168.1.154, MASK: 255.255.255.0, GW: 192.168.1.1
[13:56:53][V][wifi_esp32:570][arduino_events]: Event: Got IP static_ip=192.168.1.154 gateway=192.168.1.1
[13:56:53][I][wifi:617]: WiFi Connected!
[13:56:53][C][wifi:428]: Local MAC: 14:2B:2F:C5:70:B8
[13:56:53][C][wifi:433]: SSID: 'NASAGuest'[redacted]
[13:56:53][C][wifi:436]: IP Address: 192.168.1.154
[13:56:53][C][wifi:440]: BSSID: 06:EB:D8:AE:91:EE[redacted]
[13:56:53][C][wifi:441]: Hostname: 'esp-32-wmbus'
[13:56:53][C][wifi:443]: Signal strength: -52 dB ▂▄▆█
[13:56:53][V][wifi:445]: Priority: -5.0
[13:56:53][C][wifi:447]: Channel: 2
[13:56:53][C][wifi:448]: Subnet: 255.255.255.0
[13:56:53][C][wifi:449]: Gateway: 192.168.1.1
[13:56:53][C][wifi:450]: DNS1: 192.168.1.11
[13:56:53][C][wifi:451]: DNS2: 192.168.1.11
[13:56:53][C][sntp:023]: Setting up SNTP...
[13:56:53][C][api:025]: Setting up Home Assistant API server...
[13:56:58]E (45682) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
[13:56:58]E (45682) task_wdt: - loopTask (CPU 1)
[13:56:58]E (45682) task_wdt: Tasks currently running:
[13:56:58]E (45682) task_wdt: CPU 0: IDLE
[13:56:58]E (45682) task_wdt: CPU 1: loopTask
[13:56:58]E (45682) task_wdt: Aborting.
[13:56:58]
[13:56:58]abort() was called at PC 0x400f9878 on core 0
[13:56:58]
[13:56:58]
[13:56:58]Backtrace:0x400838b1:0x3ffbeb1c |<-CORRUPTED
[13:56:58]
[13:56:58]
[13:56:58]
[13:56:58]
[13:56:58]ELF file SHA256: 0000000000000000
[13:56:58]
[13:56:58]Rebooting...
[13:56:58]ets Jul 29 2019 12:21:46
[13:56:58]
[13:56:58]rst:0xc (SW_CPU_RESET),boot:0x16 (SPI_FAST_FLASH_BOOT)
[13:56:58]configsip: 0, SPIWP:0xee
[13:56:58]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[13:56:58]mode:DIO, clock div:2
[13:56:58]load:0x3fff0030,len:1184
[13:56:58]load:0x40078000,len:13132
[13:56:58]load:0x40080400,len:3036
[13:56:58]entry 0x400805e4
[13:57:00][ 6][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[13:57:00][I][logger:156]: Log initialized
[13:57:00][C][safe_mode:079]: There have been 1 suspected unsuccessful boot attempts
[13:57:00][D][esp32.preferences:114]: Saving 1 preferences to flash...
[13:57:00][V][esp32.preferences:126]: sync: key: 233825507, len: 4
[13:57:00][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[13:57:00][I][app:029]: Running through setup()...
[13:57:00][V][app:030]: Sorting components by setup priority...
[13:57:00][C][wifi:048]: Setting up WiFi...
[13:57:00][C][wifi:061]: Starting WiFi...
... redacted, another restart after here...
I tried many pin configurations, e.g.:
# mosi_pin: GPIO23 # blue
# clk_pin: GPIO14 # purple
# miso_pin: GPIO19 # green
# gdo2_pin: GPIO26 # gray
# gdo0_pin: GPIO25 # yellow
# cs_pin: GPIO15 # orange
and
# mosi_pin: GPIO23 # blue
# clk_pin: GPIO18 # purple
# miso_pin: GPIO19 # green
# gdo2_pin: GPIO26 # gray
# gdo0_pin: GPIO25 # yellow
# cs_pin: GPIO05 # orange
Yesterday, however, somehow I managed to make it work, but as you can see in logs, I get many issues with WiFi after adding a sensor I faced another issues and I started to play with PIN configurations and lost this working config.
My WiFi is a mix. NASA is 5 Ghz and 2.4 Ghz mix, NASAGuest is 2.4 GHz only, but they both are mesh.
Today I created another WiFi on spare Access Point (nasaiot) which is 2.4 GHz, single device only.
Are you able to point me into some direction? I’m struggling with that since yesterday. I tried also to switch to WeMos D1 Mini, but I got memory allocation exceptions there instead.
My board
Is says ESP-WROOM-32 on it, the FCC ID ends with ESP-32S
Photo from seller:
Real photos of my device: