Quick event notification thingie to respond to MQTT events; in my case, specifically for the doorbell so I can hear it with headphones on.
Should probably be easily adaptable to fit a more generalized need, and I'll probably do it at a later point.
| [Unit] | |
| Description=doorbell notification service | |
| [Service] | |
| ExecStart=/usr/local/bin/doorbell-notification.sh | |
| [Install] | |
| WantedBy=gnome-session-initialized.target |
| #!/bin/sh | |
| mosquitto_sub -t event/doorbell | while read time; do | |
| notify-send -i /usr/local/share/icons/openhab-logo-square.png "openHAB" "Doorbell rung at ${time}"; | |
| done |