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

RPi + OpenELEC Need help for using examples + integration with Domoticz

Discussion in 'Software Support' started by elfnoir, 28 October 2016.

  1. elfnoir

    elfnoir New Member

    Messages:
    7
    Hardware:
    RPi1/Zero, +Arduino
    Hi,

    I'm using Hyperion under RPI and Kodi, and it's awesome!!
    I would like to go further using exemples that are providing under ~/hyperion/effects, for example random.py.

    Unfortunately, despite I've done a "chmod +x random.py", I have this error message:
    -sh: random.py: not found
    or
    -sh: random.json: not found
    I also try "python random.py", with this error message:
    Traceback (most recent call last):
    File "random.py", line 1, in <module>
    import hyperion, time, colorsys, random
    ImportError: No module named hyperion

    Finally, I try an apt-get install hyperion, which is not allowed by Kodi.

    1) Please, what the way to execute those effects programs under python or json?
    2) Next step it's the integration under domoticz, running on another RPI; Is it possible to access on it, with a Dummy Switch or Dimmer, with a kind of url like :
    "http://RPI_hyperion_url:19444/~hyperion/effects/random.py" please?

    Thanks for your help!
     
  2. penfold42

    penfold42 Active Member

    Messages:
    746
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    1) Hyperion is built with an integrated python interpreter - use Hyperion-remote or a Hyperion phone app to launch effects

    2) not yet via a URL request but there is a json interface that can be used (and is used by Hyperion-remote)
     
  3. elfnoir

    elfnoir New Member

    Messages:
    7
    Hardware:
    RPi1/Zero, +Arduino
    Thanks for this quick answer!
    It means that I can create a script on my raspberry with Domoticz on it, and call the Hyperion/Kodi on my second RPI through json interface? Do you know where I can find some tips/examples of this kind of scripts please?
     
  4. penfold42

    penfold42 Active Member

    Messages:
    746
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266