Hi all, this is a re-write of a different post. I have done a lot to test.
Basically, I’m not able to subscribe to topics I see is available om MQTT Server.
This is what I’ve done:
- Deleted entire MQTT Add-on
- Removed MQTT from ‘configuration.yaml’
- Rebooted HA
- Created a new user in HA called “mqttuser” with pwd “password” (as an example)
- Re-installed Mosquitto Add-on, using default configuration (nothing changed)
- Configuration->Integration, clicked the new MQTT Integration and also selected ‘Discovery’
- Not added anything about MQTT in ‘configration.yaml’
Remotely I have a RPi with an MQTT client publishing data to my HA server with Mosquitto.
I can see in the logs there connection, here is an example:
1561459571: New client connected from 192.168.11.112 as kontor6488 (c1, k60, u'mqtt_thestigh').
1561459571: Client kontor6488 disconnected.
1561459571: New connection from 192.168.11.112 on port 1883.
[INFO] found mqtt_thestigh on Home Assistant
1561459571: New client connected from 192.168.11.112 as kontor6490 (c1, k60, u'mqtt_thestigh').
1561459571: Client kontor6490 disconnected.
If I start an SSH session to HA and run following, I get nothing:
mosquitto_sub -h 127.0.0.1 -u mqttuser -P password -v -t location/kontor
If I then change it and run like this, I see the publications from the remote MQTT:
mosquitto_sub -h 127.0.0.1 -u mqttuser -P password -v -t location/#
To confirm, I tested with MQTT-Explorer and can also here see the topic:
The really strange thing, is if I in HA SSH change back to:
mosquitto_sub -h 127.0.0.1 -u mqttuser -P password -v -t location/kontor
… and within MQTT-Explorer make a publish:
… I can see the message in SSH
What is wrong, can anybody please help me?