I tried to do something like atomicState.currentDevice = myDevice, and that failed miserably; a log.debug before that line printed; a log.debug after that line didn't print; no error messages of any kind that I could find.
Is this a known limitation? You cannot assign object to state variables, but only atomic types?
Thanks.
You can't assign a device to state or atomic state, this is the case in ST as well.
Device is an object.
What specifically are you trying do?
Something fairly simple: I have a device whose change in state (on/off) notifications sometimes don't reach the hub; so, the app would set its state to on/off and then check after a minute if the state was actually changed as intended, and repeat the process until the state does indeed change. I was trying to use state (or scheduled function arguments) to obtain that behavior.
Thanks!
There's no way for the hub to "know" intent. Any change in state that isn't reported to the hub couldn't be verified by the hub. Better to figure out if the device could use a reset that might help with reporting state or replacement if it can't.
[Edit] Sorry, I missed that you were intending to change state from within your own app the first time I read this. I sit corrected
Pass in the device id to your runIn, then reference the device later using getSubscribedDeviceById()
1 Like
Yep, that's what I ended up doing.
Also if your device was selected with an input, there's no need to pass anything, just reference the input name in your method.
...if it was only one; but I'm passing it as an argument because the application controls N of them.
You can also do an iterator in your method...
Yeah, z-wave is not the most reliable protocol I can think of... 95% of my time writing apps is wasted in trying to reach some level of fault tolerance to deal with the flakiness of z-wave communication...
Hmmm, might be something else afoot here, I have 30 odd zwave actuators, I'm not loosing commands.
I'm sure location/distance/interference play a role; I do have similar issues with SmartThings. But there is only so much you can do to fight physical constraints.
is there any doc for these functions that are only available on HE?
thank you.
We are working on this...
1 Like