syssi / esphome-zb-gw03

ESPHome custom firmware for the ZB-GW03 zigbee gateway
Apache License 2.0
72 stars 18 forks source link

error conection #29

Closed Pokornypetr closed 10 months ago

Pokornypetr commented 1 year ago

Hi, if I don't program the module and connect it to zigbee home automation in HA, everything works for about 2-3 days, then esphome starts to report in the log:

INFO ESPHome 2023.8.3
INFO Reading configuration /config/esphome/zigbee-gate.yaml...
WARNING GPIO4 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO2 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO12 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO15 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Starting log output from 192.168.100.6 using esphome API
INFO Successfully connected to 192.168.100.6
[20:22:07][I][app:102]: ESPHome version 2023.8.3 compiled on Sep  6 2023, 20:55:58
[20:22:07][I][app:104]: Project syssi.esphome-zb-gw03 version 1.0.0
[20:22:07][C][status_led:019]: Status LED:
[20:22:07][C][status_led:020]:   Pin: GPIO15
[20:22:07][C][logger:301]: Logger:
[20:22:07][C][logger:302]:   Level: DEBUG
[20:22:07][C][logger:303]:   Log Baud Rate: 115200
[20:22:07][C][logger:305]:   Hardware UART: UART0
[20:22:07][C][i2c.idf:061]: I2C Bus:
[20:22:07][C][i2c.idf:062]:   SDA Pin: GPIO33
[20:22:07][C][i2c.idf:063]:   SCL Pin: GPIO32
[20:22:07][C][i2c.idf:064]:   Frequency: 50000 Hz
[20:22:07][C][i2c.idf:067]:   Recovery: bus successfully recovered
[20:22:07][I][i2c.idf:077]: Results from i2c bus scan:
[20:22:07][I][i2c.idf:083]: Found i2c device at address 0x50
[20:22:08][I][i2c.idf:083]: Found i2c device at address 0x58
[20:22:08][C][uart.idf:122]: UART Bus:
[20:22:08][C][uart.idf:123]:   Number: 1
[20:22:08][C][uart.idf:124]:   TX Pin: GPIO2
[20:22:08][C][uart.idf:125]:   RX Pin: GPIO4
[20:22:08][C][uart.idf:127]:   RX Buffer Size: 256
[20:22:08][C][uart.idf:129]:   Baud Rate: 115200 baud
[20:22:08][C][uart.idf:130]:   Data Bits: 8
[20:22:08][C][uart.idf:131]:   Parity: NONE
[20:22:08][C][uart.idf:132]:   Stop bits: 1
[20:22:08][C][switch.gpio:068]: GPIO Switch 'zb-gw03 Zigbee nRST'
[20:22:08][C][switch.gpio:076]:   Inverted: YES
[20:22:08][C][switch.gpio:091]:   Restore Mode: always OFF
[20:22:08][C][switch.gpio:031]:   Pin: GPIO13
[20:22:08][C][switch.gpio:068]: GPIO Switch 'zb-gw03 Zigbee Download Mode'
[20:22:08][C][switch.gpio:076]:   Inverted: YES
[20:22:08][C][switch.gpio:091]:   Restore Mode: always OFF
[20:22:08][C][switch.gpio:031]:   Pin: GPIO12
[20:22:08][C][template.switch:068]: Template Switch 'zb-gw03 Zigbee Reset'
[20:22:08][C][template.switch:091]:   Restore Mode: always OFF
[20:22:08][C][template.switch:057]:   Optimistic: NO
[20:22:08][C][restart:068]: Restart Switch 'zb-gw03 Restart'
[20:22:08][C][restart:070]:   Icon: 'mdi:restart'
[20:22:08][C][restart:091]:   Restore Mode: always OFF
[20:22:08][C][ethernet:221]: Ethernet:
[20:22:08][C][ethernet:363]:   IP Address: 192.168.100.6
[20:22:08][C][ethernet:364]:   Hostname: 'zigbee-gate'
[20:22:08][C][ethernet:365]:   Subnet: 255.255.255.0
[20:22:08][C][ethernet:366]:   Gateway: 192.168.100.1
[20:22:08][C][ethernet:375]:   DNS1: 192.168.100.1
[20:22:08][C][ethernet:376]:   DNS2: 0.0.0.0
[20:22:08][C][ethernet:397]:   MAC Address: A0:B7:65:57:A4:9B
[20:22:08][C][ethernet:402]:   Is Full Duplex: YES
[20:22:08][C][ethernet:407]:   Link Speed: 100
[20:22:08][C][ethernet:224]:   Power Pin: 16
[20:22:08][C][ethernet:226]:   MDC Pin: 23
[20:22:08][C][ethernet:227]:   MDIO Pin: 18
[20:22:08][C][ethernet:228]:   Type: LAN8720
[20:22:08][C][ethernet:229]:   PHY addr: 1
[20:22:08][C][mdns:112]: mDNS:
[20:22:08][C][mdns:113]:   Hostname: zigbee-gate
[20:22:08][C][ota:093]: Over-The-Air Updates:
[20:22:08][C][ota:094]:   Address: 192.168.100.6:3232
[20:22:08][C][api:138]: API Server:
[20:22:08][C][api:139]:   Address: 192.168.100.6:6053
[20:22:08][C][api:143]:   Using noise encryption: NO
[20:22:53][D][api:102]: Accepted 192.168.100.5
[20:22:53][W][api.connection:097]: 192.168.100.5: Reading failed: BAD_INDICATOR errno=11
[20:23:07][D][api:102]: Accepted 192.168.100.5
[20:23:07][W][api.connection:097]: 192.168.100.5: Reading failed: BAD_INDICATOR errno=11
[20:24:07][D][api:102]: Accepted 192.168.100.5

and the zigbee home automation integration says that the settings failed and it is no longer possible to connect to the module in the HA log, there is this `error:zigbee-gate @ 192.168.100.6: Connection error occurred: zigbee-gate @ 192.168.100.6: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (Home Assistant 2023.9.1).

20:36:07 – (VAROVÁNÍ) runner.py - zpráva se poprvé objevila v 9. září 2023 12:18:52 a zobrazuje se 3431x
Couldn't start application
20:35:21 – (CHYBA) /usr/local/lib/python3.11/site-packages/zigpy/application.py - zpráva se poprvé objevila v 9. září 2023 13:37:31 a zobrazuje se 1627x
Config entry 'socket://192.168.100.6:6638' for zha integration not ready yet; Retrying in background
20:19:13 – (VAROVÁNÍ) config_entries.py
Config entry 'socket://192.168.100.6:6638' for zha integration not ready yet; Retrying in background
20:18:46 – (VAROVÁNÍ) config_entries.py - zpráva se poprvé objevila v 10. září 2023 22:55:36 a zobrazuje se 3x
Error handling request
10:30:45 – (CHYBA) /usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py - zpráva se poprvé objevila v 9. září 2023 12:50:45 a zobrazuje se 5x

please help

syssi commented 10 months ago

In general this happens if Home Assistant tries to talk using a wrong encryption key with the ESP home node. Please remove the node from the ESPHome integration, flash the device with a well known encryption key, re-add the device at HA and paste the correct encryption key into the dedicated input field of the config flow.