Open miDan23 opened 5 years ago
Currently node-red-contrib-zigbee doesn't keep a cache of current states, so you have to write them into the context.
OK ... good to know ... You wrote "currently". Is this going to change? I understand that end devices like motion sensor and dimmer switch cannot receive data. They can only send. But lamps are routers. They should be able to send and receive data. And they can't get asked for their state?
You wrote "currently". Is this going to change?
I'm thinking about it :-)
But lamps are routers. They should be able to send and receive data. And they can't get asked for their state?
You can do this already, with the Command Node you can use a read command:
Get command for the converter node is on my todo, will implement that soon.
Hi
First off all thx for the effort you put into RedMatic and Zigbee Node.
When I put in exactly your command node on a Tradfri Bulb (which should be supported by the converters) I get
19.10.2019, 16:33:44node: command msg : string[26] "attributes is not iterable"
when triggered from a Flow., In the setup of the node it answers correctly:
Any Idea what I am doing wrong? Or do I follow the wrong concept?
Thx, Kneip
@kneip68 : You can try the following:
${name]
to the name of your lamp{"state":""}
as payloadAfter deploying and injecting you should get the state of your lamp.
I get
19.10.2019, 16:33:44 node: command msg : string[26] "attributes is not iterable"
when triggered from a Flow., In the setup of the node it answers correctly
does the message you inject into the command node contain an attributes
property? This would overwrite what you have entered in the command node configuration.
@miDan23
After deploying and injecting you should get the state of your lamp.
Sure that works, but on my special bulb it only gives me very limited informaton, so I was hoping to get more from the command node.
@hobbyquaker Yes I did in various combinations, but also tried to without. In the meantime I think my misconception was that I could predefine the complete query in the command node, but it seems to me like when I deploy it it looses the info that it should do READ command instead a generic command. So I guess I need to learn more on the usage of the command node.
Could someone please post a flow containing an inject node, a zigbee command node for reading and a debug output node? From there I guess I can figure it out. Thx.
@kneip68
Just guess what you get with {"state":"","brightness":"","color_temp":""}
...
Look here (scroll down to zigbee2mqtt/[DEVICE_ID]/set) for an idea what you can get.
Yes I did in various combinations, but also tried to without. In the meantime I think my misconception was that I could predefine the complete query in the command node, but it seems to me like when I deploy it it looses the info that it should do READ command instead a generic command.
Thats not your misconception. If the "Execute Command" Button is working but an incoming msg does not it's a bug. Will have to investigate
can confirm that this is a bug: https://github.com/hobbyquaker/node-red-contrib-zigbee/issues/62
Hi,
is it possible to get the actual state of a lamp?
Or should I remember their status with global variables?