Solved xbmc-send resets idle timer -> no shutdown - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52) +---- Thread: Solved xbmc-send resets idle timer -> no shutdown (/showthread.php?tid=172801) |
xbmc-send resets idle timer -> no shutdown - schapplm - 2013-09-05 I currently have problems with automatic idle shutdown in XBMC I set the timer in xbmc to shutdown after 15 min. Additionally I run a cron-script every 5 min to check if
Code: xbmc-send --action="XBMC.AllowIdleShutdown" Code: xbmc-send --action="XBMC.InhibitIdleShutdown" Is there any workaround other than setting the cron-script-intervall greater than the xbmc shutdown idle timer? Setting both timers to 5min worked, but I want timeouts like mentioned above. There seem to be two opinions on how to call xbmc-send with idleshutdown: with true/false argument (http://forum.xbmc.org/showthread.php?tid=171659) or without (http://wiki.xbmc.org/index.php?title=List_of_built-in_functions). RE: xbmc-send resets idle timer -> no shutdown - artrafael - 2013-09-05 (2013-09-05, 09:29)schapplm Wrote: There seem to be two opinions on how to call xbmc-send with idleshutdown: with true/false argument (http://forum.xbmc.org/showthread.php?tid=171659) or without (http://wiki.xbmc.org/index.php?title=List_of_built-in_functions). You can issue the xbmc-send command manually from a terminal session and then checking the shutdown menu to see if the option changes from "Inhibit idle shutdown" to "Allow idle shutdown" and vice versa to determine which version actually works. RE: xbmc-send resets idle timer -> no shutdown - schapplm - 2013-09-05 Quote:You can issue the xbmc-send command manually from a terminal session and then checking the shutdown menu to see if the option changes from "Inhibit idle shutdown" to "Allow idle shutdown" and vice versa to determine which version actually works.Ok it took me some time to figure out, that the option inhibit/allow shutdown is not available in the Aeon Nox skin but in Confluence. It seems you have to use true/false, like in Confluence Source Code. Code: xbmc-send --action="XBMC.InhibitIdleShutdown(true/false)" Now only the second problem remains: Every use of xbmc-send seems to set the idle timer to zero. Has anyone experience with this behaviour? Edit: I forgot to mention that i use XBMC 12.2 Frodo on Ubuntu 12.04.3 LTS. RE: xbmc-send resets idle timer -> no shutdown - artrafael - 2013-09-05 I believe that's normal. RE: xbmc-send resets idle timer -> no shutdown - schapplm - 2013-09-05 Ok thank you. I will try and arrange with this by setting the timers somehow. Realized now, that this was a toppic a few days earlier. http://forum.xbmc.org/showthread.php?tid=171659. Closed. RE: xbmc-send resets idle timer -> no shutdown - schapplm - 2013-09-05 I changed the cron-script so that it should work now: /usr/bin/idleshutdown_cron.sh Code: #!/bin/bash for interested readers who have gone this far /usr/bin/checkshutdown.sh Code: #!/bin/bash RE: xbmc-send resets idle timer -> no shutdown - Freeze - 2016-08-31 How to get this working in Libreelec? I don't use Mythtv, I will use it only for 3 RPi with LE7, one as a server and two clients. If one or both client are connected, the server should not shutdown. Otherwise after 5 or more minutes. Running smb share and the LAMP addon on the server RPi. This is for my car, only for music and movies for the childrens, so the server with external HDD should not run all the time to save battery power. Any help would be great. Thank you. RE: xbmc-send resets idle timer -> no shutdown - notlistening - 2017-01-12 Run this in your autostart.sh in the .config folder like this: nohup script_name.sh & #/bin/sh IDLE_SHUTDOWN_ALLOWED_LAST_STATE=-1 while true do KODI_RUNNING=`ps -A | grep kodi.bin | grep -v grep | wc -l` if [ 1 == $KODI_RUNNING ] ; then SSH_ACTIVE=`netstat -tnpa | grep 'tcp.*:22.*ESTABLISHED.*' | wc -l` NFS_ACTIVE=`netstat -tnpa | grep 'tcp.*:111.*ESTABLISHED.*' | wc -l` SMB_ACTIVE=`netstat -tnpa | grep 'tcp.*:445.*ESTABLISHED.*' | wc -l` [ $SSH_ACTIVE -gt 0 -o $NFS_ACTIVE -gt 0 -o $SMB_ACTIVE -gt 0 ] && IDLE_SHUTDOWN_ALLOWED=1 || IDLE_SHUTDOWN_ALLOWED=0 if [ $IDLE_SHUTDOWN_ALLOWED_LAST_STATE != $IDLE_SHUTDOWN_ALLOWED ] ; then IDLE_SHUTDOWN_ALLOWED_LAST_STATE=$IDLE_SHUTDOWN_ALLOWED kodi-send --action="AllowIdleShutdown" if [ 0 == $IDLE_SHUTDOWN_ALLOWED ] ; then kodi-send --action="InhibitIdleShutdown(false)" else kodi-send --action="InhibitIdleShutdown(true)" fi fi fi sleep 60 done |