Using domoticz.devices(idx) for unused device returns nothing. Is this wanted behavior?
Posted: Friday 05 February 2021 18:10
My z-wave setup for domoticz is quite flaky. On a reboot, it has a 50/50 chance of getting up and running without needing help. Since I only have a couple of devices connected through z-wave, I'm not really interested in fixing it (since it's most likely due to me using a RaZberry v1), and I'd rather just set up an automated check, by looking at the last update for a device. However, the only value that updates regularly on the piece of hardware I'm interested in, is its power consumption data. The other 'devices' are things like the RGB channels, so they only change whenever the item gets used.
Now comes the issue though: If I try to get the device through domoticz.devices(deviceIdx), I get nothing for the power consumption device, most likely because it's not set to "used" in the devices tab, and I don't want it to be, since I don't care about the usage data, I only care about when it was last updated.
Is this wanted behavior? I feel like it's a bit weird for when I'm targeting a device directly by its index. Unused devices not showing up in the list when iterating through all devices, I can understand (although that probably should be an option too), but when I target a device directly by index, I expect to get its data, regardless if it's set to used or unused.
If this is wanted behavior, is there any way to get around it?
Now comes the issue though: If I try to get the device through domoticz.devices(deviceIdx), I get nothing for the power consumption device, most likely because it's not set to "used" in the devices tab, and I don't want it to be, since I don't care about the usage data, I only care about when it was last updated.
Is this wanted behavior? I feel like it's a bit weird for when I'm targeting a device directly by its index. Unused devices not showing up in the list when iterating through all devices, I can understand (although that probably should be an option too), but when I target a device directly by index, I expect to get its data, regardless if it's set to used or unused.
If this is wanted behavior, is there any way to get around it?