Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconnecting devices to the zigby network after a power outage. #9

Open
JerryLutor opened this issue Sep 19, 2020 · 10 comments
Open

Reconnecting devices to the zigby network after a power outage. #9

JerryLutor opened this issue Sep 19, 2020 · 10 comments

Comments

@JerryLutor
Copy link

Help me understand the reason: if the power on the stick is lost, then the network may not be restored at all or it will be resolved partially.
The stick is used through a 2 mctt zigbia.
The devices connected to it are:

  1. switch without zero line
  2. sockets that act as routers.
  3. xiaomi sensors (motion and opening sensors)

Is this the reason in the firmware of the whistle, the zigby itself is 2 mktt or is it "normal" and this is how the zigby network works?

To restore the network, you need to reconnect the device through pairing

@aromanro
Copy link

aromanro commented Jan 5, 2021

I've got a report from somebody using different software that has the a similar issue with this firmware.

When restarted, 'no route' errors (AF data notifications, status 0xCD) are received if trying to reach the network devices and the resolution is to re-pair the devices.

As for the question above: " is it "normal" and this is how the zigby network works?" the answer is:

No, it's not the normal way. The network should not be affected by a restart. All that is relevant should be stored in the persistent memory.

@tsmt09
Copy link

tsmt09 commented Jan 5, 2021

@JerryLutor @aromanro
I had the same issues using zigbee2mqtt with docker. I did two changes to my config in one step, so I don't know what solved it.

Also, I didn't lose all of my devices, it was just some. I use an Aqara, Tradfri and Sonoff mix of devices.

First: move from docker verison to native installation on raspbian

Second:

advanced:
    network_key: GENERATE

The zigbee2mqtt documentation states that you should set this value on your first startup to generate a network_key.

After both changes, power disconnects or reboots are not a problem anymore. I don't know if the network_key does have anything to do with it, but maybe zigbee2mqtt overwrites the one on the device, if no value is set there.

@aromanro
Copy link

aromanro commented Jan 6, 2021

In the case I mentioned, zigbee2mgtt is not used so it does not apply. Neither is docker. I'll check zigbee2mqtt sources to see how they handle that setting, to see if that helps somehow.

I've got informed of yet another one that has a similar issue with the firmware. I don't know what software he uses, though, the info came through an intermediary.

@aromanro
Copy link

aromanro commented Jan 6, 2021

I briefly checked the zigbee2mqtt sources, 'GENERATE' just generates a random network key.
I don't see how this would solve the problem.
The code I mentioned sets the network key each time it starts (so does the zigbee2mqtt is you set a key there instead of 'GENERATE').

@aromanro
Copy link

aromanro commented Jan 6, 2021

I didn't lose all of my devices, it was just some. I use an Aqara

@TobiasSchmitt09 You mentioned that you lost only some devices. Are those by chance Zigbee 3 devices and the others 'legacy' ones? I'm trying to narrow down what is lost in the case of power loss.

@tsmt09
Copy link

tsmt09 commented Jan 6, 2021

I don't see how this would solve the problem.

Yup sure, I'm not familiar neither with codebase of the devices firmware nor zigbee2mqtt. It's just the observations I made because I thought they might help.

You mentioned that you lost only some devices.

