SJunkies / hyperion.ng

PRE ALPHA - The reworked version (next generation) of Hyperion
MIT License
9 stars 1 forks source link

Hyperion does not retake control of lights after crash #15

Closed agentdoubleohpi closed 4 years ago

agentdoubleohpi commented 4 years ago

Hi,

After the recent batch of updates, I have rebuilt the hue-entertainment-2019 branch. Hyperion operates as expected until its first crash, after which it will not retake control of the Hue lights.

Hyperion can still see the bridge, and can load the entertainment group, but it does not send commands.

EDIT: In the Hyperion Components view, I can see that the 'LED Device' is not active. Is there a way to manually restart that?

If there's a way I can provide fault finding information, please let me know.

Thanks.

SJunkies commented 4 years ago

@agentdoubleohpi Hi and sorry for my late reply! a complete rewriten version, based on the current hyperion.ng master version, was pushed 4 days ago in the 2019 branch and i'm working on some minor known bugs. set log-level to debug inside the hyperion.ng webinterface under system -> log -> log-level.

after update u need to reconfigure your philips hue, because philips hue and philips hue entertainmentapi now combined in one device!

please use/update to the last branch state and try again :)

thx!

agentdoubleohpi commented 4 years ago

No problem - I will do a complete rebuild and let you know how I go.

Would you like me to use the 2019 or 2020 branch? If I can help you by testing, I'm happy to do so.

SJunkies commented 4 years ago

No problem - I will do a complete rebuild and let you know how I go.

Would you like me to use the 2019 or 2020 branch? If I can help you by testing, I'm happy to do so.

you can use both at the moment, they are the same! the 2019 branch is only used for syncing the PR#592.

thx!

Shawn9347 commented 4 years ago

Good work man! I have an issue with the entertainment api in dark scenes. The lights will flicker green, blue, red or purple. It's really distracting. I'm gonna rebuild right now hopefully it will fix it.

SJunkies commented 4 years ago

@Rickexe Thx!

the flickering depends on the input picture/source/signal, but I got good results with activated smoothing under image processing! Play around with the options to minimize the flickering. My „happy“ settings at the moment are: Time: 80 (try range between 80-120) Update frequenz: 40 (try 30-40) Update delay: 0 Continues output: no / uncheck just for a start point.

Good luck, I hope it will give u better results ;)

Shawn9347 commented 4 years ago

I have two instances running. The first one captures the display and sends colors to led strip behind tv and forwards the capture to another instance. The second instance is sending colors to hue lights around the tv. The led strip works perfect but the hue lights are still flickering. After rebuilding the latest branch it has been reduced and got a lot better actually. Thank you for that! I'll also try your smoothing settings!

Also, are you sure continues output should be turned off? Can you explain what it does?

Shawn9347 commented 4 years ago

Do you have any suggestions for capture device? The capture device is on a coreelec box. Platform is amlogic and I'm currently using 25 freq and height 45 and width 80.

SJunkies commented 4 years ago

@Rickexe What exactly do you mean by two instances? Two instances with different IPs configured on your network, or two instances both running on a device with the same IP? I'm just asking because no forwarding is required on the same device and all instances use the same input (if you want!)

I think smoothing is key to getting better / minimized flicker results.

This also depends on the area from which the image color information comes. If the source has a lot of noise or is old, there is a possibility that it flickers a lot because the color information within the capture FPS changes too strongly / quickly. Here the smoothing comes in ...

continues output enabled, sends data to led device regardless there is new data / color informations or not.

The Hue Entertainment API is a permanent stream! Every new color information (even after smoothing) that is to be sent to the respective LED / lamp is saved in the respective lamp. Since the stream must be maintained, it is itself like a continuous output that repeatedly sends the color information stored in the lamp. This means that continuous output is not required, as stream already does. If the option is activated, the data that is already stored in the respective lamp is only senselessly passed on internally again and again.

But if you notice a change, please let me know, I couldn't notice any of them with the option activated ;)

Shawn9347 commented 4 years ago

I have one instance running with the coreelec hyperion.ng addon which is input source and controlling the usb led strip. That instance is forwarding its input source to an external ip (debian laptop) and that laptop control the hue lights.

Shawn9347 commented 4 years ago

I have it setup like this because I don't know how else to do it. Maybe it's better to have them both on the coreelec box but I don't know how to compile your branch on coreelec and I don't even know if the box can handle it since it only has 1gb of ram.

SJunkies commented 4 years ago

Do you have any suggestions for capture device? The capture device is on a coreelec box. Platform is amlogic and I'm currently using 25 freq and height 45 and width 80.

not really, I have almost the same setting: 25 freq and height 54 and width 96 (just because I have 85 LEDs on the top / bottom and 49 on the left / right).

SJunkies commented 4 years ago

I have it setup like this because I don't know how else to do it. Maybe it's better to have them both on the coreelec box but I don't know how to compile your branch on coreelec and I don't even know if the box can handle it since it only has 1gb of ram.

it might work but i promise nothing! ;) Possibly with a lower capture settings (width / height), since 1 GB could be the bottleneck ...

I use OSMC myself, unfortunately I am not familiar with coreelec, sorry ... I only know that it was too limited for me to work / develop ;)

SJunkies commented 4 years ago

