Hello,
I’ve setup a pi3b+ and I’m unable to get MQTT working. I subscribe to the broker and get a connection. I publish messages but never see them.
From the addons repo I installed “MQTT Server & Web client”
Here’s the config
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
broker: true
allow_anonymous: false
mqttusers:
- username: Squee
password: xxxxxxx
readonly: false
topics:
topics:
- ‘#’
- presence/hassio/jay/
- presence/hassio/dawn/
log_level: debug
I installed the mosquito-tools package on my linux box to test with.
I subscribe to the broker using this:
jay@jay-desktop:~/.config$ mosquitto_sub -d -t presence/hassio/jay/
Client mosqsub|12672-jay-deskt sending CONNECT
Client mosqsub|12672-jay-deskt received CONNACK
Client mosqsub|12672-jay-deskt sending SUBSCRIBE (Mid: 1, Topic: presence/hassio/jay/, QoS: 0)
Client mosqsub|12672-jay-deskt received SUBACK
Subscribed (mid: 1): 0
Then try a publish using this:
jay@jay-desktop:~/.config$ mosquitto_pub -d -m foobar -t “presence/hassio/jay/”
Client mosqpub|19771-jay-deskt sending CONNECT
Client mosqpub|19771-jay-deskt received CONNACK
Client mosqpub|19771-jay-deskt sending PUBLISH (d0, q0, r0, m1, ‘presence/hassio/jay/’, … (6 bytes))
Client mosqpub|19771-jay-deskt sending DISCONNECT
The six byte test message isn’t shown on the linux box or in the hivemq web client.
I put the server information in a config file for both pub and sub. They’re identical:
jay@jay-desktop:~/.config$ more mosquitto_pub
-h 192.168.1.234
-P xxxxx
-u Squee
The addon log viewer shows a connection:
1581001225: New connection from 192.168.1.120 on port 1883.
1581001225: New client connected from 192.168.1.120 as mosqpub|19771-jay-deskt (p1, c1, k60, u’Squee’).
Any suggestions?
I saw some messages about an ACL list but that appears to be for a previous/different version of hass.
Thanks,
Jay
System info:
Home Assistant 0.103.4
Path to configuration.yaml: /config
|arch |armv7l|
|dev |false|
|docker |true|
|hassio |true|
|os_name |Linux|
|python_version |3.7.5|
|timezone |CST6CDT|
|version |0.103.4|
|virtualenv |false|