Open IOOOTARobby opened 7 years ago
Wouldn’t it be better to find out why the device isn’t initialising? If the device isn’t fully initialised, then it probably won’t work properly, so polling it is not the only problem.
I try to be clearer. This is the flow:
I think the device cannot be initialized until I turn the power on again, but at the same time it should not result as ONLINE in ESH.
Maybe I don't have the full picture, I will be glad if you could explain it to me, thanks a lot.
Bump... ☺️
The problem arises when we start ESH while one of the devices (domitech LED light bulb) is not powered. ESH detects that device as "ONLINE", while it's not.
We periodically poll all the powered devices with a REFRESH command (once in a minute): it works perfectly even with the bulb if it is powered during ESH boot.
Otherwise, the REFRESH is regularly deferred because the device results to be not initialized. The check is performed at this line of the ZWaveThingHandler class.
The bulb seems to never complete its initialization, thus the polling is always deferred and ESH state results erroneously "ONLINE".
Switching the bulb ON and then OFF normalizes the situation: then the polling acts as expected (ONLINE and OFFLINE state are correctly detected).
I don't know if it should be possible to poll a device that is not completely initialized, I guess it would be not a proper action. It may have sense to put a DEVICE in INITIALIZING or UNITIALIZED state if the poll is deferred for that particular reason.
Here is the relevant part of the log, the full log is attached, together with the node's XML.
Node XML file attached Full log attached