Zigbee2mqtt: getting rid of your proprietary Zigbee bridges (Xiaomi, Hue, TRADFRI)

As an example

![](upload://ssbnxZUv55gOcDnAKUMKzJ8gNiG.jpeg)

![](upload://piMf9q9eZd9TuKFcXHzAmoGJBPg.jpeg)

Is there a way that you can retrieve that imaged bases on the friendly name or ieee address using a payload through mqtt? Basically I’m trying to get the used image in Z2M of a Zigbee device by sending a command through mqtt, then store and use that specific image later on.

I don’t see anything here :

I know, that’s why I hoped someone knew if it was at all possible or not :wink: I can see using inspect element that the images are hosted on zigbee2mqtt.io, like this one: https://www.zigbee2mqtt.io/images/devices/9290012607.jpg

However, https://www.zigbee2mqtt.io/images/devices/ is not accessible. So most likely Z2M has something built in that knows what picture to use based on the vendor + description. I was hoping there was a way to use that, so I could retrieve that image automatically based on the vendor + description, just like Z2M does. I want to use the images automatically for something I’m creating on Lovelace. I read all the mqtt messages when pairing a new device as well, and those don’t mention the image. So it has to be done within Z2M. I’m hoping there’s a way to push that image url through somehow.

I think you could adopt this strategy:

  1. Get this topic zigbee2mqtt/bridge/devices

  2. Your device will be in there. Using some sort of json path tool to get the model number.

  3. construct a url https://www.zigbee2mqtt.io/images/devices/model.jpg

  4. profit

This will require more json knowledge than I have. This may help JSON path picker

2 Likes

Thanks @nickrout That sounds easier then expected. I did not know that the final piece in the url was actually the model number.

I use Node-RED and am very far with my project (where this is a final part of). I already have nodes that extract the vendor + description from the mqtt payload through JSON and push them to service calls. I can see that the model is already in the same payload, so extracting that is just one extra switch node. Looks like this is the way :smiley: !

Edit: Works great! Small preview of my Lovelace dashboard with what was working on for the last 10 days, almost finished :slight_smile:

1 Like

Yes because the forum auto formatting changed my post, but you have got the idea anyway :slight_smile:

1 Like

Very nice.

1 Like

Hi, I’m now currently using cc2531 stick and having 20 devices connected to it. I’m thinking to migrate the stick to CC2652p and connect it to different RPi so that I can place the zigbee RPi at center of my house while my HA RPi is at another room.

The latest z2m with 1.21.0 does not need to repair the device when you are switching cc2531 to cc2652 when you are connecting to zigbee stick to the HA RPi. But in my case, I’m moving the stick to another remote RPi.

Do I need to repair every device after the migration?

Copy your data directory to your new pi

I will still run the zigbee2mqtt at my RPi which is running the HA. The zigbee stick will be connected at another different RPi. So I think in this case, I don’t need to copy the data directory.

But I wasn’t sure if the device repairing is needed.

if that is the case, no need. As long as you run z2m 1.21 all should be fine without re-pairing.

Thanks. Will there be any noticeable delay using ser2net method as compared to directly connect to HA host?

There was a clear warning about using tcp based solution in ZHA wiki page, it will not be reliable and steady as it was in serial mode, so expect some lost messages. At least for EZSP protocol, check warning here: Zigbee Home Automation - Home Assistant

Nothing to worry from delay perspective

I’ve running a CC2530+CC2591+esp01 coordinator for over 1,5 years. Never had any issues.

1 Like

There is similar warning in zigbee2mqtt document but both of them are referring the EZSP based chip. My plan is to use CC2652p at remote RPi so I guess it will be OK.

Why not eliminate that possibility by running z2m on the RPI that has the co-ordinator attached to it?

I migrating the CC2531 to CC2652p and I’m running RPi with SSD for my HA host. However, when I plugged the CC26652p, my devices failing to re-join. I have verified the CC2652p stick at my another RPi running dev HA with SD card and all good. Also, I verified the latest zigbee2mqtt is able to do the migration without need to re-pair all devices.

So I have narrowed down the problem seems it coming from my production RPi which is running with SSD. I suspect it might the USB port might have sufficient power for the CC2652p.

So I’m thinking to host the CC2652p at another RPi and remotely connected to my zigbee1mqtt in my production HA.

Say again, why not run z2m on the remote pi?

Oh I see what you meant. Is there any advantage on running the z2m on remote pi?

My understanding on setting up the z2m on remote pi is not that straight forward as z2m addon. Also, I have all my zigbee devices joined to z2m addon which is running on my HA RPi.

So switching to stick alone to remote pi and keep z2m running on HA pi will be less headache. As I don’t need to re-pair everything.

Although I believe I might not need to re-pair every device also if I run z2m on remote pi, but there will be additional steps in moving the z2m database/config files.

In short, more work to do if running z2m at remote pi.