From 2c91a2beb18f70f08f1612fb9a404b2262ba74b5 Mon Sep 17 00:00:00 2001 From: elrodro83 Date: Sun, 1 Feb 2015 11:39:22 -0300 Subject: [PATCH] HA script: broadcast UDP events by default --- .gitignore | 3 +++ resources/ha_scripts/home_automation.py | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..06e2f6c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/.settings/ +/.project +/.pydevproject diff --git a/resources/ha_scripts/home_automation.py b/resources/ha_scripts/home_automation.py index 3aa8316..55bebc1 100644 --- a/resources/ha_scripts/home_automation.py +++ b/resources/ha_scripts/home_automation.py @@ -75,90 +75,112 @@ def activate_on( self, trigger = None ): utils.log( " - [ home_automation.py ] - Trigger %s" % trigger, xbmc.LOGNOTICE ) # Script Start if trigger == "Script Start" and ha_settings[ "ha_script_start" ]: + utils.broadcastUDP( "CE_Automate
  • script_start" ) # place code below this line pass # Trivia Intro elif trigger == "Trivia Intro" and ha_settings[ "ha_trivia_intro" ]: + utils.broadcastUDP( "CE_Automate
  • trivia_intro" ) # place code below this line pass # Trivia elif trigger == "Trivia" and ha_settings[ "ha_trivia_start" ]: + utils.broadcastUDP( "CE_Automate
  • trivia_start" ) # place code below this line pass # Trivia Outro elif trigger == "Trivia Outro" and ha_settings[ "ha_trivia_outro" ]: + utils.broadcastUDP( "CE_Automate
  • trivia_outro" ) # place code below this line pass # Movie Theatre Intro elif trigger == "Movie Theater Intro" and ha_settings[ "ha_mte_intro" ]: + utils.broadcastUDP( "CE_Automate
  • movie_theatre_intro" ) # place code below this line pass # Coming Attractions Intro elif trigger == "Coming Attractions Intro" and ha_settings[ "ha_cav_intro" ]: + utils.broadcastUDP( "CE_Automate
  • coming_attractions_intro" ) # place code below this line pass # Trailer elif trigger == "Movie Trailer" and ha_settings[ "ha_trailer_start" ]: + utils.broadcastUDP( "CE_Automate
  • trailer" ) # place code below this line pass # Coming Attractions Outro elif trigger == "Coming Attractions Outro" and ha_settings[ "ha_cav_outro" ]: + utils.broadcastUDP( "CE_Automate
  • coming_attractions_outro" ) # place code below this line pass # Feature Presentation Intro elif trigger == "Feature Presentation Intro" and ha_settings[ "ha_fpv_intro" ]: + utils.broadcastUDP( "CE_Automate
  • feature_intro" ) # place code below this line pass #3D Intro elif trigger == "3D Intro" and ha_setting [ "ha_3d_intro" ]: + utils.broadcastUDP( "CE_Automate
  • 3d_intro" ) # place code below this line pass #3D Trailers elif trigger == "3D Movie Trailer" and ha_setting [ "ha_3d_trailer" ]: + utils.broadcastUDP( "CE_Automate
  • 3d_trailer" ) # place code below this line pass #3D Outro elif trigger == "3D Outro" and ha_setting [ "ha_3d_outro" ]: + utils.broadcastUDP( "CE_Automate
  • 3d_outro" ) # place code below this line pass # MPAA Rating elif trigger == "MPAA Rating" and ha_settings[ "ha_mpaa_rating" ]: + utils.broadcastUDP( "CE_Automate
  • mpaa_rating" ) # place code below this line pass # Countdown elif trigger == "Countdown" and ha_settings[ "ha_countdown_video" ]: + utils.broadcastUDP( "CE_Automate
  • countdown_video" ) # place code below this line pass # Audio Format elif trigger == "Audio Format" and ha_settings[ "ha_audio_format" ]: + utils.broadcastUDP( "CE_Automate
  • audio_video" ) # place code below this line pass # Movie elif trigger == "Movie" and ha_settings[ "ha_movie" ]: + utils.broadcastUDP( "CE_Automate
  • movie_start" ) # place code below this line pass # Feature Presentation Outro elif trigger == "Feature Presentation Outro" and ha_settings[ "ha_fpv_outro" ]: + utils.broadcastUDP( "CE_Automate
  • feature_outro" ) # place code below this line pass # Movie Theatre Intro elif trigger == "Movie Theatre Outro" and ha_settings[ "ha_mte_outro" ]: + utils.broadcastUDP( "CE_Automate
  • movie_theatre_outro" ) # place code below this line pass # Intermission elif trigger == "Intermission" and ha_settings[ "ha_intermission" ]: + utils.broadcastUDP( "CE_Automate
  • intermission" ) # place code below this line pass # Script End elif trigger == "Script End" and ha_settings[ "ha_script_end" ]: + utils.broadcastUDP( "CE_Automate
  • script_end" ) # place code below this line pass # Paused elif trigger == "Pause" and ha_settings[ "ha_paused" ]: + utils.broadcastUDP( "CE_Automate
  • paused" ) # place code below this line pass # Resumed elif trigger == "Resume" and ha_settings[ "ha_resumed" ]: + utils.broadcastUDP( "CE_Automate
  • resumed" ) # place code below this line pass else: