hyperion-project / hyperion.ng

The successor to Hyperion aka Hyperion Next Generation
https://hyperion-project.org/
MIT License
3.04k stars 377 forks source link

Add "exit_effect" #130

Closed penfold42 closed 7 years ago

penfold42 commented 8 years ago

I need hyperiond to let me specify an effect or colour to set the strip to on exit rather than simply "lights off"

brindosch commented 8 years ago

Hm, is this a issue with arduino? My SPI shuts the lights off during shutdown. You don't want black? A effect on exit makes no sense? A color makes sense. Until the next electrical disorder shows something different :) Not sure how fast the issues here occur.

redPanther commented 8 years ago

After playing a bit around with setting color in destructor of Hyperion class (where switchoff is called), I think this feature is to difficult to handle. E.g. I use fadecandy driver and when kill hyperiond with e.g. strg+c then no colors set to leds anymore - and also switchoff didn't work. I think this feature will behave/work different for every device. E.g when serial port from an arduino is closed, this could lead to an reset of arduino and this would clear all the leds ...

I think this is a nice idea, but to difficult to handle.

penfold42 commented 8 years ago

I should provide more background on this use case.

I have a 1970s only I amp with a pi inside.

The backlight behind the tuner has a strip of 2812 LEDs and if I shut down the pi, I need a fixed colour at exit, not black.

Leave this one with me - I'll play with not calling the awihoff() method

redPanther commented 8 years ago

when using fadecandy driver your wish is already fulfilled. Using arduino/adalight, your wish is hardly possible (because on reset after port close), others I don't know. This feature is not possible on all led devices. Perhaps on yours it is possible. Try to set a color in main.cpp when exit signal is called. You can get an instance of hyperion and then call setColor on prio 0 with color ColorRgb::RED I tried that on different locations in the code, but I can't get my fadecandy network driver to send a color during shutdown of hyperion. BTW I use the shutdown effect to shut down my pi, perhaps this work for you?

redPanther commented 8 years ago

@penfold did you persist on that feature, because I'm not convinced that we can solve that. If you have any idea, please write. Otherwise it would be good to close this issue

penfold42 commented 8 years ago

I did have it setting the colour to red on the way down.

Is like to pursue further after I've done the tpm2.net and e1.31 support

brindosch commented 7 years ago

@penfold42 /push after investigation - not possible i think so?

penfold42 commented 7 years ago

I'll dig up my branch and at least capture where I got to

redPanther commented 7 years ago

@penfold42 any news so far?

penfold42 commented 7 years ago

Not yet - happy to close for now. I'll reopen it if I get to it