Home

Awesome

MQTT2NotifySend

🌉Bridge between MQTT and 🖥️Freedesktop.org Notify-Send desktop notifications (Ubuntu & other distros)🐧, to send notifications to your desktop over MQTT.

Getting started

# Dependencies are: libnotify-bin, mosquitto-clients, jq, coreutils
sudo apt install libnotify-bin mosquitto-clients jq coreutils

# Download the script & set as executable (optional)
curl -O https://raw.githubusercontent.com/David-Lor/MQTT2NotifySend/master/mqtt2notifysend.sh
chmod u+x mqtt2notifysend.sh

# Run!
./mqtt2notifysend.sh -h localhost -t notifications

# Send a message to the broker from other terminal window
mosquitto_pub -h localhost -t notifications -m "{\"title\": \"Custom notification\", \"text\": \"Hello world\"}"

Environment variables

Certain settings can be tweaked using the following environment variables:

Usage:

LOG_ENABLE=true RECONNECTION_DELAY=1 DEFAULT_TITLE="Very important notification" DEFAULT_LEVEL=critical \
    bash mqtt2notifysend.sh -h localhost -t notifications

Changelog

TODO