denschu / mqtt-exec

Execute shell command on MQTT messages
37 stars 6 forks source link

Using MQTT payload with commands? #1

Open bjornhallberg opened 10 years ago

bjornhallberg commented 10 years ago

Is it possible to read and use the actual payload with shell commands?

Like if you're reading a temperature sensor or some such and want to pass its data on to some other script: curl -s "http://url/?value=[payload]" &

denschu commented 10 years ago

At the moment it's not possible. I would prefer to publish the temperature to MQTT with retained messages like in this project: https://github.com/denschu/mqtt-temperature

bjornhallberg commented 10 years ago

Ok I understand. I wanted to see if I could use the script to push all sorts of sensor data (switches, temp, humidity, motion etc etc) from MySensors.org's MQTT Gateway to Domoticz and their JSON API. It's not an ideal situation, I know.