I cannot see any devices in zigbee2mqtt-bridge node

Hi,

I have a problem with my node-red.
Since my SD card crashed I installed the whole PI including node-red again and imported my old flows.

mosquitto service is running
zigbee2mqtt service is running too.

sudo journalctl -u zigbee2mqtt.service -f
.. shows me that my temperature sensors (Aqara) were paired successfully and from time to time I can see a status update of that devices. A debug node behind the bridge node shows me the same messages.

The only thing I cannot see are all the devices in Node-Red and I have no idea why.

The zigbee2mqtt-bridge node is "online" but the device dropdown field stays blank.

localhost,
1883,
base topic: zigbee2mqtt

Devices tab is empty.
Groups tab is empty too and I cannot see any group (that I have created right now)
Since I clicked on "refresh map" at "Map" tab I got every 0.5 secounds this message:

zigbee2mqtt/bridge/networkmap : msg.payload : string[8]
"graphviz"

It does not stop and the map is still not generated after 15mins. Button still says "loading".

Any idea why the bridge node looks a bit buggy?

Kind Regards,
Phil

edit: Of cause the device lists in all other zigbee2mqtt nodes are empty too.

There's something changed in the protocol of zigbee2mqtt.
To get the zigbee2mqqt node working again you much add this to the /opt/zigbee2mqtt/datconfiguration.yaml file of zigbee2mqtt.

advanced:
  legacy_api: true

Source: cannot get device list on zigbee2mqtt @1.20.0 · Issue #43 · andreypopov/node-red-contrib-zigbee2mqtt · GitHub

1 Like

I did not bother with that node, it just adds complexity, I think. You can use mqtt directly to get the data.

1 Like

Thanks!

Wonder why I did not find this thread myself ...

Exactly my thinking as well. Tried this node and came to conclusion that pure MQTT is more stable and adds less sources of bugs.
The seldom needed management tasks can be done easily via the built in web-interface of zigbee2mqtt.

Also configure zigbee2mqtt with friendly names and the topics in mqtt become more obvious.

The topics can then be examined in, for example, mqttExplorer so that you know how to configure the nodes.

Hi,

What do you mean with "pure MQTT"?
I am using the GET node to get the information I want.

Kind Regards,

I mean use MQTT In node to get the data, not the zigbee node.

However, one must admit that the get node of contrib-zigbee2mqtt is really practical since it can be implemented directly in the flow. Additionally, you can request the actual value (or state) of a specific attribute. This does not work with zigbee2mqtt (via zigbee2mqtt/FRIENDLY_NAME/get), since this automatically gives you the complete payload with all the attributes.

E.g.
image

leads to

image

Where I would like to have the pure "OFF" as payload.

1 Like

Sometimes it is an advantage to have it all in one message, sometimes not.
A Change node can extract the value of course.

Some of my zigbee devices have a LOT of properties so I use a function node to create a msg for each property. This allows me to send the data to various points in my flow(s) (i.e. environment, power use, battery state, OnOff state etc.) either via a link node or an MQTT node.

Thank you Collin and all others,
I read a bit and looked a few tutorials. Worked great. I cannot say if it worked better since I had no problems with zigbee2mqtt nodes at this point but why not use mqtt directly if it is more efficient :wink:

Thanks for your screenshot. Helped me a lot even with other things (set instead of get).

So I really wonder if it is possible to request for a specific value at all ?
E.g. in the zigbee2mqtt documentation you will find this for my LED strip (Vendor: Innr, Model: FL 120 C)

state : To control the state publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"state": "ON"} , {"state": "OFF"} or {"state": "TOGGLE"} . To read the state send a message to zigbee2mqtt/FRIENDLY_NAME/get with payload {"state": ""}

But, reading individual properties as explained in the example above never works. Whatever payload I set (in the given example {"state": ""}) I always get the full payload with all attributes. Don't get me wrong, I can deal with that. However, I just would like to understand, why reading individual properties is mentioned in the zigbee2mqtt documentation is mentioned then ?

I don't think the device can send anything except the complete state message. I suspect it is just unclear wording in the docs. When it says that get gets the state I think it means that it gets the message containing the state.

I just tried this and so far, as mentioned by cetsa75, all query 'state' have returned the full message. As to why this is mentioned in the docs... good question.

I don't know, but am pretty certain, that the zigbee2mqtt node gets round this by storing the last message and returning the required property on request, so you get the last known value rather than the one at the time of the request

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.