1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Hyperion control addons (On/Off/Toggle) for Kodi

Discussion in 'Hyperion Extensions' started by cmvac, 4 November 2016.

  1. cmvac

    cmvac New Member

    RPi2, 32/64bit, Wetek
    I've made three addons for controlling Hyperion through Kodi. They are called: Hyperion On, Hyperion Off and Hyperion Toggle. The names are self-explainatory.;)

    The Toggle version changes the Ambilight source from Kodi into HDMI/AV and back again. For that, you will need two different configuration files.

    One needs to be named "hyperion.config.json" and the other, "hyperion.config1.json". On the first one, leave the grabber on:
    "grabber-v4l2" :
    "device" : "/dev/video0",
    "input" : 0,
    "standard" : "PAL",
    "width" : 300,
    "height" : 200,
    "frameDecimation" : 2,
    "sizeDecimation" : 8,
    "priority" : 1100,
    "mode" : "2D",
    "cropLeft" : 10,
    "cropRight" : 8,
    "cropTop" : 30,
    "cropBottom" : 10,
    "redSignalThreshold" : 0.2,
    "greenSignalThreshold" : 0.1,
    "blueSignalThreshold" : 0.1

    The second one, leave it off:

    /// "grabber-v4l2" :
    /// {
    /// "device" : "/dev/video0",
    /// "input" : 0,
    /// "standard" : "PAL",
    /// "width" : 300,
    /// "height" : 200,
    /// "frameDecimation" : 2,
    /// "sizeDecimation" : 8,
    /// "priority" : 1100,
    /// "mode" : "2D",
    /// "cropLeft" : 10,
    /// "cropRight" : 8,
    /// "cropTop" : 30,
    /// "cropBottom" : 10,
    /// "redSignalThreshold" : 0.2,
    /// "greenSignalThreshold" : 0.1,
    /// "blueSignalThreshold" : 0.1
    /// },

    I've done them as Video addons, and not Program addons, because many users tend to hide or not even go to Program Addons.

    The code is very simple, and I would be very happy to have some help coding them into one single addon, since I don't have much time and my Python knowledge is still at a beginner's level.

    I've been using them for a while now and so far no complaints, so I decided to share with the Hyperion community. Be gentle! XD

    They are available on my repo, under video addons: https://github.com/cmvac/demagorgon...on.repository/demagorgon.repository-0.0.2.zip
  2. cmvac

    cmvac New Member

    RPi2, 32/64bit, Wetek
    Forgot to mention that it was made for the Raspberry Pi with OpenELEC/LibreELEC installed. I haven't tested it on other systems yet, but I guess the code would have to be changed for that.
    • Thank you Thank you x 1
  3. cmvac

    cmvac New Member

    RPi2, 32/64bit, Wetek
    I have updated the add-ons and made a set of three new add-ons. They are made to work either in LibreELEC/OpenELEC or in Raspbian-based systems. They are all available on the same repo above, versions 1.2 for Libre/OpenELEC versions, and 1.2.1 for others.

    I am also open for any help in turning these six addons into one, as well as adding effects and color pick. I think it is one of the things the end user would really appreciate.
  4. gamer06

    gamer06 New Member

    Hi, I tried this in OSMC and the switch on/off its working, but the toggle wasn't work...

    There are a solution for OSMC?

    Edit: i find de solution. The error it is in the script
    Last edited: 21 April 2018
  5. cmvac

    cmvac New Member

    RPi2, 32/64bit, Wetek
    Hi @gamer06 I was away at work for a month and just got back home. I haven't had much time to dedicate to those addons and don't have a OSMC system. If you could share your solution, I would be more than happy to integrate it and give you proper credit for it.

    I am actually searching for someone who would help me with these addons. My plan for them was to fuse them into one, with several categories and if possible, effects as well. Since this is also a Kodi centered ambilight system, it is something I always thought was missing here. It should be rather easy to do, it just that my knowledge and time is a bit limited sometimes.
  6. gamer06

    gamer06 New Member

    hi @cmvac , no problem... I find the solution and the solution its "very small". It is a error in the script, i will upload the file if have no problem about that.

    Try this and tell me if it works with you. I tried in the OSMC and it is works very fine.
    Another thing that i can't do for the moment, it is the swith all of them in one remote control, do you can do this??

    Thanks, and sorry for my english

    Attached Files:

  7. Brakiss

    Brakiss New Member

    Hello, I may be daft, but where to the .json files go? Which directory. Thank you!
  8. ATzepeter

    ATzepeter New Member

    @Brakiss: You have to put them in the standard directory where HyperCon is also placing the generated configs. For me on Libreelec its in the folder "Configfiles". If you run another OS and are not sure where the file is located just search for the filename "hyperion.config.json" on your Raspi (or on what you are using to run your ambilight). And than in this directory you put your both generated "hyperion.config.json" and "hyperion.config1.json" files.

    @cmvac: It works like a charm, Thank you so much for your work. All other things i tried to toggle between intern and extern grabber didnt work for me.
    Kodi Check toggles to Kodi when running a video, than back to extern when video is stopped, but than it stops working until i restart the system.
    Setting different prioritys in grabber tab is working most time, but than sometimes the ambilight is switching from intern to extern for some seconds even though there is no signal coming.
    But with your Addon toggling is finally very easy and comfortable. Hyperion On and Hyperion Off is also is working for me. Thank you for this and sorry for bad english