Skip to content

macbury/mqtt2notification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install

Download newest version from https://github.com/macbury/mqtt2notification/releases and place it in Applications directory

How it works

https://www.youtube.com/watch?v=JfGdwLK64co&feature=youtu.be

Mqtt message format

Publish valid json to mqtt topic:

{ "title": "Title of notification", "message": "Content of message" }

Integrating with HomeAssistant

Ensure that you have https://home-assistant.io/components/mqtt/ configured! Copy home-assistant/custom_components/notify/mqtt2notification.py to your <config-dir>/custom_components/notify/ directory and add mqtt2notification platform in <config>/configuration.yaml file:

mqtt:

notify:
  - name: mqtt2notification
    platform: mqtt2notification
    topic: living_room/notifications

Build

pip install -r requirements.txt
bin/build
bin/run

Caveats

To enable actions on the notification (the buttons that allow the user to select an option), open System Preferences > Notifications, select mqtt2notification in the sidebar, and select the "Alerts" alert style. Enable alerts in System Preferences

Icons from

https://www.iconfinder.com/icons/2246841/bell_notification_one_notification_tiwtter_icon#size=128 https://www.iconfinder.com/icons/2236309/alert_bell_notification_twitter_icon#size=128