I configured MQTT to pass my Samsung SmartThings Things to my Home Assistant a few months ago but I didn’t complete it in HA, and haven’t yet managed to connect from HA to the MQTT.
I now have a hacked Sonoff and want to add it directly to Home Assistant but on the guide I used it mentioned adding the Sonoff to HA using MQTT.
Could someone help with firstly how I should edit Configuration.yaml to include my MQTT server, and secondly what the command would be to add the Sonoff to my Home Assistant please?
Being as you are using docker I’m not much help anymore. I tried docker a few weeks ago and gave up because I just couldn’t wrap my head around all the requirements (bind volumes, ports, SSL, proxies, etc).
What is the full log in HA aside from invalid config?
I am not sure if Docker is the issue or not, I have no idea what I set up inside the Docker container any more. From a combination of not understanding it at the time, and it being so long ago. Anyway I searched home-assistant.log and I found these references to MQTT:
2018-03-30 13:17:28 ERROR (MainThread) [homeassistant.setup] Error during setup of component mqtt
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py”, line 196, in _async_setup_component
result = yield from component.async_setup(hass, processed_config)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/mqtt/init.py”, line 399, in async_setup
success = yield from hass.data[DATA_MQTT].async_connect()
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/mqtt/init.py”, line 506, in async_connect
self._mqttc.connect, self.broker, self.port, self.keepalive)
File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.5/site-packages/paho/mqtt/client.py”, line 768, in connect
return self.reconnect()
File “/srv/homeassistant/lib/python3.5/site-packages/paho/mqtt/client.py”, line 895, in reconnect
sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))