Skip to content

Instantly share code, notes, and snippets.

@koma5
Last active March 12, 2017 18:33
Show Gist options
  • Save koma5/5d5a06ecdcca86cf7bd41f275f2f921e to your computer and use it in GitHub Desktop.
Save koma5/5d5a06ecdcca86cf7bd41f275f2f921e to your computer and use it in GitHub Desktop.
lazy bash script to push to iPhone with prowl if 'tank full' on the mqtt topic 'vw/dehum/state'
mosquitto_sub -h mqtt -t 'vw/dehum/state' |
grep --line-buffered "tank full" |
xargs -d '\n' -n1 -I % curl -X POST --data 'apikey=<apikey>&event=%&application=vw/dehum' https://api.prowlapp.com/publicapi/add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment