Kodi Community Forum
Acer Revo Poweroff Python script - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+--- Thread: Acer Revo Poweroff Python script (/showthread.php?tid=92348)



Acer Revo Poweroff Python script - bigbas - 2011-01-27

Hi Guys

I am having issues with XBMC Live darma shutting down an Acer Revo from the menu, it just keeps scanning for new content.

http://forum.xbmc.org/showthread.php?tid=88821

I am not alone with this issue but am trying to fix it with a script/addon. I have tried to write a python script to poweroff the Acer Revo but cannot get it to work. I am new to Python so my script is basic and probably wrong. I can install the script as a addon through an xml file but it won't run.
Can someone help me please, i have been through the forums but couldnt find a direct answer.

thanks in advance, Python code below;

import os
os.system("sudo poweroff") # shutdown command


- bigbas - 2011-01-28

Bump, nobody willing to help me with 2 lines of code No


- Popeye - 2011-01-28

Could there be something about execution rights? On ubuntu you would have to enter the psswrd after a sudo command...


- bigbas - 2011-01-28

doh... thanks popeye, very obvious error


- vikjon0 - 2011-01-28

check the log to see what goes wrong.

BTW, this is not the most obvious way to fix the problem.

1) xbmc normal shutdown does not work. Possibly because of permission problems. => You dont know how to troubleshoot
2) You try to write a python script to shutwdown. Does not work possibly due to permission problem => you dont know how to troubleshoot.

Quicker to bite it and install xbmclive10, but what do I know.


- vikjon0 - 2011-01-28

but since you want to go that way, try to replace the xbmc shutdown command in the skin instead of going via a add-on&python

as discusssed here
http://forum.xbmc.org/showthread.php?tid=72223