Skip to content
This repository has been archived by the owner on Dec 12, 2019. It is now read-only.

Subscribes to a MQTT topic then displays the messages on XBMC using a custom popup or the built in XBMC notification system.

License

Notifications You must be signed in to change notification settings

matbor/mqtt2xbmc-notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XBMC-MQTT-notification-system

Subscribes to a MQTT topic and will display the messages on XBMC using custom popup or the built in XBMC notification system, if the message is formated correctly.

Typical format of the MQTT message that needs to be sent to topic.

{"lvl":"1","sub":"xxxxxx","txt":"xxxxxx","img":"xxx","delay":"10000"}

lvl -- Message level; a  "1"  uses the custom larger popup, a "2"  uses the xbmc built in notification. (see screenshots below)
sub -- subject of message
txt -- main body of text, needs to be less than 150 characters for the custom larger popup
img -- ?? pixels, transparent background, location and name, eg. special://masterprofile/Thumbnails/xxx_1.png
delay -- show message for this long, in miliseconds

##Installation;

##Notes;

##Example: ###Startup

This shows that it has connected successfully to the broker.

Startup

###Level-1 Message

Custom pop-up

JSON string sent to topic;

{"lvl":"1","sub":"@CFA_Updates","txt":"Visiting NSW's tomorrow? Monitor fire conditions. Follow @nswrfs and remember many parks & reserves closed http://www.environment.nsw.gov.au/NationalParks/FireClosure.aspx #nswfires","img":"special://masterprofile/Thumbnails/cfa.png","delay":"20000"}

level1msg

###Level-2 Message

Using bulit-in XBMC notification system

JSON string sent to topic;

{"lvl":"2","sub":"@CFA_Updates","txt":"Visiting NSW's tomorrow? Monitor fire conditions. Follow @nswrfs and remember many parks & reserves closed http://www.environment.nsw.gov.au/NationalParks/FireClosure.aspx #nswfires","img":"special://masterprofile/Thumbnails/cfa.png","delay":"20000"}

level2msg

##todo;

  • need to change to a xbmc addon with config settings, currently just using the autoexec.py and modifying settings in script.
  • deal with the odd ascii characters, typical only has issues on the internal xbmc notification system
  • handle the exiting of XBMC, by killing this script nicely... will this effect will_set >? atm xbmc forces a kill
  • add back in reporting of playback status, play/stop/pause/resume/now playing
  • fix so it works with latest version of mosquitto.py
  • remove all the lazy print statements and use the xbmc logging system

About

Subscribes to a MQTT topic then displays the messages on XBMC using a custom popup or the built in XBMC notification system.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages