-
Hello ! My goal is as follows: I have a dozen Gen5 SmartSwitches and I'm trying to find out their wattage consumption, which I can do on individual nodes with the request :
But I'd like to loop this on all nodes. (writing in Python) Does anyone have an idea? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Check docs here: https://github.com/zwave-js/zwave-js-server. I don't maintain that project so I dunno but @raman325 could help you with that |
Beta Was this translation helpful? Give feedback.
You're correct, there's no specific command to get a list of node IDs, that doesn't even exist in the Z-Wave JS API. In JS you would just access the controller's
nodes
property which returns the nodes as objects. The most equivalent for the WS API would be requesting the controller state, and the response embeds the entire node states. A node state is all the node's properties along with all its values. This can be quite a bit of data for large networks.In general, the server APIs are roughly one-to-one with the Z-Wave JS API and commands are mostly the methods, not properties.
The expectation is that you use
start_listening
in the connect sequence to get the bulk list of nodes and value…