HomeAssistant LED-Instance shows either black or only one frame in preview, no live video.

  • Version: Hyperion.ng Version 2.1.1 LordGrey-bde49a8/26fd6d8-1749918223


    Operating System: Raspbian GNU/Linux 12 (bookworm)


    Hardware: Raspberry Pi 3 Model B Rev 1.2


    Video Input: USB Video Grabber, connected to an external video source.


    LED Outputs: Two separate LED instances:

    • LED Instance 0 (TV Backlight): "ws281x" Controller, configured as a TV backlight. Works flawlessly with live video.,
    • LED Instance 1 (Lamp): "homeassistant" Controller, configured as a separate lamp. Shows black in the preview and does not update. The LEDs light up with the correct color when a new frame is manually refreshed via the preview button.,

    Control: Home Assistant


    Problem Description


    I have set up a multi-instance configuration on a single Raspberry Pi with Hyperion.ng. Instance 0 receives a live video signal from a USB grabber and successfully controls my TV backlight. I want Instance 1, which controls a lamp via Home Assistant, to also receive the live video signal from the same grabber to synchronize with the right side of the screen.


    However, Instance 1 does not receive a live video feed. When I open the preview for Instance 1 in the Hyperion.ng web interface, it either shows black or only displays a single static frame that does not update. The lamp changes its color according to this single frame, but there is no continuous update. When I manually refresh the preview, the instance receives a new single frame, and the lamp's color updates again. This confirms that the LED hardware configuration and video zone mapping are correct. The problem is exclusively with the live video transmission from the video source to Instance 1.


    I have already performed the following troubleshooting steps and a lot of AI troubleshooting:


    Log check: There are no visible errors or warnings in the logs related to the connection or video transmission.


    Forwarder configuration: I have tried to set up a JSON Forwarder in the master instance (Instance 0) pointing to the local IP address 127.0.0.1 and the port of the second instance.


    Priority settings: I have ensured that no other sources or effects with higher priority are active that could override the video stream.


    Home Assistant integration: I have checked the Home Assistant configuration for priority conflicts, without success.


    Technical Questions and Inconsistencies


    V4L2 device lock issue: The fact that live streaming fails, but a single frame gets through, is confusing. I understand that a VIDIOC_S_FMT error occurs when the /dev/video0 device is used by more than one process simultaneously, but a multi-instance configuration should prevent this within the single hyperiond process itself. Is there a bug that prevents the live signal from being forwarded from the first to the second instance, even though the logic for static images works?


    Internal communication: How exactly does the internal communication between the instances in the hyperiond application work? Is the forwarder system the only method for internal communication? Or is there a separate, internal mechanism that could be affected by a bug?


    Forwarder syntax: The forwarder configuration is not intuitive. It expects a list of JSON targets with hostname/IP, port, and instance ID. Are there specific syntax or convention requirements for a local loopback setup that are not clearly described in the documentation? For example, would I need to explicitly specify the instance ID of the second instance in the forwarder configuration of the master instance?


    Potential bugs: Is this behavior known in the community? Is there a specific version that is considered stable for a led multi-instance setup (ws281x + HomeAssistant) on a single device? Could Flatbuffer targets be more stable than JSON targets?


    I am asking for help diagnosing this issue. Any support, especially from developers or experienced users with similar setups, would be highly appreciated.


    EDIT:

    Just removed the Instance 0 (TV Backlight) and the lamp is still only lighting up in the color of the current frame when i refresh. No live view. Seems to me like a bug in the homeassistant controller.

    Edited once, last by xdtj777 ().

  • xdtj777

    Changed the title of the thread from “Multi-Instance Setup on a single Raspberry Pi: Second instance shows either black or only one frame in preview, no live video.” to “HomeAssistant LED-Instance shows either black or only one frame in preview, no live video.”.

Participate now!

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