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

Network and distributed features

Hyperion now supports a number of options to communicate with LEDs over a network as well as more complex distributed multi-instance deployments

Control Hyperion using the JSON interface

See also Command line utility

You can also open your own TCP connection to drive Hyperion if you want to more efficiently integrate it in existing scripts.
1) use hyperion-remote with --print. This will show you the json command it sends.
In this case, setting the "value" to 0 which is just like turning the brightness down:
Code:
[email protected]:~# hyperion-remote --print -v 0
hyperion-remote:
        version   : master (penfold42-4c00ea2/3fbc03c-1458727954
        build time: Mar 23 2016 21:16:58
Connected to localhost:19444
Set color transforms
Command: {"command":"transform","transform":{"valueGain":0.0}}
Reply: {"success":true}
You can then open a direct TCP connection to port 19444 and paste this command in:
Code:
[email protected]:~# nc localhost 19444
{"command":"transform","transform":{"valueGain":0.0}}
{"success":true}
Simulated LED device
Don't have real LEDs yet ?
Want to test your custom led layout config ?
Develop effects and want to look how your effect performs on differnt layouts (e.g. tv ambilight, matrix, stripe)?
Hypersim can run on another host and displays on screen the LEDs position AND by configuring Hyperion to send led data you can watch it live.
See hypersim (from @redPanther)

UDP LED device support
Hyperion supports a UDP based led device type. LED data is simply sent as udp packets to a unicast or multicast address.
Protocol 0 simply sends raw led data in RGBRGB in binary
Protocol 2 uses a basic header to specify the starting led number in case you exceed the MTU
This works great with an ESP8266 based led string receiver like this (from @penfold42): ESP-udp-neo.ino

UDP listener "effect"
This listens on the specified UDP port and is compatible with protocol 0 above

Google ProtoBuffer and JSON message forwarding

Hyperion receives ProtoBuffer and JSON messages and has the option to forward those to other Hyperion instances be it local or on a remote network.

So if you want to control multiple Hyperion instances as one for instance via android app or hyperion-remote you can use ProtoBuffer and/or JSON message forwarding.

Forwarding example #1 - ProtoBuffer and JSON forwarding combined

The below configuration example snippet has 3 Hyperion instances involved where one has this configuration and will forward both ProtoBuffer and JSON messages to 2 other instances.

Code:
"protoServer" :
{
     "port" : 19445
},
....
"jsonServer" :
{
    "port" : 19444
},
....
"forwarder" :
{
    "proto" : [ "127.0.0.1:20445","192.168.178.88:19445" ],
    "json"  : [ "127.0.0.1:20444","192.168.178.88:19444" ]
},
The main Hyperion instance should have a ProtoBuffer input via Kodi Hyperion addon for instance or be supplied by a standalone live capture grabber (e.g. hyperion-v4l2).

The other two instances of Hyperion are on localhost (127.0.0.1) and the other on a remote host (192.168.178.88) which should have their own configuration.
Multiple destinations are comma separated like in the example above.

Forwarding example #2 - JSON forwarding only

The below configuration example snippet has 3 Hyperion instances involved where one has this configuration and will forward JSON messages to 2 other instances.

Code:
"jsonServer" :
{
    "port" : 19444
},
....
"forwarder" : {
  json : ["127.0.0.1:20444" , "192.168.178.88:19444"]
},
The other two instances of Hyperion are on localhost (127.0.0.1) and the other on a remote host (192.168.178.88) which should have their own configuration. Multiple destinations are comma separated like the example above.

Forwarding troubleshooting

- Please keep an eye on the ports. Avoid using same ports for different Hyperion instances on localhost. Also don't use ports that are used by other services like Hyperion JSON server, Boblight or system services.

This page has been seen 7,356 times.