litra-driver
litra-driver copied to clipboard
Reading state from device
Shouldn't there be a way of reading the current state off the device?
Hey @abergmeier there probably is, but I haven't gotten around to reverse engineering that capability. I'll keep this issue on the backlog, thanks!
FYI: I am currently working on getting the Litra into the kernel: https://www.spinics.net/lists/linux-usb/msg232494.html
Still quite a few problems to figure out, though.
On Windows G-Hub is not able to read the current state of the device. If I change the brightness or temperature outside of G-Hub and start G-Hub afterwards, G-Hub always shows the last values set through G-Hub. That said I'm not very optimistic to get the current state from device.
By the way, great work so far. I adapted your code to powershell, trying to use the Litra Glow with Stream Deck. Presets work quite good, am looking for brightness and temperature up and down now.
On Windows G-Hub is not able to read the current state of the device. If I change the brightness or temperature outside of G-Hub and start G-Hub afterwards, G-Hub always shows the last values set through G-Hub.
Noticed that too when sniffing the usb communication.
That said I'm not very optimistic to get the current state from device.
Oh, you totally can. I already do it in the kernel.
You can e.g. send 11ff0401 00000000 00000000 00000000 00000000
to get the on/off state or 11ff0431 00000000 00000000 00000000 00000000
to get the brightness.
On Windows G-Hub is not able to read the current state of the device. If I change the brightness or temperature outside of G-Hub and start G-Hub afterwards, G-Hub always shows the last values set through G-Hub.
Noticed that too when sniffing the usb communication.
That said I'm not very optimistic to get the current state from device.
Oh, you totally can. I already do it in the kernel. You can e.g. send
11ff0401 00000000 00000000 00000000 00000000
to get the on/off state or11ff0431 00000000 00000000 00000000 00000000
to get the brightness.
Nice on the state check, how did you get those and did you get the one for temperature?
Read the spec and implemented the kernel driver. For temperature it should be sending 11ff0481 00000000 00000000 00000000 00000000