Hello I’ve got a problem. I bought a nodemcu v3 and a dht22 temp/humidity sensor.
The nodemcu works great, it connects to the mqtt broker and sends the messages and Hassio recieves the messages. (i see it in the hassio addons mosquitto broker log)
But now the problem.
When I type this into my config:
sensor:
- platform: mqtt
state_topic: ‘bruh/sensornode1’
name: ‘Temperature’
unit_of_measurement: ‘°C’
value_template: ‘{{ value_json.temperature }}’ - platform: mqtt
state_topic: ‘bruh/sensornode1’
name: ‘Humidity’
unit_of_measurement: ‘%’
value_template: ‘{{ value_json.humidity }}’
I recieve that my config is invalid but it is exactly the same as on the home assistant web page.
Error on the home assistant UI:
The following components and platforms could not be set up:
mqtt
sensor.mqtt
Please check your config
and in the .log file:
OSError: [Errno 98] Address in use
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/hbmqtt/broker.py”, line 270, in start
loop=self._loop)
File “/usr/lib/python3.6/asyncio/streams.py”, line 113, in start_server
return (yield from loop.create_server(factory, host, port, **kwds))
File “uvloop/loop.pyx”, line 1363, in create_server (uvloop/loop.c:27511)
File “uvloop/loop.pyx”, line 882, in uvloop.loop.Loop._create_server (uvloop/loop.c:20003)
OSError: [Errno 98] error while attempting to bind on address (‘0.0.0.0’, 1883): address in use
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/components/mqtt/server.py”, line 48, in async_start
yield from broker.start()
File “/usr/lib/python3.6/site-packages/hbmqtt/broker.py”, line 291, in start
raise BrokerException(“Broker instance can’t be started: %s” % e)
hbmqtt.broker.BrokerException: Broker instance can’t be started: [Errno 98] error while attempting to bind on address (‘0.0.0.0’, 1883): address in use
2017-07-27 14:00:58 ERROR (MainThread) [homeassistant.components.mqtt] Unable to start MQTT broker.
2017-07-27 14:00:58 ERROR (MainThread) [homeassistant.setup] Setup failed for mqtt: Component failed to initialize.
2017-07-27 14:00:59 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of sensor.mqtt. Setup failed for dependencies: mqtt
2017-07-27 14:00:59 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.mqtt: Could not setup all dependencies.
2017-07-27 14:00:59 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of sensor.mqtt. Setup failed for dependencies: mqtt
2017-07-27 14:00:59 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.mqtt: Could not setup all dependencies.
I really need your help.
Thank you!
ps: I am new to home assistant and i am so sorry for my bad english.