Maybe you can use the precompiled packages from my last PR commit, but unfortunately I don't know how and which package you need for coreelec. I think you have to be logged into GitHub to download the files ...

EDIT: Sorry, I don't think you can use the precompiled packages because it's not allowed to install your own software on coreelec OS: /

Shawn9347 commented 4 years ago

The problem with coreelec is that you can't really do anything other than installing add-ons. You don't have the rights to change files and stuff.

I could install OSMC on the box. I tried OSMC a while ago on a pi but it was very slow. Do you experience those issues? If not then I could try OSMC. Would it be possible then for me to run the led strip and hue on the same box?

SJunkies commented 4 years ago

Possibly with a lower capture settings (width / height), since 1 GB could be the bottleneck ...

what i'm telling....i also have only 1gb on my pi 3b+ and it worked with apa102 stripe and Hues ;) sorry! I also use the pi to develop and compile hyperion.ng!

The problem with coreelec is that you can't really do anything other than installing add-ons. You don't have the rights to change files and stuff.

It came to my mind after I posted the comment ;)

I could install OSMC on the box. I tried OSMC a while ago on a pi but it was very slow. Do you experience those issues? If not then I could try OSMC. Would it be possible then for me to run the led strip and hue on the same box?

I'm happy with OSMC, try it again, it seems more stable and runs smooth. But make a backup before you kill your system on the box ;)

Good luck!

Shawn9347 commented 4 years ago

Ok. I'll try OSMC. How are you using hyperion ng exactly on OSMC? Do you have it compiled twice or do you have two config files? And do you forward or do both configs have their own capture device?

Shawn9347 commented 4 years ago

Also how do you control hyperion when a movie is not playing?

SJunkies commented 4 years ago

Ok. I'll try OSMC. How are you using hyperion ng exactly on OSMC? Do you have it compiled twice or do you have two config files? And do you forward or do both configs have their own capture device?

one compiled hyperion.ng , two configured instanzes (via webinterface IP:8090) - both use the same capture device - no forwarding is needed!

Also how do you control hyperion when a movie is not playing?

I stop only the LED devices via webinterface and/or via ssh the complete hyperion.ng service (I installed it as service for the pi start). Not the best options, but in my case it is enough and works because I also use the pi for development ... I'm not sure why, but the hyperion app itself don't work for my setup...but thats maybe a local problem... As a quick solution to stop / start hyperion, I use the Shortcuts app and send start / stop commands via ssh.

Shawn9347 commented 4 years ago

I'm gonna do my best. You'll hear from me later.

Might I suggest hyperion control addon for kodi? It works really well with version 101 of the coreelec addon maybe it works with normal compiled hyperion as well.

Shawn9347 commented 4 years ago

Unfortunately... I don't think you can install OSMC on amlogic devices.....

Shawn9347 commented 4 years ago

I think the only way for me is to compile your branch as a kodi addon. I have no idea how though.

SJunkies commented 4 years ago

Unfortunately, I knew nothing about the lack of OSMC support for amlog devices: / As far as I know, the Kodi addon only passes the image information on to a Hyperion instance. I don't think it would work as an addon. Maybe you could install Debian in your box and than install Kodi and Hyperion, but I'm not that familiar with Amlogig devices ... Maybe ask for help in the Hyperion forum ...

Shawn9347 commented 4 years ago

I'll check it out. I really appreciate you helping me btw. Thanks.

Shawn9347 commented 4 years ago

Hey, I finally managed to install the official hyperion.ng as a service on my coreelec box. So far it only worked with an image though. I used one of their releases for aarch64 and it's working. But of course it doesn't include the entertainment api. Any idea how we could get an image of this branch? cya

SJunkies commented 4 years ago

Hey, I finally managed to install the official hyperion.ng as a service on my coreelec box. So far it only worked with an image though. I used one of their releases for aarch64 and it's working. But of course it doesn't include the entertainment api. Any idea how we could get an image of this branch? cya

Sounds great! How did u do that? :)

Maybe u can try this packages:

workflow artifacts

agentdoubleohpi commented 4 years ago

I have switched to the latest version of the entertainment-api-2020 branch, and this issue seems to have fixed, as well as the one where disabling the Hyperion instance causes a segfault - I am happy to close this issue if you are, @SJunkies

Shawn9347 commented 4 years ago

Is there another way I can message you @SJunkies when this issue is closed. I meaaan... we can have an endless conversation about hyperion xDDD.

The way I got hyperion as a service on coreelec btw is with this command: curl -# -L --get | tar --strip-components=1 -C /storage share/hyperion -xz

But unfortunately it's doesn't get me the latest version it just says 2.0.0 in the web ui. strange...

SJunkies commented 4 years ago

@agentdoubleohpi perfekt! I‘m happy, that it works now :) Issue can be cloesed 👍

@Rickexe

Is there another way I can message you @SJunkies when this issue is closed. I meaaan... we can have an endless conversation about hyperion xDDD.

I know that you mean 😄 You could open another issue with this content related and/or you can write to me in the Hyperion Forum

The way I got hyperion as a service on coreelec btw is with this command: curl -# -L --get | tar --strip-components=1 -C /storage share/hyperion -xz

Okay cool, I didn’t know this way works with coreelec! Great you found a way around ;)