Integration with Domoticz via Node-Red

  • Hello folks


    I am playing around home automation using Domoticz platform for dashboard / visualization purposes and Node-Red flow subsystem to make it dynamic


    More or less I am successful and pressing widgets in Domoticz make my predefined wishes happen, so I can turn hyperion off, can turn a rainbow swirl effect, or switch it into external mode for PS4 - here I am using Node-Red to catch events and execute hyperion-remote commands


    Inconsistent situation is about syncing the state of hyperion when I control it manually via command line or mobile app when all commands are not reflected in Domoticz


    So I plan to sync it by catching hyperion JSON feedback and correct the status on Domoticz
    I am thinking of using the feature of forwarder to external jsonServer... As I understand the idea - all commands I send to local hyperion are forwarder into another address specified in forwarder section of the config file


    I am ready to share all info scripts I made for that
    I contribution would be much appreciated on this, any idea is countable


    I tried to use Node-Red's input node TCP for catching call of the forwarder and it even receives the JSON messages... and hangs... and the command line process hangs at this moment too


    That's where I am hanging at the moment

  • Hi,
    I'm interesting to turn ON Hyperion with Random or Xmas script (for example) from a RPI embedded Domoticz, to another RPI embedded KODI+Hyperion; Did you succeed to interrop Domoticz and Hyperion? Do you have some help on it? I try to understand JSON interface and how I should create a script to make the link betwwen 2 RPIs, but I'm a noob!
    Thanks for yout feedback!

  • It's not clear from your question what you expect from linking of two Hyperions.
    Just in case if you need to activate one of the effects from Domoticz (or from whatever else) I would suggest using the command line interface


    Moving this way you don't have to deep dive into details of Hyperion JSON interface.
    You can do it from Node-Red like me using node type Exec with the command line '/usr/bin/hyperion-remote' and parameters provided via payload.msg
    You can also do it from Domoticz using its internal scripting mechanisms like LUA or Python or even directly from a switch by specifying 'On Action' action (something like script:///usr/bin/hyperion-remote --effect "Rainbow swirl")


  • Ok...then regarding the 2 RPI, one has Domoticz only (with for example internal adress 192.168.1.1), and another one has KODI+Hyperion (no Domoticz) (with for example internal adress 192.168.1.2).
    I create a dummy switch in Domoticz on 192.168.1.1 RPI, and in 'Action ON' field, if I type "script:///192.168.1.2/usr/hyperion/bin/hyperion-remote --effect 'random'", nothing happend, and I receive no errors messages; could you please tell me what I have to put in the Action ON field on the Domoticz in my 192.168.1.1 RPI please?


    Maybe it's because, on the Hyperion's RPI, if I am in the directory "OpenELEC:~/hyperion/bin", that include "hyperion-remote", if I type "hyperion-remote --effect 'random'", I have the error message "
    -sh: hyperion-remote: not found' ; is it a possible tips?
    Once again sorry if my questions are very 'low level', but I'm noob...

    • Offizieller Beitrag

    on openelec you have to write "./hyperion-remote.sh --effect <name>" you need the addiotional ".sh"

  • ok, with this writting, no error, thanks!:


    OpenELEC:~/hyperion/effects # ~/hyperion/bin/hyperion-remote.sh --effect 'random'

    hyperion-remote:
    version : V1.03.2 (brindosch-99d9396/d3713a8-1469452981
    build time: Jul 25 2016 06:54:18
    Connected to localhost:19444

    Start effect random


    ...but unfortunately there is no changement on the LED.
    I try with Android app on my telephon to turn off/turn on or with KODI working, or with another effect name, and unfortunately, despite I have the message 'Start effect xxxxx', there is no impact on the light of the LEDs.
    Thanks for your support!

  • First of all you need to chose the way you like to go


    Either it could be done from KODI which coexists with Hyperion on the same RPi... in this case you should play around configuring KODI like you started already with the hint of TPmodding.


    Or you should do it via Domoticz and in this case you should have Hyperion command line tools installed on this RPi on order to start local scripts. The approach <script:///192.168.1.2/usr/hyperion/bin/hyperion-remote ...> is not going to work because you try to make it remotely... it's doable but not so easy. If you have Hyperion command line tools installed locally on the same RPi with Domoticz, in this case you may start local scripts like <script:///usr/hyperion/bin/hyperion-remote -h 192.168.1.2 -p 19444...> but specifying remote host with Hyperion service


    But anyway, I think you are moving further having no working basic configuration. As I can see, your basic setup doesn't work even via direct controling by the Android app. If so, you'd better achieve a little success here and only after that go further with remote controlling via Domoticz or KODI

  • Maybe I was not clear sorry.
    Hyperion is working for me, through Android App, or with KODI running on my RPI.
    The issue is, when I'm typping:

    OpenELEC:
    ~ # ~/hyperion/bin/hyperion-remote.sh --effect 'random'


    there is no modification on the Leds, meaning if I'm looking a movie, Leds are continuing to display correctly the color, or if I choose an effect with the mobile App, it continues to do so, despite the shell said 'Star effect random' or 'Start effect X-mas'...but I also try this think:


    OpenELEC:~ # ~/hyperion/bin/hyperion-remote.sh --effect 'ygbhjbhjlgvyug'
    hyperion-remote:
    version : V1.03.2 (brindosch-99d9396/d3713a8-1469452981
    build time: Jul 25 2016 06:54:18
    Connected to localhost:19444
    Start effect ygbhjbhjlgvyug
    meaning it's not helpfull in troubleshooting because it always saying me it's OK !


    And you're right: before trying to monitore it with the second RPI, I need to succeed locally :)
    Do you have an idea please?

Jetzt mitmachen!

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