Replies: 16 comments 16 replies
-
Hi @bakman2, The ValueID must be passed as an object - not an index of the array. So to get a value for a given ValueID. let MyValueID = {
"commandClassName": "Thermostat Mode",
"commandClass": 64,
"endpoint": 0,
"property": "manufacturerData",
"propertyName": "manufacturerData"
}
let Message = {
payload: {
mode: "ValueAPI",
node: 2,
method: "getValue",
params: [MyValueID]
}
}
return Message
|
Beta Was this translation helpful? Give feedback.
-
Ok thanks that works, that is not what I was expecting (I have never seen an "ID" been described as an object). Note I assumed that the commandclass was the valueid. So how would I update a "ValueID" ? You pass in the same full object and as value the same full object with updated values ? |
Beta Was this translation helpful? Give feedback.
-
Yeah, the backend driver refers to an ID - so I do agree its a little confusing. so, to update a value using the ValueAPI let MyValueID = {
.......
}
let Message = {
payload: {
mode: "ValueAPI",
node: 2,
method: "setValue",
params: [MyValueID, your-value]
}
}
return Message the CCAPI - is easier, if you want to start there, but by all means go with ValueAPI if you want. |
Beta Was this translation helpful? Give feedback.
-
don't be sorry 👍 |
Beta Was this translation helpful? Give feedback.
-
I want the easiest path, I went in this completely blind, I need to migrate from another zwave node-red node. Tbh it is easier to look in the cache files than to retrieve the values via node-red. Now i will look into the "CCAPI". Thanks again for the quick support. |
Beta Was this translation helpful? Give feedback.
-
CCAPI - will require a device to be awake to retrieve data at that moment (or it will be retuned to you, when the device wakes up) where-as the ValueAPI will use stored values (at least for returning data) but there is no need for the device to be awake to fetch data if using ValueAPI CCAPI is easier to use - but it does have draw backs (for battery devices) - at least if you want to fetch data, due to the wait that may occur |
Beta Was this translation helpful? Give feedback.
-
@bakman2 |
Beta Was this translation helpful? Give feedback.
-
Thanks. Shouldn't one be able to build a single array of objects for the whole topology in the network with all their properties and values ? It boggles my mind why these specifics are split up in by metadata and values separately as they belong together. Then again I only have 2 zwave devices so don't mind my oversimplification. I tried: getDefinedValueIDs > split > for each getValueMetadata, but this ends up in an infinite loop with errors that not all ValueIDs cannot be found somewhere in between the messages, but I digress. I think it could be more user friendly to provide additional nodes that do the translation mapping in the background with dynamically populated fields, something like: where the commands are dynamically retrieved based on node selection It is all kind of convoluted in my eyes, especially when dealing with the valueAPI - i am using battery powered devices. |
Beta Was this translation helpful? Give feedback.
-
So, A ValueID describes: example. You have a device that has 2 batteries. Each battery has the % level, charging state and a isLow property. but we have 2 batteries, so we need 6 ValueIDs (and the only real difference is the endpoint) HINT |
Beta Was this translation helpful? Give feedback.
-
PS I have a node being developed where it will generate commands for you 👍 |
Beta Was this translation helpful? Give feedback.
-
Hold on one second, i was not even aware there was a tab! |
Beta Was this translation helpful? Give feedback.
-
https://github.com/zwave-js/node-red-contrib-zwave-js/wiki/User-Interface |
Beta Was this translation helpful? Give feedback.
-
My screenshot is showing my development version - new icons and such for node status' |
Beta Was this translation helpful? Give feedback.
-
It all looks great, fantastic stuff. If the "basic editing" could also be translated to separate nodes, or something like that, that would be awesome. Let me first try to get this all working, i am able to turn on the valves and set the setpoints (took me a while tbh). |
Beta Was this translation helpful? Give feedback.
-
Do look at the CCAPI - its much much much easier (to get started with) You can force a UI update from CCAPI using changing the thermo let Message = {
payload: {
mode: "CCAPI",
node: 56,
cc: "Thermostat Setpoint",
method: "set",
enums: {
0: "ThermostatSetpointType"
},
params: ["Heating", 15, 0x00] /*0x00 - for Celsius */
}
}
return Message |
Beta Was this translation helpful? Give feedback.
-
we will soon have a much friendlier way to produce commands. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The wiki describes:
Get the list of ValueIDs for a Node
getValueMetadata
I send (preselected 1 specific node) :
I get 2 (duplicated) messages back with an array (?)
Lets say I need this part from the array:
I want to get the
getValueMetadata
, so I send:Result:
What is the ValueID here, this is not clear to me.
Any more details?
If this is specific to some hardware or specific software version, please explain here.
Version
6.1.1
Node-RED Version
2.0.6
What hardware are you using?
Other Linux
Any code to add?
No response
Beta Was this translation helpful? Give feedback.
All reactions