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

Detect usage and enable/disable LEDs

Discussion in 'Hyperion General' started by omcateer, 10 October 2016.

  1. omcateer

    omcateer New Member

    Messages:
    3
    Hardware:
    RPi3, +Arduino
    Hello,
    I'm running Hyperion on a RPI3 with an Arduino and 60 WS2812B's everything works great, what I want to know is it possible to detect when Hyperion is sending out data to the LEDs?
    My RPI3 is always running as a NAS and it's pointless to keep the LED on all the time. What I'd like to do is create a script that detects when Hyperion is sending out data and turn on the LED using a relay. When it's not playing any video or Hyperion effects, turn off the relay.
    Is this possible?
     
  2. redPanther

    redPanther Moderator Developer

    Messages:
    211
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
    a quick and easy solution: change the arduino sketch. When no data from serial is comming in switch your leds via gpio off ...

    But there is is but ... e.g. smoothing can send continuously data to the leds or the opposite, setting a solid color (e.g. via android app) will send only one time (if smoothing and/or continuous output is off).

    Perhaps you better use something from the home automation area (e.g. FHEM). There are kodi plugins. home automation is exactly for controlling your power outlets and so on ...
     
  3. omcateer

    omcateer New Member

    Messages:
    3
    Hardware:
    RPi3, +Arduino
    Great, I think one of the home automation plugins with work perfectly for osmc.
    But how about when using hyperion-remote to play colours of effects? Is there some way I could hook into hyperion-remote to call the enable/disalbe gpio script when calling methods like colour = ON effects = ON, clear = OFF
     
  4. penfold42

    penfold42 Moderator Developer

    Messages:
    643
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Are the leds not being blanked when there is no content playing ?

    If you're not grabbing menus or screen savers from kodi, Hyperion shouldn't display anything unless you have an effect or colour set.
     
  5. omcateer

    omcateer New Member

    Messages:
    3
    Hardware:
    RPi3, +Arduino
    Everything with hyperion is working perfectly. I'm not grabbing menus or screensavers and the LEDs are correctly blanked. What I'd like to do it disconnect the power for the LEDs with a relay when they are blacked.
    Maybe which is pointless but I leave the Pi on 24/7 and if the LEDs aren't displaying anything I'd like them to be disconnected. Maybe this isn't a problem leaving the LEDs on 24/7, what do you think?
     
  6. penfold42

    penfold42 Moderator Developer

    Messages:
    643
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    No problems - the power light on the Pi probably consumes more power than the strip of leds showing black
     
    • Like Like x 1