I’m a bit out of my depth with this, but I decided to try and see what I could do. I have a detached building that I want to setup a second zigbee and zwave coordinator for. I grabbed an older pi 3b, installed docker on it and loaded a zwave container. That worked well and I now see my second zwave controller in HA. I’m now attempting to do the same thing for zigbee2mqtt and failing.
In HA today, I have the integration for ZHA, not zigbee2mqtt, but didn’t think this would be a problem. On my pi 3b, I pulled the koenkk/zigbee2mqtt image, and tried to set it up. I get to the onboarding page and enter the details for my HA server on my lan, and a new user that I setup in the HA Users page specific for this use case. Then after saving that, the logs in docker show this:
I’ve never really tried to communicate with my HA server on MQTT, at least, I don’t think so. I downloaded MQTT Explorer * and tried to connect, but it just says “disconnected from server” when I try to connect.
Firstly, is my idea of setting up a docker version of zigbee2mqtt to put in a different building a valid approach? Do I need to somehow enable the MQTT integration to listen to topics outside of the HA environment?
Thanks!
* not the HA add-on, the app on a different computer on the network
I do have the Mosquitto Add-on installed in HA, just at the default settings. I’m not sure how I get the external pi to communicate with it though. I was attempting to take the complexities of z2m out of the equation by using MQTT Explorer to test the connection.
With the Mosquitto Add-on, I should be able to use any external mqtt device, with the IP of my HA instance? I’m getting the connection refused very quickly.
You need to use the IP of your HA server on port 1883
so if your HA server is 10.1.1.42 then your mqtt broker is at
http://10.1.1.42:1883
You also have to use a username and password set up in either the add-on or home assistant. The home assistant user is the easiest way. Nothing to set up in the addon then.
This might just be a stupid mistake. I just noticed my add-on has it set at port 1885. I changed that in my pi z2m docker configuration file and it seems it now started up! Now I can try to figure out the next step.
I can confirm that this approach will work. Running it like this for about six months due to the fact that in my case ha is running as a vm in the basement so hardly any reach in the next floor level.
Thanks for the help. I did get my pi 3b setup and moved to the other building yesterday. Both z2m and zwave-js are running in Docker containers and communicating with my HA setup in Proxmox. That’s great because the zwave lock there has driven me nuts for far too long because of weak connection.
But the pi seems to randomly reboot. Not sure why, I’ll need to figure that out. Perhaps the two USB sticks are too power hungry for the adaptor, but it is a CanaKit 2.5A plug.