Closed Alfff closed 4 months ago
@Alfff ,
Could you please print the shortaddr
when you send a command, such as ESP_EARLY_LOGI(TAG, "Send 'on_off toggle' command to short: 0x%4hx", shortaddr);
? I think this issue is triggered by the reset of the global variable shortaddr
when the coordinator resets.
You were right... I completely forgot about the value of the variable after the reset. I saved it in NVS and now it works. Thanks!
Question
I'm trying to figure out what happens in case an element of the network fails.
If I use the examples
HA_on_off_light
andHA_on_off_switch
, everything works well if either the light or the switch reset.However, I have some problems if I modify
HA_on_off_switch
to not to use binding, modifyingesp_zb_buttons_handler
like this:With this code, it works perfectly when the end device joins the network. It keeps working after the end device resets and re-join the network, but it stops working when the coordinator resets: I can see
ESP_ZB_ON_OFF_SWITCH: Send 'on_off toggle' command
in the terminal, but the light does not switch. I need the end device to reset so that it works again.Why does it work with binding and not without? What should I do to get the network working again after a coordinator failure if I don't want to use binding?
Additional context.
No response