I’m having really hard time using hassio with MQTT. Messages are being published by devices to the bus but hassio itself doesn’t seem to register them in any way.
Details:
hassio 0.93.2 /RPi (reproduced on VIrtualBox VM)
using MQTT Server & Web client 1.10 (switched from official Mosquitto in search of a solution of this same problem)
example setup in configuration.yaml:
1559235438: Sending PUBACK to auto-6F8FA606-C03D-D8BC-2897-DE92CCA98F36 (m1575, rc0)
However there’s no trace of acknowledgement in hassio - the light stays off, other mqtt entities also don’t work. Nor does the dev-mqtt publish service.
Any help would be greatly appreciated!
Sorry for the sloppy formatting. Let me try to elaborate.
I do have other devices that are sending messages to the broker (but tried to limit the post to a simple example).
Messages are successfully pushed (so not an ACL issue) and I can subscribe to the topics via i.e. HiveMQ or mosquitto_sub (so not a device->broker issue) which is basically what you’ve suggested and I can see all messages.
I have tried mosquitto add-on and then the mosquitto+client add-on (so multiple brokers).
Hopefully I am understanding your question. I am using the hassio mqtt broker. Here is an example of one of my working config.yaml mqtt subscribe code:
I’m not using an mqtt broker definition in configuration.yaml. I’m using the integration functionality which is working without obvious errors and is generating a valid (AFAICT) entry in /config/.storage/core.config_entries:
the example I’ve shown is a dummy entity I created in order to eliminate the possibility that the error is in the device itself. so not connected to a light, although I do have some lights I can experiment with.
In reality I’m using i.e. an alarm panel and some 10-odd PIRs that successfully push messages to the to broker on the topics I configure for them.
My problem is I can see the messages by subscribing to the topic, I can see the messages in the broker logs (pls see the original post) but the entities defined in HA are not triggered. Even the dev-mqtt service doesn’t seem to be working, so its definitely an issue in HA.
Integrations are done via the HA GUI (Configuration->Integrations, then MQTT from the long list). Once you do that an entry gets created in /config/.storage/core.config_entries. You can browse your file using the Configurator add-on, just look for the .storage folder.
As for the mqtt message in the broker here’s an example 2019-05-31 16:42:46Topic: /some/light/switchQos: 1Retained OFF
Thanks, adding the mqtt: configuration to configuration.yaml seems to fix things for the dummy light.
I have a lovelace light card setup for it and now it changes icons depending of the ON/OFF msg I sent to the broker.
Now I’ll be off to fixing my other entities