Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Linux, accessory is detected as a new one after reboot #12

Open
abrvham opened this issue Jun 13, 2023 · 4 comments
Open

On Linux, accessory is detected as a new one after reboot #12

abrvham opened this issue Jun 13, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@abrvham
Copy link

abrvham commented Jun 13, 2023

Describe The Bug:

When the computer restarts, the same accessory is detected as a new accessory (and the previous one becomes unreachable.
Thus, every scenes gets messed up.
(The accessory is always pluged in when the OpenRGB server is up)

To Reproduce:
Shutdown the computer, restart the computer.
Start OpenRGB: openrgb --server (doing it via systemctl)

Expected behavior:

The accessory is recognized as a previously added accessory.

Logs:

[6/13/2023, 5:52:56 PM] [OpenRGB] Adding new accessory: NZXT Kraken X3

Plugin Config:

{
"name": "OpenRGB",
"servers": [
{
"name": "xxxx",
"host": "192.168.xxxx.xxxx",
"port": 6742
}
],
"discoveryInterval": 60,
"preserveDisconnected": true,
"suppressConnectionErrors": false,
"platform": "OpenRgbPlatform"
}

Environment:
Ubuntu for the computer AND homebridge. NZXT Kraken X3 device

  • Plugin Version: v1.4.0

  • Homebridge Version: [v1.6.1]

  • Node.js Version: v16.20.0

  • Operating System: Ubuntu for the computer AND homebridge

@abrvham abrvham added the bug Something isn't working label Jun 13, 2023
@DallasHoff
Copy link
Owner

Could you provide the information that the OpenRGB application lists in the Information tab for that cooler? Name, location, serial number, etc. Does any of that information change after a reboot? Does this happen with other devices or just that cooler?

@abrvham
Copy link
Author

abrvham commented Jun 15, 2023

Sure
Before reboot:

0: NZXT Kraken X3
  Type:           LED Strip
  Description:    NZXT Hue 2 Device
  Version:        2.1.0
  Location:       HID: /dev/hidraw5
  Serial:         00000000001A
  Modes: [Direct] Static Fading 'Spectrum Cycle' Marquee 'Cover Marquee' Alternating Pulsing Breathing Candle 'Starry Night' 'Super Rainbow' 'Rainbow Pulse' 'Rainbow Flow'
  Zones: 'Hue 2 Channel 1' 'Hue 2 Channel 2' 'Hue 2 Channel 3'
  LEDs: 'Hue 2 Channel 1, LED 1' 'Hue 2 Channel 1, LED 2' 'Hue 2 Channel 1, LED 3' 'Hue 2 Channel 1, LED 4' 'Hue 2 Channel 1, LED 5' 'Hue 2 Channel 1, LED 6' 'Hue 2 Channel 1, LED 7' 'Hue 2 Channel 1, LED 8' 'Hue 2 Channel 1, LED 9' 'Hue 2 Channel 1, LED 10' 'Hue 2 Channel 1, LED 11' 'Hue 2 Channel 1, LED 12' 'Hue 2 Channel 1, LED 13' 'Hue 2 Channel 1, LED 14' 'Hue 2 Channel 1, LED 15' 'Hue 2 Channel 1, LED 16' 'Hue 2 Channel 2, LED 1' 'Hue 2 Channel 2, LED 2' 'Hue 2 Channel 2, LED 3' 'Hue 2 Channel 2, LED 4' 'Hue 2 Channel 2, LED 5' 'Hue 2 Channel 2, LED 6' 'Hue 2 Channel 2, LED 7' 'Hue 2 Channel 2, LED 8' 'Hue 2 Channel 3, LED 1'

After reboot:

0: NZXT Kraken X3
  Type:           LED Strip
  Description:    NZXT Hue 2 Device
  Version:        2.1.0
  Location:       HID: /dev/hidraw1
  Serial:         00000000001A
  Modes: [Direct] Static Fading 'Spectrum Cycle' Marquee 'Cover Marquee' Alternating Pulsing Breathing Candle 'Starry Night' 'Super Rainbow' 'Rainbow Pulse' 'Rainbow Flow'
  Zones: 'Hue 2 Channel 1' 'Hue 2 Channel 2' 'Hue 2 Channel 3'
  LEDs: 'Hue 2 Channel 1, LED 1' 'Hue 2 Channel 1, LED 2' 'Hue 2 Channel 1, LED 3' 'Hue 2 Channel 1, LED 4' 'Hue 2 Channel 1, LED 5' 'Hue 2 Channel 1, LED 6' 'Hue 2 Channel 1, LED 7' 'Hue 2 Channel 1, LED 8' 'Hue 2 Channel 1, LED 9' 'Hue 2 Channel 1, LED 10' 'Hue 2 Channel 1, LED 11' 'Hue 2 Channel 1, LED 12' 'Hue 2 Channel 1, LED 13' 'Hue 2 Channel 1, LED 14' 'Hue 2 Channel 1, LED 15' 'Hue 2 Channel 1, LED 16' 'Hue 2 Channel 2, LED 1' 'Hue 2 Channel 2, LED 2' 'Hue 2 Channel 2, LED 3' 'Hue 2 Channel 2, LED 4' 'Hue 2 Channel 2, LED 5' 'Hue 2 Channel 2, LED 6' 'Hue 2 Channel 2, LED 7' 'Hue 2 Channel 2, LED 8' 'Hue 2 Channel 3, LED 1'

The location seems to change. However it's seems like a normal behavior in Ubuntu (at least)?

@abrvham
Copy link
Author

abrvham commented Jun 15, 2023

I've rebuilt your project after removing the location from the uuid calculation and it works well. I don't know if the location stays the same on Windows platform but on Linux, the HID will change after reboot because it will depend of the order they are mounted.

A quick fix would be to add a setting to disable the location from the UUID calculation (even tho it means that users should be sure that the name of their OpenRGB devices are differents).

@DallasHoff
Copy link
Owner

Hmm, it's tricky because from what I've seen, it's common for devices to report a fake or empty serial number (all but one of my devices do, for instance) and device names can easily be the same (e.g. a pair of RAM sticks). That's why location is used in the UUID calculation since #1. On Windows, it does stay the same. I'm not sure how to make it reliable for Linux too. Maybe OpenRGB could be updated to provide the device's UUID from Linux instead of its /dev path? I'll look into it.

@DallasHoff DallasHoff changed the title Accessory is detected as a new one after every reboot On Linux, accessory is detected as a new one after reboot Jun 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants