So this is my idea:
Att a regular interval, read all (in my case) Z-Wave devices that represents a on/off switch or a dimmer. In my case the are all controlling my lamps. I would need to read parameters stored in a free text field, like the "Notes" field (or something better?) and act from that.
Let's say this parameter says:
5
That would be interpreted to "when turned on, it will be turned off after 5 minutes by the loop defined above".
Or if is says:
6,20
That would be interpreted to "when turned on manual (by user interaction on the wall switch or something not triggered by an event) wait 20 minutes before turning off, and if turned on by an event wait 6 minutes".
And so on.
So how do I read the "Notes" field in a device, or is it any better suggestion on a field I could use? And how do I loop all Z-Wave devices that are "controlling" in my case lamps?
(of course, if this field used as a parameter, is empty, nothing should/will happen)
Att a regular interval, read all (in my case) Z-Wave devices that represents a on/off switch or a dimmer. In my case the are all controlling my lamps. I would need to read parameters stored in a free text field, like the "Notes" field (or something better?) and act from that.
Let's say this parameter says:
5
That would be interpreted to "when turned on, it will be turned off after 5 minutes by the loop defined above".
Or if is says:
6,20
That would be interpreted to "when turned on manual (by user interaction on the wall switch or something not triggered by an event) wait 20 minutes before turning off, and if turned on by an event wait 6 minutes".
And so on.
So how do I read the "Notes" field in a device, or is it any better suggestion on a field I could use? And how do I loop all Z-Wave devices that are "controlling" in my case lamps?
(of course, if this field used as a parameter, is empty, nothing should/will happen)
Comment