No matching param...
Closed this issue · 2 comments
Hi guys
please tell me what I am doing wrong here...
I have several Raspi's running mqtt-launcher and they all run fine - except one.
This is launcher.conf:
logfile = 'logfile'
mqtt_broker = '192.168.1.120'
mqtt_port = 1883
mqtt_clientid = 'dashxxx384756934'
mqtt_username = ''
mqtt_password = ''
topiclist = {
# topic payload value program & arguments
"dashboard/screen" : {
'off' : [ '/home/pi/mqtt-launcher/rpi_hdmi_off.sh' ],
'on' : [ '/home/pi/mqtt-launcher/rpi_hdmi_on.sh' ],
},
}
When I send e.g topic: dashboard/screen message: off I see in the logfile:
2021-01-05 21:44:28,856 Starting
2021-01-05 21:44:28,857 DEBUG MODE
2021-01-05 21:44:28,868 Connected to MQTT broker, subscribing to topics...
2021-01-05 21:44:35,675 dashboard/screen 0 off
2021-01-05 21:44:35,681 No matching param (off) for dashboard/screen
2021-01-05 21:52:16,936 dashboard/screen 0 off
2021-01-05 21:52:16,937 No matching param (off) for dashboard/screen
I used mosquitto_pub, MQTT Eplorer and Home Assistant to send the message, always the same.
I copied a working launcher.conf from one of the other Raspi's, no change... I downloaded the current mqtt-launcher.py - you guessed it - same. These Raspi's are all running on Rasbian Stretch.
What am I doing wrong here?
Please show me your mosquitto_pub
invocation (without passwords). What I see in your log is a payload of 0 off
which is not what you've configured.
Hi JP,
thanks for coming back to me and thanks for sharing this great software.
After a few more restarts it seems to work again. My problem was that most of the time I am using MQTT-Explorer for testing. Interestingly on this one Raspi it does not behave... No idea why and that's not so important at the moment.
The number that you see (0 in my example) seems to be the QOS. From Home Assistant I send:
# Dashboard
- platform: mqtt
name: "Dashboard"
command_topic: "dashboard/screen"
qos: 1
payload_on: "on"
payload_off: "off"
retain: false
and it shows "dashboard/screen 1 on". I haven't tested that further but it makes sense to me.
Hermann