Hyperion binding - looking for testers

Ok, thanks. Hopefully it will be added soon to the master repo of openhab.

btw: I’m using v1, don’t have ng server running (yet)

Just installed through the IoT marketplace. It works fine (using V1 server)!

For me (NG) everything works except color channel. Enable/disable, V4L, Brightness controls etc. work flawlessly, however when I try to set a static color, I get message:

16:04:42.908 [WARN ] [ng.hyperion.handler.HyperionNgHandler] - Server rejected the command: {“origin”:“openHAB”,“priority”:260,“color”:[0,255,0],“command”:“color”}

I don’t know if it’s Openhab- or hyperion-related problem. What’s surprising, when I tried to set a static color with hyperion-remote -c RRGGBB --print (to see JSON), it looked like the color wasn’t formatted [R,G,B] but [R,G,B,R,G,B]. I don’t know why but maybe that’s the reason.

The colour channel was definitely working when I started development, maybe there have been changes to the JSON API in the meantime. I will look again soon towards the end of the month - I had to pack up my Hyperion setup due to house move/house refurb.

1 Like

If the API was changed, it would be interesting to know if the hyperion-remote and app developers adapted their code to the new API or if those do some kind of discovery of how the desired format is.

If it’s the latter, we could implement that protocol discovery into the binding as well.

Hi,

I was checking it on the other machine and the color channel works almost flawlessly. I mean, I can change the color but if I try to switch ON/OFF, it won’t enable/disable LEDs.

On the log I get e.g.

[WARN ] [g.hyperion.handler.HyperionNgHandler] - Channel color unable to process command ON

Anyway, it looks like the previous issue was my fault.

The Hyperion.ng way to turn off the LEDs is to disable the ‘LED device component’. There should be an OH channel to do just that.

Could you give that a try and let me know.

PS how did you resolve your colour command issue?

To be honest, I’m not sure. I started OH2 on the other RPi 3B to lighten the primary one and it works. However, for a moment the issue occured back but I guess it was something related to my items configuration.
I used to have .items file to set tags, groups, labels etc. and now I did it by Habmin.

As to the ‘disable LED’, I’m not convinced. I mean, using this channel makes all the channels no coherent. I’d prefer if sending OFF command to color channel would clear priority and sending ON command – set a previous value (or if no value – set white or value fixed in settings).

I don’t know if it’s possible but it’s how in my opinion color channel should work.

The only way to guarantee the LEDs will turn off is to disable the LED component.

If you only clear the priority then some other priority (grabber etc) will take over the LEDs colours.

Can you explain your use case please?

For background my main reason for writing the binding was to be able to turn off Hyperion/LEDs when my TV turned off.

I’m using hyperion with Kodi and V4L grabber, and to set an ambient color.

Hyperion is also set to turn on LEDs with Kodi only if the movie is played. The V4L grabber is turned ON/OFF manually (because I don’t want to have hyperion on with news, for example), as well as the ambient color.

My priorities are as followed: ambient color with the highest priority (lowest number), then Kodi (beacuse it prevails only if the movie is played), then V4L.

So in my use case, if I clear ambient color priority (or all priorities, doesn’t matter), the LEDs are going off because there is no other priorities set, unless V4L is on (it happens rarely).

I don’t want to change my priorities as well because sometimes I use ambient light also with grabber/Kodi, so it’s important for me that the ambient color prevails.

That being said, if no ON/OFF commands on the color channel is by design, then it’s ok. Now I use the “clear all priorities” channel as a workaround.

Based on your goal of turning off your ambient light then the clear / clear all priority is probably the best way to achieve this.

I use a USB grabber connected to my AVR so that all my TV inputs can go through Hyperion. Sometimes I use either the colour channel or effect channel for ambient lighting and then cancel the priority to stop it. This allows the grabber to kick back in if needed/required. If I want to turn off my LEDs completely E.g. no grabber, no remote etc then I switch of the LED component.

Hi all, nice binding.

I’m using Hyperion NG and when I set the colour via the colour wheel, sometimes I get the colour and other times, normally when my Pi has been running for a while I get a segmented multicolour pattern. Strangely, when I tap the colour wheel in the android app, the pattern rotates… Any ideas, it seams like very strange behaviour.

Thanks.

Guys, how to use Clear ? I want button to clear current color, what should I send ?

I tried “ALL” and different INT values, but nothing helps

2018-08-05 05:57:49.684 [vent.ItemStateChangedEvent]
Hyperion_Clear changed from 2000 to 10
2018-08-05 05:57:49.663 [ome.event.ItemCommandEvent]
Item ‘Hyperion_Clear’ received command 10

Here is function from sources:

private void handleClear(Command command) throws IOException, CommandUnsuccessfulException {
    if (command instanceof StringType) {
        String cmd = command.toString();
        if ("ALL".equals(cmd)) {
            ClearAllCommand clearCommand = new ClearAllCommand();
            sendCommand(clearCommand);
        } else {
            int priority = Integer.parseInt(cmd);
            ClearCommand clearCommand = new ClearCommand(priority);
            sendCommand(clearCommand);
        }
    }
}

ok, now it works, replaced V1 thing to NG

Can NG already been installed on Kodi?

Hello,

I’m using this with V1 server. Setting color / brightness works fine.

Two issues:

  1. The binding shows the “Thing” offline, but actually it works!

  2. I’m struggling however to turn it back to the V4L ambilight. Could you describe the process to use the “clear”? I have a switch but it doesn’t do anything. In PaperUI I only see 3 channels (Brightness, Color, Effect). In VS Code I see 4 channels (+clear). In the documentation there are 5 (+clear_all).

Would be nice to clarify. I can help update the docs!

I’m not sure what the problem is for issue 1) without more information / logs.

Regarding issue 2) it looks like the documentation needs to be updated. The clear/clear all channels were consolidated into a single clear channel which is no longer a switch. It is now a string type channel that expects to be given the priority you want to cancel (e.g. 50) or the the string “ALL” to clear all priorities.

Thanks for the answer. Regarding 1) it’s online now, maybe it was a temporary thing? I’ll observe but so far OK.

For 2) I made a Pull Request here:

I hope that will avoid some questions and confusion like mine!

Does someone has a good tutorial/howto to install NG on a pi?
I’ve found some compiling tutorial on the github of hyperion, but maybe there’s an easier way?

I also have a question about the clear channel. When I try the example from the doc, I het this message & nothing happens:
2018-12-19 00:18:18.899 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Hyperion_kodi_ClearSwitch' with an invalid status value '50'.

edit: found my mistake for question 2. My clear item was still a switch and not a String…

I’ve another question: i’m still on V1, but is it possible to change config (json) from openhab? Currently i’m doing this via a Shell script on my Pi which runs Hyperion and gets triggered from my ir remote.