David
My feedback
2 results found
-
2 votesDavid shared this idea ·
-
31 votes
This is an idea to include XBMC support inside of InControl. If you are intersted in this plugin, please leave us a comment with the interaction you would like between InControl and XBMC.
An error occurred while saving the comment An error occurred while saving the comment David commentedI think it might be easier to make an add-on for XBMC to list devices and or execute scenes when the player starts, is paused, is resumed, or ends. I have this working on a PC os (laptop running XBMC) but I am having issues with lights coming back up on Android stick running XBMC when player is paused, ends, or is stopped.
However, I'm not sure what you have in mind. I like both InControl and XBMC. Getting the two to work together would be awesome.
I have fixed issues with my script to allow XBMC to send commands to InControl. This script will dim lights when player starts playing a movie, is paused, or stopped or ends. You will need to create three scenes: PlayMoive, PauseMovies, and StopMovie for the lights you wish to control when using XBMC.
Place the following script in a folder called scripts in the XBMC root directory also you will need to add or create the script autoexec.py under the userdata directory:
example:
____________________________________
import os
import xbmc
xbmc.executescript('special://home/scripts/playeraction.py')
____________________________________
This is the playeraction script in the scripts folder. Edit the IP address to the IP of the machine on your network running InControl. I added notifications these can be commented out by placing adding a # the start of lines that start with xbmc.executebuiltin
____________________________________
import xbmc,xbmcgui
import urllib2
import subprocess,os
class MyPlayer(xbmc.Player) :
def __init__ (self):
xbmc.Player.__init__(self)
def Paused(self):
xbmc.Player.pause()
xbmc.executebuiltin('Notification(Player Paused 1,Increase lights - Video: %d 1,5000,special://home/scripts/1.png)'%(VIDEO))
urllib2.urlopen('http://192.168.1.5:1178/zwave/activateSceneGet?sceneName=PauseMovie')
def onPlayBackStarted(self):
if xbmc.Player().isPlayingVideo():
VIDEO = 1
xbmc.log("Movie is playing time to turn off the lights")
xbmc.executebuiltin('Notification(Player Started,Dimming lights - Video: %d,5000,special://home/scripts/1.png)'%(VIDEO))
urllib2.urlopen('http://192.168.1.5:1178/zwave/activateSceneGet?sceneName=PlayMovie')
def onPlayBackEnded(self):
VIDEO = 0
xbmc.log("The movie has ended time to turn on the lights")
xbmc.executebuiltin('Notification(Player Ended,Increase lights - Video: %d,5000,special://home/scripts/1.png)'%(VIDEO))
urllib2.urlopen('http://192.168.1.5:1178/zwave/activateSceneGet?sceneName=StopMovie')
def onPlayBackStopped(self):
VIDEO = 0
xbmc.log("Movie is stopped time to turn on the lights")
xbmc.executebuiltin('Notification(Player Stopped,Increase lights - Video: %d,5000,special://home/scripts/1.png)'%(VIDEO))
urllib2.urlopen('http://192.168.1.5:1178/zwave/activateSceneGet?sceneName=StopMovie')
def onPlayBackPaused(self):
if xbmc.Player().isPlayingVideo():
VIDEO = 0
xbmc.log("Movie is paused time to turn up the lights")
xbmc.executebuiltin('Notification(Player Paused,Increase lights - Video: %d,5000,special://home/scripts/1.png)'%(VIDEO))
urllib2.urlopen('http://192.168.1.5:1178/zwave/activateSceneGet?sceneName=PauseMovie')
def onPlayBackResumed(self):
if xbmc.Player().isPlayingVideo():
VIDEO = 1
xbmc.log("Movie is resumed time to turn down the lights")
xbmc.executebuiltin('Notification(Player Resumed,Dimming lights - Video: %d,5000,special://home/scripts/1.png)'%(VIDEO))
urllib2.urlopen('http://192.168.1.5:1178/zwave/activateSceneGet?sceneName=PlayMovie')
Player=MyPlayer()
VIDEO = 0
while(1):
if xbmc.Player().isPlaying():
if xbmc.Player().isPlayingVideo():
VIDEO = 1
else:
VIDEO = 0
xbmc.sleep(1000)