I built a fresh Hassbian instance with the ambition of getting HA and SmartThings to talk two-way, so I can VPN into my HA and observe my home.
I built an MQTT bridge (as described here) in a Docker container on the same Pi as my HA instance.
The Docker container gave the MQTT bridge an IP address of 172...* and I can’t talk to that IP. I realised my first error was building the MQTT bridge on the same box as my HA, it should be on a seperate box with a seperate NIC, but how do I go about getting the MQTT docker container to be on my 192.168.0.0/24 network please?
I think, from memory, that you need net=host when you start the container to use the host network. If not that command it is something you add to the docker startup, so look in that documentation.
There are 2 instances of Docker created, MQTT and MQTT Bridge. I have no technical idea what the difference between them are, or why I need two, I blindly followed the guide.
Having heard that it’s a simple switch - -net=host, I don’t see any harm in me setting it on both dockers, MQTT Mosca and MQTT bridge. I will start them from scratch and try again
cheers. I’ve really got my knickers in a twist with this one. Now when i’m creating new docker containers with these options, it’s not going to download all the stuff any more from the web, it’s creating them instantly which is disconcerting.
OK I chose to do --net=host on the MQTT bridge, so I configured the SmartThings Device with the physical MAC of my machine which is hosting docker, and it’s IP address. No dice.
Then I read this below in the instructions…I’ve now no idea what docker to give what. If it was you which would you give the --net=host to? MQTT-bridge or MQTT?
The MQTT Bridge only needs to know where your MQTT broker lives. If you are using these docker commands as-is, edit /opt/mqtt-bridge/config.yml to look like this: