How to schedule simple commands? #3509
-
I am slightly embarrassed to be asking this.. It's perfectly fine that the project doesn't aim to schedule device actions, but.. here goes. I've got ZWave-JS-UI running and my devices are recognized. I'd like to schedule simple "power on/off" actions for some smart plugs. Is there any way I could do this without resorting to whole Home Assistant? Having databases and what not it looks way heavier than what I would need for: keep lights on between 10am .. 10pm. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
Yes, you can: https://zwave-js.github.io/zwave-js-ui/#/usage/setup?id=scheduled-jobs Basically you can schedule custom driver functions to run, |
Beta Was this translation helpful? Give feedback.
-
Thanks. That means technically it could be done. But the developer experience wasn't great (I don't see a cursor, and get no logs out though I tried). It would be coding in dark, and without API docs, I guess. Cannot switch the bulb on. What I do see is a "targetId" (2-37-0, see below). If you have a snippet that switches such on/off, I can give it a try. On my own, I'll go and make some Rust automation to do this. |
Beta Was this translation helpful? Give feedback.
-
Here is your driver function to write const zwaveClient = this.zwaveClient
const vId = {
nodeId: 2,
commandClass: 37,
endpoint: 0,
property: 'targetValue',
}
zwaveClient.writeValue(vId, true) |
Beta Was this translation helpful? Give feedback.
Here is your driver function to write
true
on that specific switch: