My home automation script only seems to trigger on movie start, nothing else.
The Movie start trigger works flawlessly.
* I have version v4.0.10 (latest, available through the add-on's).. Maybe add an explanation to the Wiki page how to use the latest version from github instead?!
* All home automation triggers are set to true (except 3D).
DialogVideoInfo.xml (relevant part):
Code:
<control type="button" id="14">
<description>Home Cinema Experience</description>
<include>ButtonInfoDialogsCommonValues</include>
<label>Cinema</label>
<onclick>Dialog.Close(MovieInformation)</onclick>
<onclick>Playlist.Clear</onclick>
<onclick>XBMC.RunScript(script.cinema.experience)</onclick>
</control>
home_automation.py (relevant parts):
Added:
(...)
Code:
# Movie
elif trigger == "Movie" and ha_settings[ "ha_movie" ]:.
# place code below this line
subprocess.check_call(["sudo","/home/pi/433mhzforrpi/kaku", "H", "1", "off"])
subprocess.check_call(["sudo","/home/pi/433mhzforrpi/kaku", "H", "2", "off"])
subprocess.check_call(["sudo","/home/pi/433mhzforrpi/kaku", "H", "3", "off"])
subprocess.check_call(["sudo","/home/pi/433mhzforrpi/kaku", "H", "4", "off"])
pass
# Feature Presentation Outro
elif trigger == "Feature Presentation Outro" and ha_settings[ "ha_fpv_outro" ]:
# place code below this line
pass
# Movie Theatre Intro
elif trigger == "Movie Theatre Outro" and ha_settings[ "ha_mte_outro" ]:.
# place code below this line
pass
# Intermission
elif trigger == "Intermission" and ha_settings[ "ha_intermission" ]:.
# place code below this line
pass
# Script End
elif trigger == "Script End" and ha_settings[ "ha_script_end" ]:.
# place code below this line
pass
# Paused
elif trigger == "Pause" and ha_settings[ "ha_paused" ]:.
# place code below this line
subprocess.check_call(["sudo","/home/pi/433mhzforrpi/kaku", "H", "1", "on"])
subprocess.check_call(["sudo","/home/pi/433mhzforrpi/kaku", "H", "2", "on"])
subprocess.check_call(["sudo","/home/pi/433mhzforrpi/kaku", "H", "3", "on"])
subprocess.check_call(["sudo","/home/pi/433mhzforrpi/kaku", "H", "4", "on"])
pass
# Resumed
elif trigger == "Resume" and ha_settings[ "ha_resumed" ]:.
# place code below this line
subprocess.check_call(["sudo","/home/pi/433mhzforrpi/kaku", "H", "1", "off"])
subprocess.check_call(["sudo","/home/pi/433mhzforrpi/kaku", "H", "2", "off"])
subprocess.check_call(["sudo","/home/pi/433mhzforrpi/kaku", "H", "3", "off"])
subprocess.check_call(["sudo","/home/pi/433mhzforrpi/kaku", "H", "4", "off"])
pass
else:
utils.log( " - [ home_automation.py ] - Opps. Something happened", xbmc.LOGNOTICE )
<EOF>
settings.xml:
<setting id="ha_3d_intro" value="false" />
<setting id="ha_3d_outro" value="false" />
<setting id="ha_3d_trailer" value="false" />
<setting id="ha_audio_format" value="true" />
<setting id="ha_cav_intro" value="true" />
<setting id="ha_cav_outro" value="true" />
<setting id="ha_countdown_video" value="true" />
<setting id="ha_enable" value="true" />
<setting id="ha_fpv_intro" value="true" />
<setting id="ha_fpv_outro" value="true" />
<setting id="ha_intermission" value="true" />
<setting id="ha_movie" value="true" />
<setting id="ha_mpaa_rating" value="true" />
<setting id="ha_mte_intro" value="true" />
<setting id="ha_mte_outro" value="true" />
<setting id="ha_multi_trigger" value="true" />
<setting id="ha_paused" value="true" />
<setting id="ha_resumed" value="true" />
<setting id="ha_script_end" value="true" />
<setting id="ha_script_start" value="true" />
<setting id="ha_trailer_start" value="true" />
<setting id="ha_trivia_intro" value="true" />
<setting id="ha_trivia_outro" value="true" />
<setting id="ha_trivia_start" value="true" />
Logging
I have the feeling that it occurs because of an error soon after starting a video through CinemaExperience.
Log file of this error:
http://pastebin.com/5NYLbPmG
Also, I notice that my trigger_list.txt only contains one entry, namely ['Movie']. Not sure if this means anything though..
Kodi version
Code:
19:34:42 T:3037995008 NOTICE: -----------------------------------------------------------------------
19:34:42 T:3037995008 NOTICE: Starting Kodi (14.0 Git:2014-12-24-e044d5a-dirty). Platform: Linux ARM 32-bit
19:34:42 T:3037995008 NOTICE: Using Release Kodi x32 build (version for Raspberry Pi)
19:34:42 T:3037995008 NOTICE: Kodi compiled Dec 24 2014 by GCC 4.7.1 for Linux ARM 32-bit version 3.2.21 (197141)
19:34:42 T:3037995008 NOTICE: Running on Raspbian GNU/Linux 7 (wheezy), kernel: Linux ARM 32-bit version 3.12.31
19:34:42 T:3037995008 NOTICE: FFmpeg statically linked, version: Frodo_alpha5-13937-ge044d5a-xbmc-2.4.4-Helix
19:34:42 T:3037995008 NOTICE: Host CPU: ARMv6-compatible processor rev 7 (v6l), 1 core available
19:34:42 T:3037995008 NOTICE: ARM Features: Neon disabled
19:34:42 T:3037995008 NOTICE: special://xbmc/ is mapped to: /opt/xbmc-bcm/xbmc-bin/share/xbmc
19:34:42 T:3037995008 NOTICE: special://xbmcbin/ is mapped to: /opt/xbmc-bcm/xbmc-bin/lib/kodi
19:34:42 T:3037995008 NOTICE: special://masterprofile/ is mapped to: /home/pi/.kodi/userdata
19:34:42 T:3037995008 NOTICE: special://home/ is mapped to: /home/pi/.kodi
19:34:42 T:3037995008 NOTICE: special://temp/ is mapped to: /home/pi/.kodi/temp
19:34:42 T:3037995008 NOTICE: The executable running is: /opt/xbmc-bcm/xbmc-bin/lib/kodi/kodi.bin
19:34:42 T:3037995008 NOTICE: Local hostname: raspbmc
19:34:42 T:3037995008 NOTICE: Log File is located: /home/pi/.kodi/temp/kodi.log
19:34:42 T:3037995008 NOTICE: -----------------------------------------------------------------------
By the way, I love cinemaexperience!
-Stu.