chestm007 / linux_thermaltake_riing

Python driver and daemon to control thermaltake Riing fans and pumps
GNU General Public License v2.0
61 stars 25 forks source link

Problem with chained controllers #34

Closed RogueHammerite closed 4 years ago

RogueHammerite commented 4 years ago

If you chain two controllers together using the bridge port rather than connect both to USB headers on the motherboard, you cant control or modify the fans attached to the secondary controller.

lsusb produces:

Bus 001 Device 006: ID 264a:1fa6 Bus 001 Device 004: ID 264a:1fa5

Line 121 of drivers.py is:

PRODUCT_ID_BASE = 0x1fa5

Running linux-thermaltake-rgb produces the desired effect but if you add any other units in the config.yml it just throws errors such as the following:


linux-thermaltake-rgb initializing thermaltake rgb daemon initializing FlowLightingEffect light controller kernel driver already detached kernel driver already detached Traceback (most recent call last): File "/usr/local/bin/linux-thermaltake-rgb", line 11, in load_entry_point('linux-thermaltake-rgb==0.2.0.post1564303991', 'console_scripts', 'linux-thermaltake-rgb')() File "/usr/local/lib/python3.6/site-packages/linux_thermaltake_rgb/daemon/main.py", line 34, in main daemon.run() File "/usr/local/lib/python3.6/site-packages/linux_thermaltake_rgb/daemon/daemon.py", line 72, in run self.lighting_manager.start() File "/usr/local/lib/python3.6/site-packages/linux_thermaltake_rgb/lighting_manager.py", line 275, in start device.set_lighting(mode=RGB.Mode.FLOW, speed=self._speed) File "/usr/local/lib/python3.6/site-packages/linux_thermaltake_rgb/devices/init.py", line 64, in set_lighting self.controller.driver.write_out(data) File "/usr/local/lib/python3.6/site-packages/linux_thermaltake_rgb/drivers.py", line 103, in write_out self.endpoint_out.write(self._populate_partial_data_array(data, length)) File "/usr/local/lib/python3.6/site-packages/usb/core.py", line 387, in write return self.device.write(self, data, timeout) File "/usr/local/lib/python3.6/site-packages/usb/core.py", line 948, in write self.get_timeout(timeout) File "/usr/local/lib/python3.6/site-packages/usb/backend/libusb1.py", line 842, in intr_write timeout) File "/usr/local/lib/python3.6/site-packages/usb/backend/libusb1.py", line 920, in write _check(retval) File "/usr/local/lib/python3.6/site-packages/usb/backend/libusb1.py", line 595, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) usb.core.USBError: [Errno 5] Input/Output Error

If I modify PRODUCT_ID_BASE = 0x1fa5 to be PRODUCT_ID_BASE = 0x1fa6, the second controller works, and the primary controller doesn't.

Perhaps a modification of drivers.py to be a modifiable list of devices rather than a single one?

RogueHammerite commented 4 years ago

So it turns out in my case I had to reverse the configuration to begin with unit 2 and follow with unit 1, it's working fine now. I think this is due to the USB device tree hardware assignments being in reverse order, so it's just my system playing mind games. Closing this!

snuffysasa commented 4 years ago

I had to do the exact same thing! this helped thank you