On/Off Solution - LEDs light up with Chromecast background image when TV is off

  • I've got my setup installed and working, with a few issues left to address


    My problem right now is that when I turn the TV off the video grabber is still receiving a signal from the Chromecast and the LEDs display whatever it has as the background image.


    I followed the No Soldering Tutorial amogst other sources around the web so my basic setup is largely the same


    Multiple sources (Chromecast, Laptop, Nintendo Switch, PS4) into an automatic HDMI Switch ->
    Powered HDMI splitter ->
    TV and Powered HDMI to RCA converter ->
    Raspberry Pi 3 ->
    WS2801 LED strip connected to the Pi on GPIO pins for Ground, Data and Clock/Signal, 5v and Ground connected to a 5v power supply.


    I have explored the idea of powering a component with the TV USB port but have encountered a few issues/thoughts:
    Chromecast - I like using the cast button and having the TV turn on with HDMI-CEC, this will not work if it is powered by the TV USB port
    Raspberry Pi - I don't want to just kill the power to the Pi
    HDMI Splitter - The lights stay on in their last state, they just go dimmer and surely this would kill the HDMI-CEC turn on signal also
    HDMI to RCA - The lights stay on in their last state, they just go dimmer



    I was also exploring the idea of mapping the TV remote power button to a script which would turn on/off Hyperion, however it now occurs to me that it may not work because I'm not using the Pi as an input at all; I don't have it plugged into one of the TV's HDMI and I never intend to use it as a media source (I have confirmed the remote does partially work when I was setting up OpenElec).


    Currently I am just pulling the power supply to the LEDs when not in use but I would like it to turn on and off automatically.


    • If I did plug in the Pi to the TV with an HDMI cable and it was not on that AV Input would it still receive the signal from the power button and run the script to stop/start Hyperion?
    • Is there anything in the HyperCon settings I can do to achieve the desired behaviour of turning the LEDs off with the TV?


    • As a slight improvement to my current solution would I be able to use some sort of USB switch between the grabber and the Pi (Such as or )or a DC switch between the LEDs and power supply
    • Is there any other solution that I may be able to use?


    I'm aware that this is not neccessarily a sowtware issue but I'd prefferably like to come to a software solution.


    I can upload the hyperion config file later if needed as I don't I have access to it right now.

    • Offizieller Beitrag

    My problem right now is that when I turn the TV off the video grabber is still receiving a signal from the Chromecast and the LEDs display whatever it has as the background image.


    Is your TV connected to your home network? If so, could you try to ping your TV? Are there two different results when the device is switched off or switched on?

  • Is your TV connected to your home network? If so, could you try to ping your TV? Are there two different results when the device is switched off or switched on?


    No, the TV is pre-smart TV so isn't connected to the network at all by itself, the Chromecast is a Gen 2 model plugged into an HDMI port on the switch and is what we consume most of our media on which is why it is the default AV input.


    The TV is also an LG which I've been reading doesn't play so nice with HDMI-CEC - it will turn on the TV but wouldn't switch the AV automatically and doesn't implement deck controls. I would assume it doesn't send a message to tell other devices "Hey, I'm turning off now" either



    This is my config file:


    • Offizieller Beitrag

    No, the TV is pre-smart TV so isn't connected to the network at all by itself, ...


    Then the software solution will definitely be eliminated without additional hardware. Hyperion cannot use this feature (on / off state TV) OOTB.
    Sorry

  • If I connected a to the Pi would that be a potential solution to run the script when the power button is pressed on the remote?
    Or is there a way I could trigger the script from my phone? I have a couple of sets of IFTTT buttons, perhaps there's something I could do with Webhooks??

  • I have found a partial solution to this issue by getting an on/off script to work as a button on my phone:


    Firstly I was having some issues with the script in the tutorial link so I altered it to use the same commands as the start and stop buttons in HyperCon.


    I used an app RaspController to send this as a custom command to the Pi,


    Bash
    #!/bin/sh
    SERVICE='hyperiond'
    if ps | grep -v grep | grep $SERVICE > /dev/null
    then
    killall hyperiond 2>/dev/null
    else
    /storage/.config/autostart.sh > /dev/null 2>&1 &
    fi


    I got an error when trying to use the code the tutorial suggests adding to the keymap to execute the command from the hyperionswitch.sh file


    Code
    system.exec("/storage/.kodi/userdata/hyperionswitch.sh")


    sh: syntax error: unexpected word (expecting ")")


    If I can figure this out I'm fairly confident that I could run it from a button press on the remote if I could find a suitable IR Receiver.


    The problem with using RaspController on its own is that it launches the ssh window from the custom command and from the widget (which also looks a little ugly to me and doesn't match in with my IFTTT button widgets) and requires another button press to exit out afterwards.


    I used the app Tasker to create a different style widget shortcut which runs the command from RaspController with nothing other than just a toast notification. I gave it an icon from a downloaded Raspberry Pi logo to match another Tasker shortcut on my home screen.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!