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

Finished Split Booteffect and Static color + Add color/effect as new idle state

Discussion in 'Development' started by Brindosch, 1 June 2016.

  1. Brindosch

    Brindosch Administrator Administrator

    Messages:
    658
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    I think i it is not that handy that you can´t use both at the same time! Additional to setting it up is a little mess and it is "hard" to explain!

    We should start a new "idle/effect color" array at the config which has a priority, effectname and a RGB value, if this array is not available at the .json, the component will be disabled.
    YOU COULD ONLY USE A COLOR OR A EFFECT (which is sorted out via hypercon, but code needs a handling for that in case both is given))

    Now you are able to use a color OR effect with a different priority then the booteffect. So if all grabbers are disabled the static color OR effect will be active.
    For example if you just use kodi with kodi check - menu disabled. The static color could be used as a nice colored idle backlight OR a effect.

    -->> Colides with minimal luminance setting - need a workaround to get the static color working properly??
    -->> Add clear after the effect has finished to switch to the next (lower) priority (new static color/effect idle)
    @all @redPanther

    Yes / no / better ideas
     
    Last edited: 1 June 2016
  2. redPanther

    redPanther Moderator Developer

    Messages:
    211
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
    it is possible, but not so easy. In config we can do all we want, but inside hyperion we can't change much for that topic.


    if spillting boot/idle:
    - set boot prio hardcode to 0, if it was before I start to modify it.
    - at the same time (all those things are in threads - think parallel :) ) set your static/background color or effect with a prio channel e.g. 9999
    - throw an error when boot time is 0 (infinity)

    Then boot is always shown, because it has prio channel 0. After effect finished, channel 0 is cleared and next higher channel is visible. If no prio channel (below idle channel of 9999) is active, the idle effect/color will appear.

    If a clearAll is send, all channels, including the idle channel is cleard and you leds have nice black color.

    This is much like we do it now, except we start 2 effects at boot instead one.

    BTW I think it doesn't interfere with minimum lumiance, because when this is active a grabber will be active and this overrules the idle/background effect/color anyway

    idle effect/color will displayed when no other grabber/effect/color is active. If you use a grabber configured by "framegrabber" you will never see idle effects, because the grabber is always on.
     
    Last edited: 5 June 2016
    • Informative Informative x 1
  3. Brindosch

    Brindosch Administrator Administrator

    Messages:
    658
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    notice after some talks:
    implement this as sort of a grabber device which is not clear able.
    this should work
     
  4. redPanther

    redPanther Moderator Developer

    Messages:
    211
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
    or define that clearall doesn't clear after a threshold. changes should be minimal. i think grabber is not suitable
     
  5. Brindosch

    Brindosch Administrator Administrator

    Messages:
    658
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    However we reach it ;)
     
  6. Brindosch

    Brindosch Administrator Administrator

    Messages:
    658
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    But the idea is still to get a new "idle array" which is independent from the bootsequence
     
  7. redPanther

    redPanther Moderator Developer

    Messages:
    211
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
    in current hyperion.ng foreground/background effect/color was introduced.
    see for details: https://github.com/hyperion-project/hyperion.ng/pull/30

    If you set a background effect, then this effect will appear when nothing is active. E.g. if v4l2 grabber detects no signal and stops sending frames, then background effect is shown.

    same should work with screengrabber (framebuffer,x11,amlogic,dispmanx, osx capture) when xbmcchecker is used.
     
  8. Brindosch

    Brindosch Administrator Administrator

    Messages:
    658
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    Forgot to move it ;)
    Already used, very nice. It might be no fun to handle this with the UI (enable/disable), as all (optional) options will get a "enable : bool".
    Yes we already talked about this, from code view it is completely wrong :)
     
  9. iiidefconiii

    iiidefconiii Member

    Messages:
    89
    Hardware:
    32/64bit, +Arduino
    i did this by autoexec.py
    Code:
    import xbmc,xbmcgui
    import subprocess,os
    import time
    
    class MyPlayer(xbmc.Player) :
    
            def __init__ (self):
                xbmc.Player.__init__(self)
    
            def onPlayBackStarted(self):
                if xbmc.Player().isPlayingVideo():
                    os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl issue_device_command 13630846 L03")
                    os.system('/usr/share/hyperion/bin/hyperion-remote --clear')
    
            def onPlayBackEnded(self):
                if (VIDEO == 1):
                    os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl 192.168.1.11 issue_device_command 13630846 L04")
                    os.system('/usr/share/hyperion/bin/hyperion-remote --priority 100 --duration 86400 --effect "Blue mood blobs"')
    
            def onPlayBackStopped(self):
                if (VIDEO == 1):
                    os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl  192.168.1.11 issue_device_command 13630846 L04")
                    os.system('/usr/share/hyperion/bin/hyperion-remote --priority 100 --duration 86400 --effect "Blue mood blobs"')
                   
            def onPlayBackPaused(self):
                if xbmc.Player().isPlayingVideo():
                    os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl issue_device_command 13630846 L04")
    
            def onPlayBackResumed(self):
                if xbmc.Player().isPlayingVideo():
                    os.system("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl issue_device_command 13630846 L03")
                    os.system('/usr/share/hyperion/bin/hyperion-remote --clear')
    
    player=MyPlayer()
    
    subprocess.call('/usr/share/hyperion/bin/hyperiond /etc/hyperion.config.json </dev/null >/dev/null 2>&1 &', shell=True,)
    time.sleep(3)
    subprocess.call('/usr/share/hyperion/bin/hyperion-remote --effect "Blue mood blobs"', shell=True,)
    
    while(1):
        if xbmc.Player().isPlayingVideo():
            VIDEO = 1
    
        else:
            VIDEO = 0
    
        xbmc.sleep(3000)
     
  10. iiidefconiii

    iiidefconiii Member

    Messages:
    89
    Hardware:
    32/64bit, +Arduino
    do we need hyperion.ng for this? cause this method didnt work for me
     
  11. redPanther

    redPanther Moderator Developer

    Messages:
    211
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
    Hyperion.ng is needed. All new features implemented there. Current hyperion wont get any new features. But be aware the h.ng is in heavy development and in current stage we can't give support to endusers. Also hypercon wont work and you have to compile and install by your self.
     
  12. iiidefconiii

    iiidefconiii Member

    Messages:
    89
    Hardware:
    32/64bit, +Arduino
    Last edited: 5 September 2016
  13. redPanther

    redPanther Moderator Developer

    Messages:
    211
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
    hyperion.ng: https://github.com/hyperion-project/hyperion.ng
    hypercon wont work with hyperion.ng
    The hyperion.config.json has also changed a lot, you have to write your own config. There is a default config in that repo, this you can use as starter.

    But as I already mentioned, this version is more for developers, not for users! The documentation provided there (if any) is not always correct.

    If you not familiar with linux, git and compilers, you should wait some month until hyperion v2.0 (aka hyperion.ng) is released
     
  14. iiidefconiii

    iiidefconiii Member

    Messages:
    89
    Hardware:
    32/64bit, +Arduino
    Its working, got it compiled enabled boblight an finally having a nice background effect. If i can help with something, like test my situation ore something, im here ;) keep up the good work! this hyperion version is going to be awesome!
     
  15. redPanther

    redPanther Moderator Developer

    Messages:
    211
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
    just to be clear, you got hyperion.ng working? If so great! and congratulations! You can follow the github issues in hyperion.ng if there call for testers or you have a hint, then let us know ...
     
  16. iiidefconiii

    iiidefconiii Member

    Messages:
    89
    Hardware:
    32/64bit, +Arduino
    yes got hyperion.ng working, it was rather an easy install then i suspected.
     
  17. iiidefconiii

    iiidefconiii Member

    Messages:
    89
    Hardware:
    32/64bit, +Arduino
    I know there not officialy support for ng version but i still like to ask.

    is there an argument to start the * background-effect from a --clearall state?

    Reason im asking. I created an C# menu on my pc with button, that button send comands to read a script on the htpc.
    That script always had killall hyperiond, and to start another script with hyperiond command.

    The problem now is since its in /usr/share/hyperion/scripts i need sudo permissions to start/stop hyperion, and from visual basic it doesnt work when i put sudo in front of command, offcourse, still following me?

    So id like to map a button to a script that 1. do a --clearall state, when i got to sleep i press that harmony ultimate button to kill all de devices and lights, including --clearall.
    And one script on another button that starts the background effect, you see i keep my htpc 24h on, cause its also controlling my home lights.

    this is the app i made:

    [​IMG]
    [​IMG]