Random heavy delay spikes with cololight strip controller

  • Hi everyone.

    I'm currently using Hyperion with a cololight strip (and controller) on my windows computer. And having some issues.
    When I first connect, there is very minimal delay- perfect even. But as time passes there appears to be a heavt 1 second delay, which then esculates to a 2 second delay.

    Restarting hyperion and fiddling around with the settings seems to make the delay good again. but after a short while it appears to go bad again. Latchtime, retry interval, connection attempts... they all seem to have no affect.

    I was wondering, is there any other settings I can toggle to improve this? The LED video capture preview seems fine and it does work properly intially so I don't think it's to do with my capture method. What should I do?

    Any help is much appreciated.

  • Theguysayhi

    Changed the title of the thread from “Random heavy delay spikes in cololight strip” to “Random heavy delay spikes with cololight strip controller”.
  • Here are some logs from my console- not sure if they are of any help though:

    2023-05-03T06:02:49.400Z [LEDDEVICE|Cololight] (INFO) Switching device cololight ON
    2023-05-03T06:02:49.488Z [JSONSERVER] (INFO) Started on port 19444
    2023-05-03T06:02:49.492Z [WEBSERVER] (INFO) 'Hyperion http-Webserver' started on port 8090
    2023-05-03T06:02:49.500Z [WEBSERVER] (INFO) 'Hyperion https-Webserver' started on port 8092
    2023-05-03T06:02:50.327Z [LEDDEVICE|Cololight] (INFO) Device cololight is ON
    2023-05-03T06:02:50.327Z [LEDDEVICE|Cololight] (INFO) LedDevice 'cololight' enabled
    2023-05-03T06:02:53.347Z [EFFECTENGINE|Cololight] (INFO) Effect [Rainbow swirl fast] finished
    2023-05-03T06:02:53.348Z [EFFECTENGINE|Razor Mouse] (INFO) Effect [Rainbow swirl fast] finished
    2023-05-03T06:09:25.390Z [DXGRABBER] (ERROR) Unable to get Buffer Surface Data
    2023-05-03T06:09:25.408Z [DXGRABBER] (ERROR) Previous line repeats 1 times
    2023-05-03T06:09:25.408Z [DAEMON] (INFO) Screen lock event received
    2023-05-03T06:09:25.408Z [HYPERION-INSTMGR] (INFO) Put all instances in idle state
    2023-05-03T06:09:25.414Z [DXGRABBER] (ERROR) Unable to get Buffer Surface Data
    2023-05-03T06:09:25.470Z [LEDDEVICE|Cololight] (INFO) Switching device cololight OFF
    2023-05-03T06:09:25.470Z [LEDDEVICE|Razor Mouse] (INFO) Switching device razer OFF
    2023-05-03T06:09:25.472Z [LEDDEVICE|Razor Mouse] (INFO) Device razer is OFF
    2023-05-03T06:09:26.113Z [LEDDEVICE|Cololight] (INFO) Device cololight is OFF
    2023-05-03T09:37:59.900Z [DAEMON] (INFO) Screen unlock event received
    2023-05-03T09:37:59.900Z [HYPERION-INSTMGR] (INFO) Put all instances in working state
    2023-05-03T09:38:00.037Z [LEDDEVICE|Cololight] (INFO) Switching device cololight ON
    2023-05-03T09:38:00.037Z [LEDDEVICE|Razor Mouse] (INFO) Switching device razer ON
    2023-05-03T09:38:00.037Z [LEDDEVICE|Razor Mouse] (INFO) Device razer is ON
    2023-05-03T09:38:00.780Z [LEDDEVICE|Cololight] (INFO) Device cololight is ON

    • Official Post

    What is your screen resolution and what size decimation have you configured?

    I think you would need to reduce the resolution that is evaluated to calculate the LED output. Using a high resolution with low decimation leads to processing delays.

    Note that the preview is only to check, if input is there and to verify the mappings. You do not need a accurate preview, as the ambilight will not need a detailed resolution.

    Bear in mind, that if you have e.g. 60 LEDs on the top of your Monitor and you have 1200 pixel width, one LED represents 200 pixels.

    If you already reduce the number of pixels during capturing, the LED processing can cope with the data to process and do not cause delays.

    2nd influencing factor might be bad Wifi in your case, but I suggest you first work on reducing the capture load, I.e. reduce the capture resolution.

  • Sorry for the late reply.

    - My monitor is 2560x1440. I have a Ryzen 5700x. AMD 6900xt GPU.
    - I'm running a capture of 60fps (also tested with 30fps), and a decimation of 11-14.
    - My Wifi hits about 100mbs.

    As mentioned before in my earlier post, the light strip initially works without delay, but overtime ends up being choppy and delayed, to the point it takes about 2 seconds to regester a change. When I play around with the Remote Control option to change the lights manually they also appear delayed when a delay is present. This also includes animations (such as knight rider) to appear choppy.

    I'm a bit confused, testing with these settings there should be no issues I would assume, right?

    Please also find my cololight config bellow:

  • Bump.
    Incase it becomes a topic later, I have supplied my light strip with a proper power suppily, in the event it didn't have enough power.

    Still the same issue persists. I wonder what could be the cause...

  • Sorry for the reply again, is there any more insights on why this could be the case? I apologize in advance- I'm a bit confused and any help would be much appreciated.

    • Official Post

    If the system starts ok and then delays get worse and worse and even doing a color effect will show up with delay,

    you are putting too much load on the system.

    The delays occur, because the work queues up within Hyperion.

    To address the problem you have the following leavers:

    a) Reduce the pixels to be evaluated for a single LED.
    You do size decimation of 11 which means for one LED color a rectangle of 232x 103 pixels need to be calculated to find one mean color overall. For your high resolution try size decimation around 30.

    Alternatively, if you use smoothing, you can make use of the new feature of "Reduced Pixel Processing".
    that will take care that only a set of pixels per LED area evaluated, Low ~25%, Medium ~10%, High ~6%

    b) Reduce the FPS.
    The Cololight WiFi LEDs will anyway not be able to represent 60 FPS.
    Find a reasonable FPS that aligns with your LED string

    c) Given that the in-build Screen-Grabber is single threaded, you could try https://sabaatworld.github.io/HyperionScreenCap/ and feed the images via flatbuffers into Hyperion.

    I suggest you start with a) and b) reducing the processing load in line with the number of LEDs and what your LEDs are anyway capable of.
    Note: Just selecting higher values do not always guarantee better outcomes ...

  • Thanks again for the help and insight LordGrey, much appreciated!

    Hmm, I've tried all of these, and even with the Hyperion Screen Cap it seems the load eventually befomes too much. This is with a size decimation of 30, 30 fps, and using the HyperionScreenCap software via the Flatbuffers server. (in the case of using HyperionScreenCap, the performance is significantly worse).
    I will say howerever, that it took a lot longer for delay to appear this time! I note that when using the cololight app, there appears to be no decirnable delay.

    Is there any way I can clear the "work" that hyperion has cued up? When such a delay happens I attempt to reset hyperion, but the delay is still there, and doesn't vanish for quite a while.

  • Testing with colours/effects in the remote control section of hyperion still lags the lights, so I think it's unlikely that it's my capture system that's causing the delay...

    I believe I may have this problem outlined in this thread? Though I don't quite speak German: Hyperion NG + Cololight Strip

    Alright I think I'm just about nearly ready to be done with this. I've spend months on this project trying to get this thing to work and it's still a laggy mess. When it works it's absolutely wonderful, but it's just too finicky and I just don't see how it's going to get any better...

    I personally think that it's Hyperion not talking to the controller properly, the time's it's worked fine appears to be when I have the cololight app open on my phone. Otherwise hyperion just doesn't seem to work properly.

    I love everything that this software stands for, I really do, but it's just a real mystery to get it working properly...

    • Official Post

    I am sorry, that it is not working as expected.

    Since I have a Cololight strip too, I do not think it is about how Hyperion talks to the controller.

    Would you mind restating Hyperion and share a debug log incl. your configuration, please?
    Go to system->logs and copy logs to clipboard.

    In addition, how many Amp has your power-device you connected Cololight to?
    Iif you run with not enough power, Cololight's Wifi gets unstable.
    For an 120 LED strip you need a USB charger with minimum 2.4 A.

  • Here's some screenshots of my setup and logs of when the delays happen. Also note that this delay happens in the romote > colourpicker, so I think it's unlikely to do with the capture method, and something to do with either my setup, or cololight controler compatibility.

    I've tested with multiple power sources, from the back of my PC, to a phone usb charger, but found best results with a laptop usb charger. If that's not giving me enough power for a light strip I don't know what will.

    Note: I have updated my controller firmware through the cololight app, perhaps that's it? If hyperion hasn't been updated to match it?

    It's almost light the cololight controler has a "low power mode" that gets activated until the app turns it back to "high power mode".

    More logs of when the delay is present:

    Maybe the following debug lines could hint at some kind of error:

    2023-05-23T08:06:08.912Z [LEDDEVICE|Cololight] (INFO) Switching device cololight ON
    2023-05-23T08:06:10.313Z [LEDDEVICE|Cololight] (WARNING) Failed switching device cololight ON
    2023-05-23T08:06:10.313Z [LEDDEVICE|Cololight] (DEBUG) (LedDevice.cpp:186:LedDevice::enable()) Device's enablement failed

  • Does hyperion keep any data between restarts? Like a cache?

    I just restarted my computer and it worked like new again. However my screen capture crashed when playing a game, and then when I restarted it, I got a delay again.

    I wonder if hyperion is trying to juggle between multiple connections and getting overloaded trying to handle them all at once. Hence the increasing delay.

    Edit: Just restarted my computer again and it works perfectly again with no delay! I'm confident there is some kind of bug here.

    Short logs of Hyperion working, then working with delay on reconnecting the flatbuffers server:

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!