Specifically I use those devices (I'll link zigbee2mqtt documentation links because they have all the devices in their list)

Aqara
https://www.zigbee2mqtt.io/devices/WSDCGQ12LM.html (Temperature Sensor)
https://www.zigbee2mqtt.io/devices/MCCGQ11LM.html (Window contact)

SonOff
https://www.zigbee2mqtt.io/devices/SNZB-04.html (temp. sensor)
https://www.zigbee2mqtt.io/devices/SNZB-02.html (wind. contact)

Tradfri:
https://www.zigbee2mqtt.io/devices/E1525_E1745.html (motion sensor)
https://www.zigbee2mqtt.io/devices/E1746.html (repeater)

codm repeater:
https://shop.codm.de/automation/zigbee/23/zigbee-cc2530-cc2592-long-range-router/repeater?c=10

Before making the two mentioned changes, I observed problem with all of the devices, except the Aqara temperature sensors.

@morgenroth
Copy link

morgenroth commented Jan 13, 2021

Any news on this issue?

On every power-loss of my CC2538 board, these errors appear in zigbee2mqtt and nothing works anymore.

Jan 13 17:40:10 bumblebee npm[372]: Zigbee2MQTT:error 2021-01-13 17:40:10: Publish 'set' 'current_heating_setpoint' to 'Bath OG Thermostat' failed: 'Error: Command 0x5c0272fffec1282b/1 manuSpecificTuya.setData({"status":0,"transid":0,"dp":2,"datatype":2,"length_hi":0,"length_lo":4,"data":[0,0,0,195]}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Data request failed with error: 'Timeout' (9999))'
Jan 13 17:40:10 bumblebee npm[372]: Zigbee2MQTT:debug 2021-01-13 17:40:10: Error: Command 0x5c0272fffec1282b/1 manuSpecificTuya.setData({"status":0,"transid":0,"dp":2,"datatype":2,"length_hi":0,"length_lo":4,"data":[0,0,0,195]}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Data request failed with error: 'Timeout' (9999))
Jan 13 17:40:10 bumblebee npm[372]:     at ZStackAdapter.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:339:27)
Jan 13 17:40:10 bumblebee npm[372]:     at Generator.next (<anonymous>)
Jan 13 17:40:10 bumblebee npm[372]:     at fulfilled (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:24:58)
Jan 13 17:40:10 bumblebee npm[372]: Zigbee2MQTT:info  2021-01-13 17:40:10: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Publish 'set' 'current_heating_setpoint' to 'Bath OG Thermostat' failed: 'Error: Command 0x5c0272fffec1282b/1 manuSpecificTuya.setData({\"status\":0,\"transid\":0,\"dp\":2,\"datatype\":2,\"length_hi\":0,\"length_lo\":4,\"data\":[0,0,0,195]}, {\"timeout\":10000,\"disableResponse\":false,\"disableRecovery\":false,\"disableDefaultResponse\":true,\"direction\":0,\"srcEndpoint\":null,\"reservedBits\":0,\"manufacturerCode\":null,\"transactionSequenceNumber\":null}) failed (Data request failed with error: 'Timeout' (9999))'","meta":{"friendly_name":"Bath OG Thermostat"},"type":"zigbee_publish_error"}'
Jan 13 17:40:19 bumblebee npm[372]: Zigbee2MQTT:error 2021-01-13 17:40:19: Publish 'set' 'current_heating_setpoint' to 'Jonas Thermostat' failed: 'Error: Command 0x5c0272fffec73db4/1 manuSpecificTuya.setData({"status":0,"transid":1,"dp":2,"datatype":2,"length_hi":0,"length_lo":4,"data":[0,0,0,210]}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Data request failed with error: 'No network route' (205))'
Jan 13 17:40:19 bumblebee npm[372]: Zigbee2MQTT:debug 2021-01-13 17:40:19: Error: Command 0x5c0272fffec73db4/1 manuSpecificTuya.setData({"status":0,"transid":1,"dp":2,"datatype":2,"length_hi":0,"length_lo":4,"data":[0,0,0,210]}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Data request failed with error: 'No network route' (205))

My only solution for now is to re-pair all devices.

@aromanro
Copy link

"Data request failed with error: 'No network route'"

That's the same error that was signaled with my implementation.

Can somebody try to wake up the devices (press some buttons on them or something, to force them to send notifications/reports) to see if the routing isn't rebuilt?

@drgrandios
Copy link

"Data request failed with error: 'No network route'"

That's the same error that was signaled with my implementation.

Can somebody try to wake up the devices (press some buttons on them or something, to force them to send notifications/reports) to see if the routing isn't rebuilt?

I have the same error, 21 devices, 4 of them are (IKEA) remotes, the rest are lights. Only the remotes will reappear - especially when removing the battery for a short time. All lights only come back to life after a reset (loosing all group memberships and scenes, unfortunately...).

@codmpm
Copy link

codmpm commented Jan 19, 2021

I've tested all for me know variants of the firmware and all have the same problem:

zigbee2mqtt 1.17.0
zigbee-herdsman 0.13.46
cc2538+cc2592 from Duoweisi on cod.m's CC2538 RPi module (UART)

Revision cold reboot reboot reboot + wait z2m restart comment
revierline 20200327 no no no yes without SBL
jethome 20201010 no no no yes with SBL
modkam 20200211 no no no yes with SBL

Is it confirmed that the USB variants of the CC2538 have the same issue?

Sorry to link out of the issue, but we have a discussion about this behaviour with different firmwares over at the homegear forums: https://forum.homegear.eu/t/cc2538-und-cc2530cc2592-zigbee-raspberry-pi-modul/3572/51

Cheers,
Patrik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants