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

Reading state from device #22

Open
abergmeier opened this issue Oct 10, 2022 · 6 comments
Open

Reading state from device #22

abergmeier opened this issue Oct 10, 2022 · 6 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@abergmeier
Copy link

Shouldn't there be a way of reading the current state off the device?

@kharyam
Copy link
Owner

kharyam commented Dec 2, 2022

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!

@abergmeier
Copy link
Author

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.

@kharyam kharyam added enhancement New feature or request help wanted Extra attention is needed labels Dec 6, 2022
@IngoHenning
Copy link

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.

@abergmeier
Copy link
Author

abergmeier commented Dec 7, 2022

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.

@Jcapehart2
Copy link

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.

Nice on the state check, how did you get those and did you get the one for temperature?

@abergmeier
Copy link
Author

Read the spec and implemented the kernel driver. For temperature it should be sending 11ff0481 00000000 00000000 00000000 00000000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants