XBMC on Pi: Add TV/monitor Power Save support when idle?
Milhouse, I asked on OSMC forums already but can you please give instructions on how to install this on OSMC please? Thanks very much!

****EDIT****
My solution, which seems to be working: Use systemd to start the service at boot (but waiting for Kodi to load!)

Install texturecache.py:
Code:
wget -q http://is.gd/XGXbTG -O ~/texturecache.py
chmod +x ~/texturecache.py

You can run this to test and see if it's working: (Add amount of seconds and/or & at the end of the line will tell it how many seconds to wait and send it in the background, respectively.)
Code:
~/texturecache.py @logfile= @xbmc.host=localhost @bin.tvservice=/opt/vc/bin/tvservice rbphdmi

Example 30 minutes:
~/texturecache.py @logfile= @xbmc.host=localhost @bin.tvservice=/opt/vc/bin/tvservice rbphdmi 1800

Example 30 minute and send to background:
~/texturecache.py @logfile= @xbmc.host=localhost @bin.tvservice=/opt/vc/bin/tvservice rbphdmi 1800 &

Create systemd timer & service files:
Code:
osmc@osmc:/etc/systemd/system$ cat texturecache.timer
[Timer]
OnBootSec=60

[Install]
WantedBy=multi-user.target
Code:
osmc@osmc:/etc/systemd/system$ cat texturecache.service
[Unit]
Description=Texturecache Daemon
After=mediacenter.service texturecache.timer

[Service]
User=osmc
Group=osmc

Type=simple
ExecStart=/usr/bin/python /home/osmc/texturecache.py @bin.vcgencmd=/opt/vc/bin/vcgencmd @logfile=/home/osmc/texturecache.systemd.log @xbmc.host=localhost @bin.tvservice=/opt/vc/bin/tvservice rbphdmi 1800 &
TimeoutStopSec=20

[Install]
WantedBy=multi-user.target

Both timer and service need to be enabled:
Code:
sudo systemctl enable texturecache.service
sudo systemctl enable texturecache.timer

If everything works right, the texturecache.timer waits 60 seconds after boot, then starts texturecache.service, which runs texturecache.py! This is my first time working with systemd so if you see something that needs fixing, please post it so I can fix mine.
/ OSMC on Raspberry Pi 3 / Kodi 17 RC / FireTV Stick /
Reply


Messages In This Thread
RE: XBMC on Pi: Add TV/monitor Power Save support when idle? - by leetwanker - 2015-04-29, 20:39
Logout Mark Read Team Forum Stats Members Help
XBMC on Pi: Add TV/monitor Power Save support when idle?1