Write script to toggle other device? #2883
-
I've got a Z-wave device that doesn't support target endpoints, so I can't use the associate group to toggle another device. Is it possible to write a script that gets an event from one node and sends a command to another? I'm thinking of something like this (pseudo-code):
Is this even possible? It feels like a valid use case, but I can't find that much information about writing/storing/executing scripts. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Hi @stephanvierkant! Yes it's possible, also now with scheduled-jobs it would be even easier :) You should bind to node const button = driver.controller.nodes.get(63);
const light = driver.controller.nodes.get(69);
button.on('value updated', function (zwaveNode, args) {
if(// check the valueId of the event) {
light.setValue(valueId, value, options)
}
} |
Beta Was this translation helpful? Give feedback.
Hi @stephanvierkant!
Yes it's possible, also now with scheduled-jobs it would be even easier :)
You should bind to node
value updated
orvalue notification
event: