Do the PVR manager react on Kodi "standby" state?
#16
Hi
based on your proposal I tried to figure out how @Kleinschmidts approach is working. I would need to find the 'Idle Actions' Add-On sources, learn, how to build and install add-ons, modify the source in the right way, and after all this I would have only (probably) a function, which maybe switches of the headless server after the idle time runs out.

But assuming that such a idle could easily been set to 2-3 hour to make sure that the system does not go off while watching, I always would have server running some additonal hours just for nothing.

That is not really what I'm looking for Confused

But coming again from the other side: The libCEC plugin has already a function, which shall allow to hibernate Kodi when the TV is switched off. This obviously does not happen on openElec. So is now more an openElec Bug or a missing Kodi feature? I'm lost in space, anyhow..
Reply
#17
BTW: Now I found it in written, that I can not read the CEC status via cec-clientwhile Kodi is running: https://github.com/Pulse-Eight/libcec/is...-141164482

So neither cec-lib nor Kodi allows me to switch the vdr-Server off. Sad
Reply
#18
So, finally I invented my own way of a brute force workaround, which at least works for network connected Smart TVs or if some network logic is power-supplied by the TVs USB- Stick (like a chromecast)

In the OpenElecs boot sequence (/storage/.config/autostart.sh), I start my own background script

Code:
(
/storage/pingsleepcontrol.sh
) &

which then scans periodically for the presence of the TV (or chromecast device) and starts or stops the Kodi process accordingly, which then finally, finally, finally let the headless vdr server fall asleep if not needed:

Code:
#!/bin/sh

while :; do
    # seaching for chromecast devices
    #avahi-browse -t -p -r _googlecast._tcp | grep -i chromecast | grep -q -i <yourChromeDeviceName>
    # in case of a fixed TV device IP adress
    ping -c 6 192.168.1.25 > /dev/null
    isping=$?
    systemctl is-active kodi > /dev/null
    isRunning=$?
    # isrunning is 0, when kodi is running
    # echo "isrunning:" $isRunning " isping:" $isping
    if [ "$isping" -ne 0 -a "$isRunning" -eq 0 ] ; then
        echo "Kodi gets stopped"
        systemctl stop kodi
    elif [ "$isping" -eq 0 -a "$isRunning" -ne 0 ] ; then
        echo "Kodi get started"
        systemctl start kodi
    fi
    sleep 10
done

exit 0

So I hope this will work now until Kodi becomes more clever in reporting TV device states..

Many thanks for all your help, hints and support!

regards
Steffen
Reply
#19
Hi,

I have similar problem with Openelec, RPi and PVR. In my case the shut down of backend is not needed but the streaming should be stopped to release tuner reservation on the backend.
I opened a feature request some days ago. (This topic found afterwards) It almost describes what you also need. Please support my request by adding comments.
Based on stko's comment the needed change seems very simple.
Reply

Logout Mark Read Team Forum Stats Members Help
Do the PVR manager react on Kodi "standby" state?0