Issue with Alarm and python
#1
I have created a script that will turn my monitor off. I know xbmc has a built in command to put the system in suspend or hibernate but I wanted all of my other programs to continue running. I know the script works as I can execute it from the scripts window and the screen will instantly go black. I am trying to set it up so that when I set the shutdown timer it will execute the script when the timer runs out. Here is the code I am using.

Code:
<item id="8">
        <description>Shutdown Timer</description>
        <label>TIMER</label>
            <onclick>XBMC.AlarmClock(shutdowntimer,XBMC.RunScript(Q:/scripts/system/monitoroff.py))</onclick>  
      </item>

I have tested this several times by setting the alarm for 1-2 minutes. After the time has definitely passed and nothing happened I opened the shutdowntimer again thinking that something had gone wrong. I re-set the timer for 1-2 minutes and hit enter. At this point the screen instant goes black. In other words, the script is not actually running until the timer has expired, then I open the dialogue box again, enter a new time and hit enter. Then the script runs instantly. I can reproduce it every time.

I am running XBMC for windows compiled Jan 13th. I was planning on setting up something similar for my Linux box as well. I will test that and see if the same issue occurs. Anyone else have any thoughts?
Reply
#2
Yeah, NEVER troubleshoot a script using the latest version of any software. You want to use the last known CONFIRMED working version. Try running the script on a pre-Atlantis version of XBMC and see if you get identical results. Maybe there were some SVN changes in the later versions that affect functionality of the script in which case you'll have to do some reading to see what the syntax changes were. Then you might get some direction as what to check next. Change your variables one at a time and you'll get your answer.

Wink
Reply
#3
Yeah, it is reproducable on my linux machine as well. Must be a bug. I filed a bug report here
Reply

Logout Mark Read Team Forum Stats Members Help
Issue with Alarm and python0