info_changed event stopped working for zigbee devices
local function info_changed(driver, device, event, args)
log.info("info changed: " .. tostring(event)) << never appears
...
end
lifecycle_handlers = {
infoChanged = info_changed,
},
when the driver is reloaded, the init function runs with an empty [] device object. so device: get_model () == nil and all vendor-specific logic doesn’t work until the hub is restarted.
Hi, @veonua.
I’ve been making some tests and I receive the info_changed event correctly on my driver for a Zigbee device.
I even included the line you shared and this was the result:
--log in driver's code
log.info("info changed: " .. tostring(event))
--result
info changed: infoChanged
Do you mean by “reloaded” when you package, publish and install the driver again (without deleting the previous version) because the infoChanged is called?
Remember that this is a beta version, so it could be some inconsistencies.
Have you tried deleting your device and the driver completely and package, publish and installing it again?
You can, it’s just in this cases where there are no apparent issues but the driver is not showing the expected behavior.
If deleting completely the driver and installing it again doesn’t solve the issue, we need a further analysis.