#!/usr/bin/env python3
from openrgb import OpenRGBClient
from openrgb.utils import RGBColor, DeviceType
import time
client = OpenRGBClient()
print(client)
print(client.devices)
keyboard = client.get_devices_by_type(DeviceType.KEYBOARD)[0]
client.clear() # btw example is wrong it should be .clear not .off
while True:
for x in range(360):
for led in keyboard.leds:
led.set_color(RGBColor.fromHSV(x, 100, 100), fast=False)
# client.set_color(RGBColor.fromHSV(x, 100, 100), fast=False)
time.sleep(.05)
I get this
OpenRGBClient(address=127.0.0.1, port=6742, name=openrgb-python)
[Device(name=EVision Keyboard, id=0)]
Traceback (most recent call last):
File "C:\Users\trajano\AppData\Roaming\Python\Python310\site-packages\openrgb\network.py", line 96, in read
self.sock.recv_into(header)
TimeoutError: timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\trajano\onedrive\Shell Keys\spectrum.py", line 18, in <module>
led.set_color(RGBColor.fromHSV(x, 100, 100), fast=False)
File "C:\Users\trajano\AppData\Roaming\Python\Python310\site-packages\openrgb\orgb.py", line 42, in set_color
self.update()
File "C:\Users\trajano\AppData\Roaming\Python\Python310\site-packages\openrgb\utils.py", line 664, in update
self.comms.requestDeviceData(self.device_id)
File "C:\Users\trajano\AppData\Roaming\Python\Python310\site-packages\openrgb\network.py", line 181, in requestDeviceData
self.read()
File "C:\Users\trajano\AppData\Roaming\Python\Python310\site-packages\openrgb\network.py", line 99, in read
raise utils.OpenRGBDisconnected() from e
openrgb.utils.OpenRGBDisconnected
I have the following code based on the example
I get this