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

HyperCon Ambilight with Grabber

Discussion in 'Software Support' started by qwebnm, 10 June 2016.

  1. qwebnm

    qwebnm New Member

    Messages:
    7
    Hardware:
    RPi1/Zero
    Hi,
    i am having trouble setting up the ambilight with the usb grabber.
    I can control the light with the android app and set colors with hyperion on windows so hyperion (on the pi B+) seems to be installed correctly. I can see the grabber als dev/video0 in putty and take a screenshot. but the ambilight does not work for some reason.

    Here is my config.json



    is there a way to clear the log? i couldnt find the file on the pi.

    there are a lot of "frame too small" error messages, maybe that the problem. my search on the internet was unsuccsessfull, so i'd appreciate any help.

    and here is my log


    Code:
    Hyperion Ambilight Deamon
        Version   : V1.02.0 (brindosch-f4162eb/2d45d51-1462453507
        Build Time: May  5 2016 06:07:47
    INFO: Selected configuration file: /storage/.config/hyperion.config.json
    HYPERION INFO: ColorTransform 'default' => [0; 24]
    HYPERION INFO: ColorCorrection 'default' => [0; 24]
    HYPERION INFO: ColorAdjustment 'default' => [0; 24]
    LEDDEVICE INFO: configuration:
    {
        "colorOrder" : "rgb",
        "name" : "MyHyperionConfig",
        "output" : "/dev/spidev0.0",
        "rate" : 1000000,
        "type" : "ws2801"
    }
    
    INFO: Creating linear smoothing
    HYPERION (CS) INFO: Created linear-smoothing(interval_ms=50;settlingTime_ms=200;updateDelay=0
    EFFECTENGINE ERROR: Effect directory can not be loaded: /opt/hyperion/effects
    EFFECTENGINE INFO: Initializing Python interpreter
    INFO: Hyperion started and initialised
    INFO: Boot sequence 'System Shutdown' EFFECTENGINE INFO: run effect System Shutdown on channel 0
    BLACKBORDER INFO: threshold set to 0 (0)
    BLACKBORDER INFO: mode:default
    started
    INFO: Json server created and started on port 19444
    V4L2GRABBER INFO: width=720 height=576
    V4L2GRABBER INFO: pixel format=UYVY
    BLACKBORDER INFO: threshold set to 0 (0)
    BLACKBORDER INFO: mode:default
    V4L2GRABBER INFO: signal threshold set to: {0,0,0}
    QObject::connect: Cannot connect V4L2Wrapper::emitImage(int, const Image<ColorRgb>&, const int) to (null)::sendImageToProtoSlaves(int, const Image<ColorRgb>&, const int)
    V4L2GRABBER INFO: started
    INFO: V4L2 grabber created and started
    V4L2GRABBER ERROR: Frame too small: 826072 != 829440
    V4L2GRABBER ERROR: Frame too small: 826138 != 829440
    V4L2GRABBER ERROR: Frame too small: 825952 != 829440
    V4L2GRABBER ERROR: Frame too small: 825374 != 829440
    V4L2GRABBER ERROR: Frame too small: 824970 != 829440
    V4L2GRABBER ERROR: Frame too small: 825022 != 829440
    V4L2GRABBER ERROR: Frame too small: 826082 != 829440
    V4L2GRABBER ERROR: Frame too small: 826118 != 829440
    V4L2GRABBER ERROR: Frame too small: 826200 != 829440
    V4L2GRABBER ERROR: Frame too small: 825532 != 829440
    V4L2GRABBER ERROR: Frame too small: 825316 != 829440
    V4L2GRABBER ERROR: Frame too small: 824918 != 829440
    V4L2GRABBER ERROR: Frame too small: 824462 != 829440
    V4L2GRABBER ERROR: Frame too small: 825288 != 829440
    V4L2GRABBER ERROR: Frame too small: 824944 != 829440
    V4L2GRABBER ERROR: Frame too small: 825784 != 829440
    V4L2GRABBER ERROR: Frame too small: 826622 != 829440
    V4L2GRABBER ERROR: Frame too small: 824928 != 829440
    V4L2GRABBER ERROR: Frame too small: 825280 != 829440
    V4L2GRABBER ERROR: Frame too small: 824608 != 829440
    V4L2GRABBER ERROR: Frame too small: 819714 != 829440
    V4L2GRABBER ERROR: Frame too small: 825886 != 829440
    V4L2GRABBER ERROR: Frame too small: 825968 != 829440
    V4L2GRABBER ERROR: Frame too small: 825296 != 829440
    V4L2GRABBER ERROR: Frame too small: 824892 != 829440
    V4L2GRABBER ERROR: Frame too small: 825396 != 829440
    V4L2GRABBER ERROR: Frame too small: 826560 != 829440
    V4L2GRABBER ERROR: Frame too small: 826008 != 829440
    V4L2GRABBER ERROR: Frame too small: 825594 != 829440
    V4L2GRABBER ERROR: Frame too small: 826406 != 829440
    V4L2GRABBER ERROR: Frame too small: 825256 != 829440
    V4L2GRABBER ERROR: Frame too small: 824670 != 829440
    V4L2GRABBER ERROR: Frame too small: 825022 != 829440
    V4L2GRABBER ERROR: Frame too small: 823116 != 829440
    V4L2GRABBER ERROR: Frame too small: 825712 != 829440
    V4L2GRABBER ERROR: Frame too small: 825444 != 829440
    V4L2GRABBER ERROR: Frame too small: 819456 != 829440
    V4L2GRABBER ERROR: Frame too small: 824924 != 829440
    V4L2GRABBER ERROR: Frame too small: 825274 != 829440
    V4L2GRABBER ERROR: Frame too small: 825624 != 829440
    V4L2GRABBER ERROR: Frame too small: 825764 != 829440
    V4L2GRABBER ERROR: Frame too small: 825054 != 829440
    V4L2GRABBER ERROR: Frame too small: 824964 != 829440
    V4L2GRABBER ERROR: Frame too small: 824202 != 829440
    V4L2GRABBER ERROR: Frame too small: 824552 != 829440
    V4L2GRABBER ERROR: Frame too small: 825070 != 829440
    V4L2GRABBER ERROR: Frame too small: 825690 != 829440
    V4L2GRABBER ERROR: Frame too small: 825824 != 829440
    V4L2GRABBER ERROR: Frame too small: 826128 != 829440
    V4L2GRABBER ERROR: Frame too small: 826142 != 829440
    V4L2GRABBER ERROR: Frame too small: 825360 != 829440
    V4L2GRABBER ERROR: Frame too small: 824956 != 829440
    V4L2GRABBER ERROR: Frame too small: 822294 != 829440
    V4L2GRABBER ERROR: Frame too small: 825276 != 829440
    V4L2GRABBER ERROR: Frame too small: 826044 != 829440
    V4L2GRABBER ERROR: Frame too small: 826160 != 829440
    V4L2GRABBER ERROR: Frame too small: 825152 != 829440
    V4L2GRABBER INFO: stopped
     
  2. AEtHeLsYn

    AEtHeLsYn New Member Developer

    Messages:
    28
    Hardware:
    RPi1/Zero, RPi2, RPi3
    Change sizeDecimation to 8 instead of 10 inside V4L2 grabber configuration, that should solve the problem.
     
  3. qwebnm

    qwebnm New Member

    Messages:
    7
    Hardware:
    RPi1/Zero
    ok, changed it to 4, now the error is gone. still no ambilight though. any ideas?
     
  4. Pieface

    Pieface New Member

    Messages:
    19
    Hardware:
    RPi3
    Is your HDMI2AV converter set to PAL or NTSC?
     
  5. qwebnm

    qwebnm New Member

    Messages:
    7
    Hardware:
    RPi1/Zero
    PAL, and the error
    V4L2GRABBER ERROR: Frame too small: 826072 != 829440
    shows up again.
     
  6. Pieface

    Pieface New Member

    Messages:
    19
    Hardware:
    RPi3
    As mad as it sounds, I have to set my Grabber config to PAL, but the HDMI2AV to NTSC.

    It's the only way it works properly for me. Maybe try that?
     
  7. qwebnm

    qwebnm New Member

    Messages:
    7
    Hardware:
    RPi1/Zero
    Code:
    ssh out:     /storage/.config/autostart.sh > /dev/null 2>&1 &
    ssh out:     cat /storage/logfiles/hyperion.log
    ssh in:     Hyperion Ambilight Deamon
    ssh in:         Version   : V1.02.0 (brindosch-f4162eb/2d45d51-1462453507
    ssh in:         Build Time: May  5 2016 06:07:47
    ssh in:     INFO: Selected configuration file: /storage/.config/hyperion.config.json
    ssh in:     HYPERION INFO: ColorTransform 'default' => [0; 24]
    ssh in:     HYPERION INFO: ColorCorrection 'default' => [0; 24]
    ssh in:     HYPERION INFO: ColorAdjustment 'default' => [0; 24]
    ssh in:     LEDDEVICE INFO: configuration:
    ssh in:     {
    ssh in:         "colorOrder" : "rgb",
    ssh in:         "name" : "MyHyperionConfig",
    ssh in:         "output" : "/dev/spidev0.0",
    ssh in:         "rate" : 1000000,
    ssh in:         "type" : "ws2801"
    ssh in:     }
    ssh in:     INFO: Creating linear smoothing
    ssh in:     HYPERION (CS) INFO: Created linear-smoothing(interval_ms=50;settlingTime_ms=200;updateDelay=0
    ssh in:     EFFECTENGINE ERROR: Effect directory can not be loaded: /opt/hyperion/effects
    ssh in:     EFFECTENGINE INFO: Initializing Python interpreter
    ssh in:     INFO: Hyperion started and initialised
    ssh in:     INFO: Boot sequence 'Police Lights Single' EFFECTENGINE INFO: run effect Police Lights Single on channel 0
    ssh in:     BLACKBORDER INFO: threshold set to 0 (0)
    ssh in:     BLACKBORDER INFO: mode:default
    ssh in:     started
    ssh in:     INFO: Json server created and started on port 19444
    ssh in:     V4L2GRABBER INFO: width=720 height=576
    ssh in:     V4L2GRABBER INFO: pixel format=UYVY
    ssh in:     BLACKBORDER INFO: threshold set to 0 (0)
    ssh in:     BLACKBORDER INFO: mode:default
    ssh in:     V4L2GRABBER INFO: signal threshold set to: {0,0,0}
    ssh in:     QObject::connect: Cannot connect V4L2Wrapper::emitImage(int, const Image<ColorRgb>&, const int) to (null)::sendImageToProtoSlaves(int, const Image<ColorRgb>&, const int)
    ssh in:     V4L2GRABBER INFO: started
    ssh in:     INFO: V4L2 grabber created and started
    ssh in:     V4L2GRABBER INFO: stopped
    ssh in:     EFFECTENGINE INFO: effect finished
    ssh in:     V4L2GRABBER INFO: started
    i tried that, now the error is gone, but it still doesnt work
     
  8. Doc.Ex

    Doc.Ex Member

    Messages:
    73
    Hardware:
    RPi2, +PhilipsHue
    That is because some of the converters are labeled wrong. I have one that was behaving the same way. When I opened it, the labels on the pcb were switched to the labels on the housing.

    @qwebnm: what is the chipset of your usb grabber? usbtv007 (Fushicai) or stk1160?
     
  9. Tim Newman

    Tim Newman New Member

    Messages:
    6
    Hardware:
    RPi2
    Same here. Hoping someone has the answer, been up for like 4 days straight getting this all set up. I can also control the lights just fine with the app or though HyperCon SSH. If i stop Hyperion and output the video0 signal to the HDMI i can see the video. I can also take a screen grab with hypercon. If i set Hyperion to an effect like strobe and then take a grabber screen shot the effect stops and hyperion dies. Ive tried PAL and NTSC. This has to be a config issue since the Hyperion and the grabber work fine independently just not together.

    If i try to start hyperion-v412 manually i get this:

    [email protected]:~# hyperion-v4l2 -d /dev/video0 --input 0 --width 360 --height 288 --crop-right 9 --crop-bottom 6
    hyperion-v4l2: version : V1.02.0 (brindosch-f4162eb/2d45d51-1462453507
    build time: May 5 2016 06:07:47
    V4L2GRABBER INFO: width=720 height=480
    V4L2GRABBER INFO: pixel format=YUYV
    VIDIOC_REQBUFS ERROR 16, Device or resource busy





    I get these errors in the log:

    ssh in: Jun 11 00:05:16 raspberrypi hyperiond[3251]: EFFECTENGINE INFO: Initializing Python interpreter
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: INFO: Hyperion started and initialised
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: INFO: Boot sequence 'Strobe Raspbmc' EFFECTENGINE INFO: run effect Strobe Raspbmc on channel 0
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: BLACKBORDER INFO: threshold set to 0.001 (1)
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: BLACKBORDER INFO: mode:classic
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: started
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: INFO: Json server created and started on port 19444
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: INFO: Proto server created and started on port 19445
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: DISPMANXGRABBER INFO: Display opened with resolution: 1920x1080
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: BLACKBORDER INFO: threshold set to 0.001 (1)
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: BLACKBORDER INFO: mode:classic
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: INFO: Frame grabber created and started
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: V4L2GRABBER INFO: width=720 height=576
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: V4L2GRABBER INFO: pixel format=YUYV
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: BLACKBORDER INFO: threshold set to 0.001 (1)
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: BLACKBORDER INFO: mode:classic
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: V4L2GRABBER INFO: signal threshold set to: {25,25,25}
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: V4L2GRABBER INFO: started
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: INFO: V4L2 grabber created and started
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: BORDER SWITCH REQUIRED!!
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: CURRENT BORDER TYPE: unknown=0 hor.size=0 vert.size=0
    ssh in: Jun 11 00:05:17 raspberrypi hyperiond[3251]: V4L2GRABBER INFO: stopped
    ssh in: Jun 11 00:05:20 raspberrypi hyperiond[3251]: EFFECTENGINE INFO: effect finished



    This is my current config ...

    Code:
    /// V4L2 GRABBER CONFIG
      "grabber-v4l2" :
      {
      "device" : "/dev/video0",
      "input" : 0,
      "standard" : "NTSC",
      "width" : 640,
      "height" : 480,
      "frameDecimation" : 2,
      "sizeDecimation" : 10,
      "priority" : 900,
      "mode" : "2D",
      "cropLeft" : 30,
      "cropRight" : 30,
      "cropTop" : 30,
      "cropBottom" : 30,
      "redSignalThreshold" : 0.1,
      "greenSignalThreshold" : 0.1,
      "blueSignalThreshold" : 0.1
      },
    
      /// FRAME GRABBER CONFIG
      "framegrabber" :
      {
      "width" : 64,
      "height" : 64,
      "frequency_Hz" : 40.0,
      "priority" : 890
    
    I'm running Raspian Jessie and I have a UTV007 grabber. I also set this up using raspian weezy from 2013-07-26 since i read that my grabber only works with that kernel. Same thing happned. So i just decided to fire up the current raspian release and give the grabber a shot and it works. Any ideas?



    [​IMG]

    [​IMG]
     
    Last edited by a moderator: 11 June 2016
    • Like Like x 1
  10. Tim Newman

    Tim Newman New Member

    Messages:
    6
    Hardware:
    RPi2
    I got it working .. had to turn off Internal Frame grabber. Here is my current config. I still need to calibrate and tweak but its working! I removed the LED section. I have 154 so it was quite long.

    Code:
    {
       /// DEVICE CONFIGURATION
       "device" :
       {
         "name"  : "MyHyperionConfig",
         "type"  : "ws2801",
         "output"  : "/dev/spidev0.0",
         "rate"  : 1000000,
         "colorOrder" : "rgb"
       },
    
       /// COLOR CALIBRATION CONFIG
       "color" :
       {
         "channelAdjustment" :
         [
           {
             "id"  : "default",
             "leds" : "*",
             "pureRed" :
             {
               "redChannel"     : 255,
               "greenChannel"     : 0,
               "blueChannel"     : 0
             },
             "pureGreen" :
             {
               "redChannel"     : 0,
               "greenChannel"     : 255,
               "blueChannel"     : 0
             },
             "pureBlue" :
             {
               "redChannel"     : 0,
               "greenChannel"     : 0,
               "blueChannel"     : 255
             }
           }
         ],
         "temperature" :
         [
           {
             "id"  : "default",
             "leds" : "*",
             "correctionValues" :
             {
               "red"    : 255,
               "green"   : 255,
               "blue"    : 255
             }
           }
         ],
         "transform" :
         [
           {
             "id"  : "default",
             "leds" : "*",
             "hsl" :
             {
               "saturationGain"   : 1.0000,
               "luminanceGain"     : 1.0000
             },
             "red" :
             {
               "threshold"    : 0.0000,
               "gamma"     : 2.5000
             },
             "green" :
             {
               "threshold"    : 0.0000,
               "gamma"     : 2.5000
             },
             "blue" :
             {
               "threshold"    : 0.0000,
               "gamma"     : 2.5000
             }
           }
         ],
       /// SMOOTHING CONFIG
         "smoothing" :
         {
           "type"  : "linear",
           "time_ms"  : 100,
           "updateFrequency" : 25.0000,
           "updateDelay"  : 0
         }
       },
    
       /// V4L2 GRABBER CONFIG
       "grabber-v4l2" :
       {
         "device" : "/dev/video0",
         "input" : 0,
         "standard" : "PAL",
         "width" : 720,
         "height" : 576,
         "frameDecimation" : 2,
         "sizeDecimation" : 8,
         "priority" : 900,
         "mode" : "2D",
         "cropLeft" : 30,
         "cropRight" : 30,
         "cropTop" : 30,
         "cropBottom" : 30,
         "redSignalThreshold" : 0.1,
         "greenSignalThreshold" : 0.1,
         "blueSignalThreshold" : 0.1
       },
    
       /// BOOTEFFECT CONFIG
       "bootsequence" :
       {
         "color" : [0,0,0],
         "effect" : "sparks",
         "duration_ms" : 3000,
         "priority" : 700
       },
    
       /// JSON SERVER CONFIG
       "jsonServer" :
       {
         "port" : 19444
       },
    
       /// PROTO SERVER CONFIG
       "protoServer" :
       {
         "port" : 19445
       },
    
       /// EFFECT PATH
       "effects" :
       {
         "paths" :
         [
           "/opt/hyperion/effects"
         ]
       },
    
       /// NO FRAME GRABBER CONFIG
       /// NO BLACKBORDER CONFIG
       /// NO KODI CHECK CONFIG
       /// NO BOBLIGHT SERVER CONFIG
       /// NO JSON/PROTO FORWARD CONFIG
    
     
    Last edited by a moderator: 11 June 2016
    • Informative Informative x 1
  11. qwebnm

    qwebnm New Member

    Messages:
    7
    Hardware:
    RPi1/Zero
    its stk1160. but i can take screenshots, so it should work right?
     
  12. Tim Newman

    Tim Newman New Member

    Messages:
    6
    Hardware:
    RPi2
    i think so .. i was in the same boat as you. i just systematically changed settings in the hyperion.config.json until it started working.
     
  13. Brindosch

    Brindosch Active Member

    Messages:
    678
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    Greetings,
    glad you found a solution,
    due to the point please disable framegrabber if you don´t want to use it.
    We kept the option enabled by default cause many people use kodi distributions with Hyperion.

    Please have a look at the wiki
    https://hyperion-project.org/wiki/HyperCon-Grabber-Tab
    I added now a additional hint
     
  14. qwebnm

    qwebnm New Member

    Messages:
    7
    Hardware:
    RPi1/Zero
    im still open for suggestions. anything i can try left?
     
    • Thank you Thank you x 1
  15. Doc.Ex

    Doc.Ex Member

    Messages:
    73
    Hardware:
    RPi2, +PhilipsHue
    Do you use OpenELEC?
    If yes try the following:

    "grabber-v4l2" :
    {
    "device" : "/dev/video0",
    "input" : 0,
    "standard" : "PAL",
    "width" : 240,
    "height" : 192,
    "frameDecimation" : 2,
    "sizeDecimation" : 1,
    (...)​
    OpenElec supports framescaling for the stk1160 grabber, so you can directly tell the driver of the grabber which resolution it should grab.

    Also check if there is enough power for the grabber. Mine doesn't work when connected directly to the Pi. It needs to be connected to a powered usb hub that is then connected to the pi.
     
  16. qwebnm

    qwebnm New Member

    Messages:
    7
    Hardware:
    RPi1/Zero
    the screenshots work so that shouldnt be the problem. im gonna try your config now.
     
  17. René Arts

    René Arts New Member

    Messages:
    19
    Hardware:
    RPi2
    Just a quick question; as far as I understand it is possible to use both the internal and an external grabber (off course not simultaneously)? Does hyperion switch automatically between the two sources when switching? That should be possible when the priorities are set in the right order I presume?
    I am currently still using an old installation (Bismarcks OpenELEC mit automatisierter Ambilight Quellenumschaltung), it restarts hyperion with a different configuration file on switching the TV input which is signaled via CEC. I would like to upgrade my installation and probably switch to LibreElec, but I want to be sure it can still switch automatically.
     
  18. Brindosch

    Brindosch Active Member

    Messages:
    678
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    yes, you could activate both. The grabber with the lowest priority is used.

    Depending on your grabber it is easy or a problem.

    If your v4l2 won't shutdown (cause no picture is available - which is not the case if you use a hdmi to cvbs converter)
    -> You could disable the menu option at the kodi check to shutdown the internal grabber which result in a switch to the external grabber (but if v4l2 is always active (because of a blue picture or so) which means you use the v4l2 always at the kodi menu -> weird)

    In my case i use my tv scart and v4l2 is automatically offline, as long i don't switch to the TV (-> perfect)
    The second problem is: you can't currently differ between color transforms with different grabbers. So one calibration for a digital and the D->A picture. Might be weird too.

    Hyperion should get a CEC component for further configuration.
     
  19. Doc.Ex

    Doc.Ex Member

    Messages:
    73
    Hardware:
    RPi2, +PhilipsHue
    I did also use bismarcks script. My solution was, that I just wrote simple bash scripts that I mapped onto remote buttons. The scripts stop hyperion or start different configs. Was the best solution for me because I could incorporate the buttons with my logitech harmony activities which makes it just as convenient as the script of bismarck. Maybe that could also be a Solution for you
     
  20. René Arts

    René Arts New Member

    Messages:
    19
    Hardware:
    RPi2
    Good to hear that, I am using my TVs Scart output which goes directly to the framegrabber so that should be fine (UTV I guess... experimented with both UTV and STK). The calibration will be quite OK I guess, otherwise I'll need to find a compromise. I will give it a try sometime soon!
    Manually switching it with a remote is no option, the switching really needs to be automatic for me to survive the WAF requirements ;)