I am using the embedded mqtt. I have added the following to the configuration.yaml file:
mqtt:
switch:
platform: mqtt
name: “Bedroom Switch”
state_topic: “test/light2”
command_topic: “test/light2/set”
availability_topic: “test/light2/available”
payload_on: “ON”
payload_off: “OFF”
optimistic: false
qos: 0
retain: true
I ran the CHECK CONFIG and it reported Valid.
When I restart HA i get the message INVALID CONFIG:
The following components and platforms could not be set up:
mqtt
switch.mqtt
Please check your config
What am I doing wrong?
xbmcnut
(xbmcnut)
August 22, 2017, 6:42am
2
ramsbod:
What am I doing wrong?
Have you added a MQTT line to your configuration.yaml too? MQTT - Home Assistant .
xbmcnut
(xbmcnut)
August 22, 2017, 8:27pm
4
ramsbod:
Yes I added mqtt:
Did you install the MQTT add-on and did you use a username and password?
Yes I installed the Mosquito add on but I can’t remember if I used a username and password. I don’t think I did. I have one esp8266 device which reported it connected to mqtt and I didn’t use a username and password to set it up I just put in the IP address of the home assistant raspberry pi.
xbmcnut
(xbmcnut)
August 23, 2017, 8:49pm
6
You should add MQTT this way then:
mqtt:
broker: localhost
port: 1883
client_id: hassio
keepalive: 60
username: redacted
password: redacted
protocol: 3.1.1
edil10
September 2, 2017, 8:28pm
7
Hi,
I am struggling trying to figure out how to create an user to MQTT in Hassio.
Could you please, help me pointing the directions?
Thanks!
edil10
September 2, 2017, 11:32pm
8
I figured it out!
You should add the username and password in Hass.Io \ Mosquitto broker \ Options.
arretx
(Jon Griffith)
October 27, 2017, 4:47am
9
How? I see the config, but it’s cryptic. Where is there a username and password option?