Oops. Thank goodness for backups. Strange is that I put out a video for backups and it has low views, whereas everyone should watch and do them religiously.
Hi - i was doing something similar and all current tutorials seem to omit 2 things: 1) you need to have 2 separate zigbee channels (each integration gets a separate one) and 2) you need an ADDITONAL folder (in my case zigbee2mqtt2) for holding the configuration.yaml (this one is INSIDE the zigbee2mqtt2 folder) for storing the config file of the second integration. If you don't then the second integration will simply re-use the config of the first one...
Thanks for your comment. I didn't have those issues, the only changes I needed to make were for the base topic and channel (as referenced in www.zigbee2mqtt.io/guide/faq/#how-do-i-run-multiple-instances-of-zigbee2mqtt). Did anyone else have any issues?
I had this issue as well. All existing devices were duplicated in the second zigbee2mqtt instance and the overview showed duplicated information for each device. Use an editor and add a folder, for example "zigbee2mqtt2" and then change the "data_path" in the addon configuration to match.
@@smart_home_australia Yes - after a day of messing around trying to get it working, I realised that the config folder was shared between the two instances. This meant that every device ended up having two sets of entities as they ultimately get added in both instances. I'd always end up with devices dropping in and out and loads of errors on the network. As soon as I killed my second instance and recreated it with a different config path AND changing the "master: pty,raw,echo=0,link=/tmp/ttyZ2M2,mode=777" setting to have a "2" after /tmp/ttyZ2M then everything ran properly. I think you do indeed have to change everything that can be unique to be unique or the instances of z2m will clash.
@@smart_home_australia yes for the folder part at least. It was impossible to start a second zigbee2mqtt on a second coordinator because it try to retrieve the backup from the old one I change the folder to /config/zigbee2mqtt2 instead of /config/zigbee2mqtt and it has started without error (didn't try anything else for now)
Thanks, great tutorial. I want to add a 2nd z2m coordinator. I run the majority of supporting apps in containers on my Proxmox systems. I do this so that rebooting HA, does not affect MQTT, ESPHome, Z2M, Node-Red and so on. Also have better control overall. I did this a couple of years ago, service by service. This all started when influxdb add-on was having trouble and no fix was on the horizon. A little more work, but worth it.
Arhhh do you live in ShangraLa lol... Your setup sounds like the optimal for most home users, saleable, recoverable, potential for high availability and very resilient. The issue would be that to get to that level of sophistication would take alot of knowledge and effort and most want the outcome without working part time as a sys admin :) Congrats on the setup, have you ever thought about making a video on how you did this?
This is my first exploration into Ingress, I wasn't aware of this functionality but am happy that I found it. I'll see what else I can include it into. :) thanks for the tip.
Great walk through of this subject. I notice your adapters are running ezsp firmware. Are you getting the warning about ezsp being deprecated and replaced by ember in the next version of zigbee2mqtt? Are you having any issues with Z2M running ezsp?
This was a topic earlier in the comments. I personally didn't and it worked perfectly. The differentiator is the base topic. But having done more research I would now suggest give it a unique data path also.
In Zigbee2MQTT, the data path refers to the directory where the application stores its data, including the configuration file, state information, and any logs. As long as the base topic is different between instances, then leaving this as default is fine.
@@MaxReinhardt-wy7lz Yep. Its the base topic that provides the differentiator as part of the high-level key. Give it a try and see :) check out the discount codes in the video description for a 5% discount.
@@smart_home_australia No, it isn't! An other/different data_path/folder like /config/zigbee2mqtt_xy is essential. If not, the already learned zigbee-devices are duplicated in both sessions.
@@matthiaszeise9916 is correct. I spent a day trying to work out what was going wrong, and it was this. See my other comments for more. Dang, I might have to make a video. 🙂
This is a great tutorial. I tried this previously and wish I had this tutorial as I ended up blowing up my HA but thankfully I had back-ups.
Oops. Thank goodness for backups. Strange is that I put out a video for backups and it has low views, whereas everyone should watch and do them religiously.
Hi - i was doing something similar and all current tutorials seem to omit 2 things: 1) you need to have 2 separate zigbee channels (each integration gets a separate one) and 2) you need an ADDITONAL folder (in my case zigbee2mqtt2) for holding the configuration.yaml (this one is INSIDE the zigbee2mqtt2 folder) for storing the config file of the second integration. If you don't then the second integration will simply re-use the config of the first one...
Thanks for your comment. I didn't have those issues, the only changes I needed to make were for the base topic and channel (as referenced in www.zigbee2mqtt.io/guide/faq/#how-do-i-run-multiple-instances-of-zigbee2mqtt).
Did anyone else have any issues?
@@smart_home_australiaI’m having an issue where even when following what you put in the config. both instances show the same information.
I had this issue as well. All existing devices were duplicated in the second zigbee2mqtt instance and the overview showed duplicated information for each device. Use an editor and add a folder, for example "zigbee2mqtt2" and then change the "data_path" in the addon configuration to match.
@@smart_home_australia Yes - after a day of messing around trying to get it working, I realised that the config folder was shared between the two instances. This meant that every device ended up having two sets of entities as they ultimately get added in both instances. I'd always end up with devices dropping in and out and loads of errors on the network. As soon as I killed my second instance and recreated it with a different config path AND changing the "master: pty,raw,echo=0,link=/tmp/ttyZ2M2,mode=777" setting to have a "2" after /tmp/ttyZ2M then everything ran properly. I think you do indeed have to change everything that can be unique to be unique or the instances of z2m will clash.
@@smart_home_australia yes for the folder part at least. It was impossible to start a second zigbee2mqtt on a second coordinator because it try to retrieve the backup from the old one
I change the folder to /config/zigbee2mqtt2 instead of /config/zigbee2mqtt and it has started without error (didn't try anything else for now)
Thanks, great tutorial. I want to add a 2nd z2m coordinator. I run the majority of supporting apps in containers on my Proxmox systems. I do this so that rebooting HA, does not affect MQTT, ESPHome, Z2M, Node-Red and so on. Also have better control overall. I did this a couple of years ago, service by service. This all started when influxdb add-on was having trouble and no fix was on the horizon. A little more work, but worth it.
Arhhh do you live in ShangraLa lol... Your setup sounds like the optimal for most home users, saleable, recoverable, potential for high availability and very resilient. The issue would be that to get to that level of sophistication would take alot of knowledge and effort and most want the outcome without working part time as a sys admin :)
Congrats on the setup, have you ever thought about making a video on how you did this?
@@smart_home_australia I like to tinker and keeps my mind active. I am not a content creator. Also do not have the space or equipment to do so.
@@JohnDoe1999-lg7mh Well congratulations, tinker or pro, you have a great system solution !!
nice! i think we need a video exploring more about hass ingress
This is my first exploration into Ingress, I wasn't aware of this functionality but am happy that I found it. I'll see what else I can include it into. :) thanks for the tip.
Awesome tutorial. Thanks for this!
Glad you enjoyed it, I particularly liked the Ingress function that before this I was not aware of.
Great walk through of this subject. I notice your adapters are running ezsp firmware. Are you getting the warning about ezsp being deprecated and replaced by ember in the next version of zigbee2mqtt? Are you having any issues with Z2M running ezsp?
Yes I get the warning message about ezsp, but they work perfectly. I'm just holding back until ember is 100%, then I'll switch across.
Hi, do you also have to change data_path: default is /config/zigbee2mqtt, for second one, for example /config/zigbee2mqtt2 ?
This was a topic earlier in the comments. I personally didn't and it worked perfectly. The differentiator is the base topic. But having done more research I would now suggest give it a unique data path also.
@@smart_home_australia will give it a go and see what happens..🙏
I literally had just spent 5 hours last week trying to figure this out lol
I ended up just using two different data paths and making two separate yaml files and that fixed all of my issues
After finishing your video I went back and changed my slave port to it was working fine before but I changed it to be safe
Well done !! It stumped me until I read about the trick with the URL's then it make perfect sense. Also the Ingress is pretty cool :)
Nice Video! How does this work with identical "data_path" for both instances?
In Zigbee2MQTT, the data path refers to the directory where the application stores its data, including the configuration file, state information, and any logs. As long as the base topic is different between instances, then leaving this as default is fine.
@@smart_home_australia So both instances write into the same configuration.yaml? Cannot believe, that this will work.
@@MaxReinhardt-wy7lz Yep. Its the base topic that provides the differentiator as part of the high-level key. Give it a try and see :) check out the discount codes in the video description for a 5% discount.
@@MaxReinhardt-wy7lz It doesn't. Change it for each instance. Also add a number after /tmp/ttyZ2M in the "master" option in socat.
@@insleys please do!
so for data_path, we didnt have to change it from default /config/zigbee2mqtt? cause in the video the data_path is same between coordinator 1 and 2
Thats correct. Its the base topic that differentiates the integrations.
@@smart_home_australia No, it isn't! An other/different data_path/folder like /config/zigbee2mqtt_xy is essential. If not, the already learned zigbee-devices are duplicated in both sessions.
@@matthiaszeise9916 is correct. I spent a day trying to work out what was going wrong, and it was this. See my other comments for more. Dang, I might have to make a video. 🙂
@@insleys 😃
@@insleys th-cam.com/video/7IEXb0u-VGw/w-d-xo.html