Switching Hyperion on/off via keyboard/remote?!

  • Next time just don't post images.

    Anyway, your keyboard.xml is wrong. Try this.

    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <keymap>
      <global>
        <keyboard>
          <doublequote>XBMC.RunScript(/storage/.kodi/userdata/addon_data/service.hyperion/hyperion_switch.py)</doublequote>
        </keyboard>
      </global>
    </keymap>
  • Thank you at least I get a reaction from the key now. This is what the Log says. (switching Hyperion on & off still not working)

  • Now run in console and post the result what you get:

    Code
    ps
    python /storage/.kodi/userdata/addon_data/service.hyperion/hyperion_switch.py
    ps
    python /storage/.kodi/userdata/addon_data/service.hyperion/hyperion_switch.py
    ps
  • Seems you don't use hyperion from libreelec because there is no service file.

    Try this hyperion_switch.sh then

    Bash
    #!/bin/sh
    if ps | grep -v grep | grep hyperiond > /dev/null
    then
      killall hyperiond
    else
      /storage/hyperion/bin/hyperiond.sh &
    fi
  • We're getting closer :) The script stops Hyperion but doesn't open it on keypress again.

  • How do you start hyperion now? From autostart? What is the command line there (if even)?

    Just replace line

    Code
    /storage/hyperion/bin/hyperiond.sh &

    with whatever you have to start hyperion.

  • Hyperion is automatically started when I start the rpi. All files I ever layed hands on were the ones in the zip.

    The hyperiond.sh is present in the folder of your code. I don't know why it does not start...

  • And how did you install hyperion? Because I think it is not libreelec addon but something else - because there is no service.

    Try using in file hyperion_switch.sh

    Code
    /bin/sh /storage/hyperion/bin/hyperiond.sh &
  • YES!!! Did it :))) I just added the directory to the config file into your link now it works like a charm! THANK YOU!!!

    Code
    /bin/sh /storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config.json