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

RPi + Other Software Ambient light intermittently ON and OFF

Discussion in 'Hardware Support' started by sciorty, 8 November 2020.

  1. sciorty

    sciorty New Member

    Messages:
    3
    Hardware:
    RPi3
    Hi all,

    I have Hyperion installed on a Raspberry4 and the "ambient light effect" does work, but it intermittently goes OFF and ON with variable intervals of a couple of seconds. This also happen when the image is a static one.

    The strange thing is that this does not happen when i choose a fixed colour or an "animation" for the LEDs (example: home assistant entity), as in that case i do not have any problem. So this makes me think that is a grabber/video configuration problem. Here is the hyperion configuration:

    Code:
    // Automatically generated configuration file for Hyperion ambilight daemon
    // Notice: All values are explained with comments at our wiki: wiki.hyperion-project.org (config area)
    // Generated by: HyperCon (The Hyperion deamon configuration file builder)
    // Created with HyperCon V1.03.3 (22.10.2017)
    
    {
        // DEVICE CONFIGURATION
        "device" :
        {
            "name"       : "MyHyperionConfig",
            "type"       : "apa102",
            "output"     : "/dev/spidev0.0",
            "rate"     : 1000000,
            "colorOrder" : "bgr"
        },
    
        // 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,
                        "luminanceMinimum"        : 0.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"         : 200,
                "updateFrequency" : 20.0000,
                "updateDelay"     : 0
            }
        },
    
        // V4L2 GRABBER CONFIG
        "grabber-v4l2" :
        {
            "device" : "/dev/video0",
            "input" : 0,
            "standard" : "PAL",
            "width" : -1,
            "height" : -1,
            "frameDecimation" : 2,
            "sizeDecimation" : 8,
            "priority" : 900,
            "mode" : "2D",
            "cropLeft" : 7,
            "cropRight" : 11,
            "cropTop" : 0,
            "cropBottom" : 0,
            "redSignalThreshold" : 0.0,
            "greenSignalThreshold" : 0.0,
            "blueSignalThreshold" : 0.0
        },
    
        // BLACKBORDER CONFIG
        "blackborderdetector" :
        {
            "enable" : true,
            "threshold" : 0.15,
            "unknownFrameCnt" : 600,
            "borderFrameCnt" : 50,
            "maxInconsistentCnt" : 10,
            "blurRemoveCnt" : 1,
            "mode" : "classic"
        },
    
        // JSON SERVER CONFIG
        "jsonServer" :
        {
            "port" : 19444
        },
    
        // PROTO SERVER CONFIG
        "protoServer" :
        {
            "port" : 19445
        },
    
        // EFFECT PATH
        "effects" :
        {
            "paths" :
            [
                "/storage/hyperion/effects",
                "/usr/share/hyperion/effects"
            ]
        },
    
        // NO FRAME GRABBER CONFIG
        // NO KODI CHECK CONFIG
        // NO BOOTEFFECT CONFIG
        // NO BOBLIGHT SERVER CONFIG
        // NO JSON/PROTO FORWARD CONFIG
    
        // LED CONFIGURATION
        "leds" :
        [
            {
                "index" : 0,
                "hscan" : { "minimum" : 0.5000, "maximum" : 0.5500 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 1,
                "hscan" : { "minimum" : 0.4500, "maximum" : 0.5000 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 2,
                "hscan" : { "minimum" : 0.4000, "maximum" : 0.4500 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 3,
                "hscan" : { "minimum" : 0.3500, "maximum" : 0.4000 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 4,
                "hscan" : { "minimum" : 0.3000, "maximum" : 0.3500 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 5,
                "hscan" : { "minimum" : 0.2500, "maximum" : 0.3000 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 6,
                "hscan" : { "minimum" : 0.2000, "maximum" : 0.2500 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 7,
                "hscan" : { "minimum" : 0.1500, "maximum" : 0.2000 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 8,
                "hscan" : { "minimum" : 0.1000, "maximum" : 0.1500 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 9,
                "hscan" : { "minimum" : 0.0500, "maximum" : 0.1000 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 10,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 11,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.9091, "maximum" : 1.0000 }
            },
            {
                "index" : 12,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.8182, "maximum" : 0.9091 }
            },
            {
                "index" : 13,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.7273, "maximum" : 0.8182 }
            },
            {
                "index" : 14,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.6364, "maximum" : 0.7273 }
            },
            {
                "index" : 15,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.5455, "maximum" : 0.6364 }
            },
            {
                "index" : 16,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.4545, "maximum" : 0.5455 }
            },
            {
                "index" : 17,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.3636, "maximum" : 0.4545 }
            },
            {
                "index" : 18,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.2727, "maximum" : 0.3636 }
            },
            {
                "index" : 19,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.1818, "maximum" : 0.2727 }
            },
            {
                "index" : 20,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.0909, "maximum" : 0.1818 }
            },
            {
                "index" : 21,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0909 }
            },
            {
                "index" : 22,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 23,
                "hscan" : { "minimum" : 0.0500, "maximum" : 0.1000 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 24,
                "hscan" : { "minimum" : 0.1000, "maximum" : 0.1500 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 25,
                "hscan" : { "minimum" : 0.1500, "maximum" : 0.2000 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 26,
                "hscan" : { "minimum" : 0.2000, "maximum" : 0.2500 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 27,
                "hscan" : { "minimum" : 0.2500, "maximum" : 0.3000 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 28,
                "hscan" : { "minimum" : 0.3000, "maximum" : 0.3500 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 29,
                "hscan" : { "minimum" : 0.3500, "maximum" : 0.4000 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 30,
                "hscan" : { "minimum" : 0.4000, "maximum" : 0.4500 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 31,
                "hscan" : { "minimum" : 0.4500, "maximum" : 0.5000 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 32,
                "hscan" : { "minimum" : 0.5000, "maximum" : 0.5500 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 33,
                "hscan" : { "minimum" : 0.5500, "maximum" : 0.6000 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 34,
                "hscan" : { "minimum" : 0.6000, "maximum" : 0.6500 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 35,
                "hscan" : { "minimum" : 0.6500, "maximum" : 0.7000 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 36,
                "hscan" : { "minimum" : 0.7000, "maximum" : 0.7500 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 37,
                "hscan" : { "minimum" : 0.7500, "maximum" : 0.8000 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 38,
                "hscan" : { "minimum" : 0.8000, "maximum" : 0.8500 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 39,
                "hscan" : { "minimum" : 0.8500, "maximum" : 0.9000 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 40,
                "hscan" : { "minimum" : 0.9000, "maximum" : 0.9500 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 41,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0600 }
            },
            {
                "index" : 42,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0909 }
            },
            {
                "index" : 43,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.0909, "maximum" : 0.1818 }
            },
            {
                "index" : 44,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.1818, "maximum" : 0.2727 }
            },
            {
                "index" : 45,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.2727, "maximum" : 0.3636 }
            },
            {
                "index" : 46,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.3636, "maximum" : 0.4545 }
            },
            {
                "index" : 47,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.4545, "maximum" : 0.5455 }
            },
            {
                "index" : 48,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.5455, "maximum" : 0.6364 }
            },
            {
                "index" : 49,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.6364, "maximum" : 0.7273 }
            },
            {
                "index" : 50,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.7273, "maximum" : 0.8182 }
            },
            {
                "index" : 51,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.8182, "maximum" : 0.9091 }
            },
            {
                "index" : 52,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.9091, "maximum" : 1.0000 }
            },
            {
                "index" : 53,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 54,
                "hscan" : { "minimum" : 0.9000, "maximum" : 0.9500 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 55,
                "hscan" : { "minimum" : 0.8500, "maximum" : 0.9000 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 56,
                "hscan" : { "minimum" : 0.8000, "maximum" : 0.8500 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 57,
                "hscan" : { "minimum" : 0.7500, "maximum" : 0.8000 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 58,
                "hscan" : { "minimum" : 0.7000, "maximum" : 0.7500 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 59,
                "hscan" : { "minimum" : 0.6500, "maximum" : 0.7000 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 60,
                "hscan" : { "minimum" : 0.6000, "maximum" : 0.6500 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            },
            {
                "index" : 61,
                "hscan" : { "minimum" : 0.5500, "maximum" : 0.6000 },
                "vscan" : { "minimum" : 0.9400, "maximum" : 1.0000 }
            }
        ],
    
        "endOfJson" : "endOfJson"
    }
    
    I tried to update hyperion, restart the raspberry and it seems to work for the first couple of minutes, but then the problem is there again.
    I'm able to take a grabber screenshot, but the logs tells me the following:
    [​IMG]

    Any help? Here a picture of my setup. Honestly, it started since i moved the video grabber USB stick from that port to another for space issues. But i hope it's just a coincidence, i didn't really tried it a lot before.
    [​IMG]
    E
    dit: sorry, i noticed that i wrote in the wrong section, i wanted to fost in Software. Could this post be moved?
     
    Last edited: 8 November 2020
  2. jeroen warmerdam

    jeroen warmerdam Raspberry 3B / APA102 / WS2801 / Hyperion.NG

    Messages:
    126
    Hardware:
    RPi3
    why the old Hyperion with Hypercon when you can have the new build?

    look for Hyperion.NG 2.08
     
  3. Awawa

    Awawa Active Member

    Messages:
    227
    Hardware:
    RPi1/Zero, RPi3, +nodeMCU/ESP8266
    Frame's size mismatch for YUV (where framesize is constant) indicates problem with v4l2 driver caused mostly by hardware (grabber, usb bus, voltage jumps et). It can happens on the start of video process capturing during initialization but not after. Upgrading to Hyperion.NG may or not help. Check dmesg.
     
  4. sciorty

    sciorty New Member

    Messages:
    3
    Hardware:
    RPi3
    Ok, thank you all.
    I've tried to disable the blackborder detection that i turned on, modify other settings to the default ones but nothing.

    Actually i didn't now about this new build. I'm not an expert at all in linux compiling, I simply removed Hyperion from the Hypercon interface, the run this script (since i cannot install Hyperbian as I do have other stuffs in my Raspbian):
    Code:
    wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/docker-compile.sh && chmod +x *.sh && ./docker-compile.sh -i rpi-raspbian
    Apparently it all went well..

    [​IMG]

    But now? I guess i do have to start something somewhere but I'm not able to figure out what/where from the documentation (https://docs.hyperion-project.org/en/user/Configuration.html#web-configuration).
    I cannot reach the Web UI through that port.

    Thanks in advance for your patience toward a noob
     
  5. jeroen warmerdam

    jeroen warmerdam Raspberry 3B / APA102 / WS2801 / Hyperion.NG

    Messages:
    126
    Hardware:
    RPi3
    i didn't run the script in docker myself, so i think it installed itself in a virtual container.

    run the hyperiond service in terminal, or doubleclick the hyperiond and run/execute,
    after this you can reach (local adress) :8090

    in terminal go to direction of folder contains by cd name and enter,
    go back by cd ..
    if you arrived in folder then execute hyperiond
     
    Last edited: 8 November 2020
  6. sciorty

    sciorty New Member

    Messages:
    3
    Hardware:
    RPi3
    Did it! Had to sudo ./hyperiond and then install many libraries that were missing.

    After a short setup, I made it work in Hyperion NG. Weird thing is that also here the ambientlight effect was going ON and OFF, and the V4L2 row was indeed appearing and disappearing from this list below. As if the grabber was removed and inserted, i guess.
    [​IMG]
    After a while, it just started to work. I even switched back to Hypercon, stopping Hyperion NG, and it worked also there. I don't know, it's still working as I'm writing, but i'm just waiting for the problem to present again so that i can point out that it is an hardware one!

    In the meantime.. does anyone use it with Home Assistant? One thing that I find annoying is that when i select the HDMI effect from the entity, after a while the icon appears as if LEDs are OFF, while the ambientlight is still going. This does not happen with fixed colours or other "lamps" effect.
    [​IMG]