Discussion about setting things up and learning the ropes #50
-
Beta Was this translation helpful? Give feedback.
Replies: 15 comments 85 replies
-
Hey! Discussions are perfect for long running things 👍 So,
There is a file that holds the nodes, but the list you see isn't the result of it (not directly anyway) This is the file created by the Z-Wave JS Driver, and is used for the Driver to store/manage the metadata of your nodes.
This will get you a very nice (and detailed) output - oh, and is the message used to generate this list let Message = {
payload: {
class: "Controller",
operation: "GetNodes",
}
}
return Message; Each node in the result has the following: |
Beta Was this translation helpful? Give feedback.
-
Get nodes is awesome. Perfect. Next question: I have a couple of binary switches which use endpoint 1 instead of the more common (in my house) endpoint 0... For some reason, they aren't sending updates the same as endpoint 1 is sending through the controller node. When I send this message my light turns on (or off) as expected but there is no feedback from the controller node. I also checked on a node 12 device node and I get nothing. I would expect to get a "VALUE_UPDATED" message as I do when I'm controlling any of my endpoint 0 things... payload: {
"node": 12,
"class": "BinarySwitch",
"operation": "Set",
"endpoint": 1,
"params": [
true
]
} The device in question is this one |
Beta Was this translation helpful? Give feedback.
-
I wonder if Association groups has something todo with it. available since 3.3.0 let Message = {
payload: {
class: "Associations",
operation: "GetAllAssociations",
params:[12]
}
}
return Message; |
Beta Was this translation helpful? Give feedback.
-
Ok - and you get the result via a node message? |
Beta Was this translation helpful? Give feedback.
-
Ok, can you fire up a browser debug window (network tab) - do the change, and see what is sent? |
Beta Was this translation helpful? Give feedback.
-
Yup - thats the one. Just out of curiosity can you do let Source = {nodeId: 12,endpoint: 1}
let Group = 1
let Destination = {nodeId: 1}
let Message = {
payload: {
class: "Associations",
operation: "AddAssociations",
params: [Source, Group, [Destination]]
}
}
return Message; Then send a message to change the state (again on EP 1) The other API (which the UI uses) might cause a different update to happen. you can remove the association switching to |
Beta Was this translation helpful? Give feedback.
-
Log file time. Right after startup and "all nodes ready" I turned the switch off then back on using EP 1.
|
Beta Was this translation helpful? Give feedback.
-
So I've gone back through my on/off devices and I have a few which are acting like this. Could be helpful information for the drivers guy. All of my dimmers are fine. Working as expected. My GE on/off switches are good. Working fine: The switches with motion detectors (node 12) and my outlets are the weird ones. Not working: I haven't yet worked on setting up my other devices in nodered yet so I'm not sure what their status is. I never noticed this issue with zwavejs2mqtt (been running that since late last year) |
Beta Was this translation helpful? Give feedback.
-
Alright so I’m trying these value ID things - and I’m getting the list without any trouble. But if I send a value, nothing happens. But I’m sending a message with this function where msg.payload is true, false, 1, or 0 - and nothing happens at all… let Message = {
payload: {
node: 21,
class: "Unmanaged",
operation: "SetValue",
params: [24, msg.payload]
}
}
return Message; |
Beta Was this translation helpful? Give feedback.
-
Also a little hint, |
Beta Was this translation helpful? Give feedback.
-
So - next question... any way to make it spit out all the values it knows about a node? or even all nodes? Looking for a good way to have all the right values sent around nodered on startup. |
Beta Was this translation helpful? Give feedback.
-
Been digging. GetValue (Z-Wave JS -> getValue) actually returns the last know value (in 99.99999% of cases is current). And upon the driver starting up, it restores these values. The values later, are of course updated when the Driver receives updates. The UI therefore is using the same cache - which again is 99.99999% current. I could look to add methods to return this cache in a future version, but getValue is asynchronous, so I will need to do some work, to incorporate some waiting before returning the cached values package. |
Beta Was this translation helpful? Give feedback.
-
Just a quick update - the code changes are done (have been for the last few days), to allow grabbing the cache DB. How is your network?, is the Node Red Z-Wave driver running well for you? |
Beta Was this translation helpful? Give feedback.
-
@hufftheweevil, if we ever add association management to the UI (which will be nice in the future) |
Beta Was this translation helpful? Give feedback.
-
Hey! @crxporter Just a courtesy call to check your newly 700 series network is working well with the z-wave node-red plugin? |
Beta Was this translation helpful? Give feedback.
@crxporter,
Been digging.
GetValue (Z-Wave JS -> getValue) actually returns the last know value (in 99.99999% of cases is current).
These values are actually stored in
{Home ID}.values.jsonl
- A Line-By-Line JSON FormatAnd upon the driver starting up, it restores these values. The values later, are of course updated when the Driver receives updates.
With this in mind, you could actually grab the values, without fear it is causing a Huge network spike.
The UI therefore is using the same cache - which again is 99.99999% current.
I could look to add methods to return this cache in a future version, but getValue is asynchronous, so I will need to do some work, to incorporate some waiting bef…