TV off >> HDMI inactive >> Rasspberry sense HDMI inactive >>> STOP Command

  • Hi,
    I have a Raspberry PI-2 at my home with Kodi. I just want to request LibreELEC to make some type of arrangement in there operating system (without CEC commands).
    If Rasspberry pi (or any other hardware) detect The HDMI connected to it is inactive. It stop active streaming and system come on to home menu. The final requirement if TV is off , Rasspberry pi stop downloading data. This thing is very important for limited Internet bandwidth users so that accidently if the user not give stop command to raspberry pi & switch of TV. The raspberry pi in background downloading continuously.

    Please guide me towards my goal.

    TV off >> HDMI inactive >> Rasspberry sense HDMI inactive >>> operating system give stop command to kodi >> O/S bring kodi to home screen.

    thanks


  • Yes please add this Feature ...
    My Problem is that if my Wife or Kids Power off the TV the tvheadend Server wouldn't stop streaming ...

  • I doubt this will be added due to both lack of interest and composite video also being an option on the rpi. Should be simple to write a script or addon that will do this. You'll have to google because I don't remember off the top of my head but there is a gpio that you can read state for hdmi. Its the one used for hotplug. Think there is also a console command tvstatus or something like that. Good luck. If you need help I might have some time to whip up something quick this weekend, or if you just need a good starting point this might help GitHub - lsellens/script.service.rpi.tv.switch: Kodi addon for switching RPi on and off by GPIO. Its what I use to power my rpi on and off automatically with the tv but it requires building support hardware and might not work on all tv's. Also I need to remake the schematic since I've improved the circuit since I put that up. original p-channel fet has too much of a voltage drop.


  • I doubt this will be added due to both lack of interest and composite video also being an option on the rpi. Should be simple to write a script or addon that will do this. You'll have to google because I don't remember off the top of my head but there is a gpio that you can read state for hdmi. Its the one used for hotplug. Think there is also a console command tvstatus or something like that. Good luck. If you need help I might have some time to whip up something quick this weekend, or if you just need a good starting point this might help GitHub - lsellens/script.service.rpi.tv.switch: Kodi addon for switching RPi on and off by GPIO. Its what I use to power my rpi on and off automatically with the tv but it requires building support hardware and might not work on all tv's. Also I need to remake the schematic since I've improved the circuit since I put that up. original p-channel fet has too much of a voltage drop.


    Thanks  lsellens, for giving us the hope that this thing possible. please guide me how your addon working in this scenario. I just want the addon give stop command to Raspberry PI after detecting HDMI inactive. Internet data is more critical here then electricity. May be in future we can combine with pushbullet addon and we can get notification about when TV start and when switch off. Spying on wife how much she watch the TV with official records.
    thanks

  • Thanks  lsellens, for giving us the hope that this thing possible. please guide me how your addon working in this scenario. I just want the addon give stop command to Raspberry PI after detecting HDMI inactive. Internet data is more critical here then electricity. May be in future we can combine with pushbullet addon and we can get notification about when TV start and when switch off. Spying on wife how much she watch the TV with official records.
    thanks


    I have zero interest in making anything for you to spy on someone with, so you're on your own on that one. I'm at work right now, but if you have time to ssh into your pi and run the command "tvservice -s" post the output with both the tv on and off also just for the hell of it unplug the hdmi cable and post the output that way aswell. Should be able to make a quick script or addon.

  • I'm at the office too right now, can you only give the Output with TV off:


    [code=php]
    state 0x12000a [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressive
    [/php]


    can give you more informations later


  • I just tried the same but there's no difference in the output when TV is on or off, so I guess that's impossible without CEC.

  • I've tried to achieve the same my TV does support CEC however I'm yet to find a way to identify if the TV is on or off.


    Any suggestions welcome


  • I've tried to achieve the same my TV does support CEC however I'm yet to find a way to identify if the TV is on or off.


    Any suggestions welcome


    My only suggestion is if there is a usb port on the tv you can use a volt meter to check if it still has 5v when the tv is off/standby or not. I have an lg that has one usb. It turns off when the tv is in standby. Have a samsung with two usb ports. One turns off and the other does not, so this can vary between modules and manufactures. If you're some what handy there are ways to use this to trigger events.