Installing zigbee2mqtt

I have bought the CC2531 sniffer and want to use it with HA (Hassbian) running on a PI 3b+ to get rid of all the gateways for Hue and Xiaomi products.
What is the best way to install the zigbee2mqtt software for this?
Is it to be installed on the same Pi as Hassbian and if yes will it drain the perfomance of the Pi when running together with Hassbian.

I ran the addon of Z2M for a few months to just get my feet wet. Figuratively speaking.
As it was the easiest path to start with. You can backup and transfer the config from this setup to another with out to much hassle.

I now run Z2M on it’s own SOC (a old first Gen. Odroid1) Because it allows me to place the coordinator in a central location in the house.

In both situations Z2M did not have a big system use, perhaps 5-10% increase.

Hope it’s of help.

Hi thanks for your answer.
I guess it is not the same when using Hassbian. In it is just an addon not in Hassbian as far as I know.
By coordinator you mean the sniffer?

Yes. a “sniffer” or usb zigbee dongle can be flashed with ether coordinator or router firmware.

Follow the very good documentation. It can run on your hsssbian pi, or on any other linux machine - a pi, or anything really. It communicates with ha via mqtt (the clue is in the name) so as long as there is network communication between them it will work.

And no, the performance hit will be negligible in my experience.

Having said that, I just noticed this Out of memory when Zigbee2mqtt starts - I’ll be keeping an eye on it!

Is this documentation the best to follow?

After pairing is it then possible to rename the name of a light, sensor etc. before they are discovered by HA so that the names are equal to the ones already used in HA when connected through hue bridge and so on?
Must MQTT discovery be set to true in HA?

1 Like

All the docs are linked off here

Home assistant integration has a link there too.

Thanks :slight_smile:
Still I´m not quite sure whether it is possible to rename the entities BEFORE they are discovered by HA. I would like to have the same names as now so that I don´t have to change the automations.

I don’t think so, but you can change them in the ui once discovered.

There is a way. In theory.
I’ve not done this, however I believe it should work.

I Think the procedure would be something like such:

  • Disable Home Assistant integration (MQTT discovery) by adding :
homeassistant: false

To Z2M’s configuration.yaml. So devices do not get auto added.

  • Then add/pair all your zigbee devices to Z2M.

  • Then once you have added/paired stop Z2M to edit configuration.yaml. You well need to follow the steps in this post: Zigbee2mqtt: show the networkmap in home assistant To rename your devices.

  • Then once you have all your devices renamed edit configuration.yaml with:

homeassistant: true

And start up Z2M.

I Think it should pick up and add then renamed devices at that point.
However this is theory as I have not tested.

Hope it helps.

I know :slight_smile:

I will have this in mind when beginning to pair.
What is normal? Always having HA integration in Z2M set to true and discovery to true in HA? Or better disable both and only enable them when adding new devices? Just to be sure nothing accidently gets added.

Yes. On is normal .

I had a chance to rename a few devices on my system. However It seems as my theory is a bit off. I don’t believe it is necessary to disable Hass Discovery. Or anything at all.

Heck, I did’t even restart Hass and noticed the changes . So it seems just editing the Z2M device list and restarting z2m is enough.

Hope it helps.

thanks :slight_smile:

so there should be no reason of using a separate pi for zigbee2mqtt?

Where can I find this device list of paired devices?

zigbee2mqtt’s configuration.yaml

:+1: okay thanks

I have now tried to add a Philips Hue Bulb and it is shown in the Z2M conf.yaml.
I then tried to change the friendly name like here.
friendly_name: light.test
retain: false

In Home Assistant the entity ID shows up strange though.
Friendly name in HA says “light.test_light”

I thought that HA would take over the friendly name of Z2M conf.yaml. as entity id.