DallasHoff / homebridge-openrgb

Control the RGB lighting of your PC components and peripherals with HomeKit.
https://www.npmjs.com/package/homebridge-openrgb
Apache License 2.0
13 stars 0 forks source link

Connection Error with Corsair RAM #16

Open sovabprod opened 7 months ago

sovabprod commented 7 months ago

Problem:

A similar issue was described here https://github.com/DallasHoff/homebridge-openrgb/issues/8

If there is RAM in the openrgb application, the homebridge-openrgb plugin returns an ECONNRESET error.

If I disable RAM in the openrgb application then there is no problem and the plugin works correctly.

I discovered that if openrgb server is running on Windows, then there are no problems with RAM.

The problem only exists in Linux/MacOS

But when using the openrgb client there are no problems with RAM in any OS

You can see this in the video, on the server where homebridge is running, I launched the openrgb client for example (Tested different versions, 0.7/0.8/0.9) from which I connect without problems and control the backlight, including the RAM - there are no failures. Namely, the homebridge-openrgb plugin returns an error, the video shows that it connects, resets, and so on in a circle. But what’s strange is that at first it has the connection name client and not My Computer

https://github.com/DallasHoff/homebridge-openrgb/assets/166183074/1ee89db3-c110-4889-ada3-85315ed97ebe

homebridge server: 192.168.31.34

openrgb server: 192.168.31.158

Logs:

[4/6/2024, 4:02:14 AM] Error: read ECONNRESET
    at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
[4/6/2024, 4:02:14 AM] Error: read ECONNRESET
    at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
[4/6/2024, 4:02:14 AM] Got SIGTERM, shutting down Homebridge...
[4/6/2024, 4:02:14 AM] Error: read ECONNRESET
    at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
[4/6/2024, 4:02:15 AM] [OpenRGB] Unable to connect to OpenRGB SDK server at 192.168.31.158:6742
[4/6/2024, 4:02:15 AM] [OpenRGB] Unable to connect to OpenRGB SDK server at 192.168.31.158:6742
[4/6/2024, 4:02:15 AM] [OpenRGB] Unable to connect to OpenRGB SDK server at 192.168.31.158:6742

Plugin Config:

{
    "name": "OpenRGB",
    "servers": [
        {
            "name": "My Computer",
            "host": "192.168.31.158",
            "port": 6742
        }
    ],
    "discoveryInterval": 60,
    "preserveDisconnected": false,
    "suppressConnectionErrors": false,
    "platform": "OpenRgbPlatform"
}
sovabprod commented 7 months ago

I created new client for Homebridge, the issue is closed

DallasHoff commented 7 months ago

Did you figure out what the issue was in your case? If it might be applicable to others, it would be good to incorporate it into the package.

I'd be happy to review any code changes you might have and get them merged.

sovabprod commented 7 months ago

Installed your plugin again to check. Essentially this is a problem with RAM management in the sdk, as far as I remember in openrgb there is a separate branch for Corsair memory (She's quite problematic), and it has delays in other operating systems much longer than in windows, given the connection method, such a call will lead to a connection reset , I tested my theory in two ways:

  1. In platforms, I changed the connection to active, and everything works with 4 sticks of RAM. (Or you can update the status from the server side with the original plugin, there will be no problems either) Video:

https://github.com/DallasHoff/homebridge-openrgb/assets/166183074/744e5e21-5770-4e66-9b05-c99e51f03919

  1. I left 1 stick of RAM and your original plugin, everything works.

I tried a couple of options then, and in any case there were delays in responses that led to desync. I haven't done any detailed debugging of the SDK and I don't use your plugin. For my task, I made a different solution, custom server to use other devices, and used the old library for OpenRGB devices.

DallasHoff commented 7 months ago

Can you clarify what you mean by "changed the connection to active"? What did you change to fix the connection problem?