Checking sensor status #115
-
Hi - how would i go about doing: Button pressed -> if door sensor closed -> then do whatever ? I can't really see any way to check the status of a node in the 'plugin' |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Hey! There are 2 ways. Store the value of when the door was last closed/opened (storing the event somewhere) - for later use OR. use the let ValueID = {
....,
....
}
let Message = {
payload: {
mode: "ValueAPI",
node: 2,
method: "getValue",
params: [ValueID]
}
}
return Message you can get the value ID, by double clicking the current value in the UI |
Beta Was this translation helpful? Give feedback.
-
here is the wiki for ValueAPI 😄 https://github.com/zwave-js/node-red-contrib-zwave-js/wiki/Value-API |
Beta Was this translation helpful? Give feedback.
-
@lurendrejer Any problems - please reach out to us |
Beta Was this translation helpful? Give feedback.
-
Everything is dandy and I'm out for the weekend :) I'm looking into node-red and clustering atm for a work-related case. |
Beta Was this translation helpful? Give feedback.
Hey!
There are 2 ways.
Store the value of when the door was last closed/opened (storing the event somewhere) - for later use
OR.
use the
ValueAPI
- to fetch the value from the z-wave value cacheyou can get the value ID, by double clicking the current value in the UI
remember this?
#110 (reply in thread)