OpenRGB + Home Assistant

That is amazing! Thanks for sharing.

I already had IOTLink set up but didn’t realise I could use it with OpenRGB. Thanks @Yenoromm!

I’ve tried to import the WIP that come from the current submitted PR as a custom components and it seems to work quite good (tested only for a few hours).

Same here. The PR works pretty well as a custom component.
Not sure if @bahorn is around here, but it would be worth submitting to HACS I think.

I can do it if he agrees to…

The component is available at koying/openrgb_ha: OpenRGB integration for Home Assistant (github.com)

Available in HACS…

6 Likes

Do we have any updates in this topic? I’m thinking about letting openRGB control my RGB lightbulbs connected to HA, do we have any final integration for that?

This service doesn’t seem to work anymore, it won’t connect to OpenRGB, just throws an unknown error

If you’re referring to this, it’s working perfectly for me on two computers based on a release of OpenRGB from last month.

Have you recently updated to a new build of OpenRGB?

I’ve just started with OpenRGB, so I have the latest everything. I’ve even tried the experimental.
Found this in the logs.

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 181, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 296, in async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 392, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/openrgb/config_flow.py", line 76, in async_step_user
    await asyncio.wait_for(
  File "/usr/local/lib/python3.11/asyncio/tasks.py", line 479, in wait_for
    return fut.result()
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/openrgb/config_flow.py", line 24, in _try_connect
    conn = OpenRGBClient(_host, _port, name=_client_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openrgb/orgb.py", line 287, in __init__
    self.comms.requestDeviceNum()
  File "/usr/local/lib/python3.11/site-packages/openrgb/network.py", line 188, in requestDeviceNum
    self.read()
  File "/usr/local/lib/python3.11/site-packages/openrgb/network.py", line 116, in read
    self.callback(device_id, packet_type, buff[0])
  File "/usr/local/lib/python3.11/site-packages/openrgb/orgb.py", line 302, in _callback
    self.comms.requestDeviceData(x)
  File "/usr/local/lib/python3.11/site-packages/openrgb/network.py", line 181, in requestDeviceData
    self.read()
  File "/usr/local/lib/python3.11/site-packages/openrgb/network.py", line 137, in read
    self.callback(device_id, packet_type, utils.ControllerData.unpack(data, self._protocol_version))
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openrgb/utils.py", line 552, in unpack
    mode = ModeData.unpack(data, version, x)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openrgb/utils.py", line 327, in unpack
    color_mode = ModeColors(parse_var('I', data))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 711, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 1128, in __new__
    raise ve_exc
ValueError: 64 is not a valid ModeColors

I’m certainly no expert, but it looks like the integration is struggling with on-boarding one of your devices.

It might be worth trying to disable each one in OpenRGB and adding one at a time to the integration to see what it fails on. In the mean time, you should create an issue on the integration’s repo with as much information as you ahve.

Thanks for your advice. I found the offending device. With it disabled, things are starting to work.

1 Like

I am probably making a complete rookie mistake here and confusing what this actually does…but…

I have OpenRGB HACS integration running on my little x86 HA Server. Now when I try to configure the integration it can’t connect. That isn’t unexpected, because I don’t have an OpenRGB Server running anywhere. Now the question is…can I run the Server as an Addon or something on my HA Server? It’s the only system that is always on, so it’s the logical choice…?

The Openrgb server is the openrgb software on your computer with your rgb lights. When you open that, there’s a Server tab where you can start the server. Once you’d done that, try creating the integration again.

1 Like

Ok thanks. I will see if I can figure it out and whether this is actually useful for me.
My PC offers me the option to sync with hue, but I have moved all my lights to Zigbee2mqtt and am no longer using the Hue hub

I too am using Z2M. My PC had mainly Asus Aura Rgb lights before I added a few different brands.

The rgb software provided by most of these big names are pretty poor. Openrgb serves a similar function to z2m - removes the need for several different pieces of software etc.

You can check on the openrgb website to confirm it supports your hardware.

1 Like

Will do. Thanks!

Hi, the latest 2025.1.0 HA (2024.12.3 supervisor) update broke the integration for me what was changed? It connects to it (i can see it inside the OpenRGB app running on my desktop that the HA machine IP is connected), but HA displays an error: “This entity is no longer being provided by the openrgb integration. If the entity is no longer in use, delete it in settings.”

1 Like

Same here!

1 Like

It’s due to deprecating magic number support for Light entity

Just copy and replace the new code from this PR Update from fork by Bluscream · Pull Request #43 · koying/openrgb_ha · GitHub using Studio Code Server plugin (the integration should be in the custom_components folder) and restart your HA. The dev should just merge in the PR… :stuck_out_tongue: