Skip to content

Add Illumination Light control interface for HID++ 2.0 - #34

Open
hadess wants to merge 5 commits into
cvuchener:masterfrom
hadess:wip/hadess/illumination
Open

Add Illumination Light control interface for HID++ 2.0#34
hadess wants to merge 5 commits into
cvuchener:masterfrom
hadess:wip/hadess/illumination

Conversation

@hadess

@hadess hadess commented Sep 15, 2024

Copy link
Copy Markdown
Contributor

Just the power on/off is implemented for now.

Documented in x1990_illumination_v1.pdf in:
https://drive.google.com/drive/folders/0BxbRzx7vEV7eWmgwazJ3NUFfQ28

Just the power on/off is implemented for now.

Documented in x1990_illumination_v1.pdf in:
https://drive.google.com/drive/folders/0BxbRzx7vEV7eWmgwazJ3NUFfQ28
@hadess

hadess commented Sep 15, 2024

Copy link
Copy Markdown
Contributor Author

Tested through USB and Bluetooth

cc @GeorgesStavracas

@hadess

hadess commented Sep 15, 2024

Copy link
Copy Markdown
Contributor Author

USB:

/dev/hidraw5: Logitech Litra Beam (046d:c901) HID++ 4.2

Bluetooth:

/dev/hidraw4: Litra Beam (046d:b901) HID++ 4.2

@hadess
hadess force-pushed the wip/hadess/illumination branch 2 times, most recently from ec68745 to 2ad1d20 Compare September 16, 2024 08:58
@hadess

This comment was marked as outdated.

@hadess
hadess force-pushed the wip/hadess/illumination branch from 2ad1d20 to cd0a7fd Compare September 16, 2024 10:26
@hadess

hadess commented Sep 16, 2024

Copy link
Copy Markdown
Contributor Author

It compiles and works on my system, yay.

@GeorgesStavracas

Copy link
Copy Markdown

With Logitech Litra Glow:

$ src/tools/hidpp-list-devices 
/dev/hidraw12: Logi Litra Glow (046d:c900) HID++ 4.2

$ src/tools/hidpp-list-features  -v /dev/hidraw12
Logi Litra Glow (046d:c900) is a HID++ 4.2 device
Feature 0x01: [0x0001] Feature set
Feature 0x02: [0x0003] Device FW version
Feature 0x03: [0x0005] Device name
Feature 0x04: [0x1990] Illumination Light control
Feature 0x05: [0x1eb0] ? (hidden)
Feature 0x06: [0x00c2] DFUcontrol 3 (hidden)

[ Manually turned on the light ]
$ src/tools/hidpp20-illumination-light-control -v /dev/hidraw12 state
	state: 1

[ Manually turned off the light ]
$ src/tools/hidpp20-illumination-light-control -v /dev/hidraw12 state
	state: 0

$ src/tools/hidpp20-illumination-light-control -v /dev/hidraw12 toggle
[ Light turned on properly ]

$ src/tools/hidpp20-illumination-light-control -v /dev/hidraw12 toggle
[ Light turned off properly ]

[ Manually turned on the light ]
$ src/tools/hidpp20-illumination-light-control -v /dev/hidraw12 brightness
	brightness: 84
	min: 20
	max: 250
	res: 1
Error code : Invalid function ID

So all seems fine with this model. The last call had an invalid function id but this seems expected given the PR description.

Will do a similar test with the Litra Beam later.

The Litra Glow doesn't support a different effective maximum brightness,
so return 0 as the value for that variable as it “[signifies] that there
is no effective maximum brightness in effect”.
@hadess

hadess commented Oct 22, 2024

Copy link
Copy Markdown
Contributor Author

Looks like the Litra Glow doesn't have a "max effective" brightness. I think the commit I added should let the brightness command run through without any errors.

Have you tried the temp command? I don't know if that light has support for it.

@GeorgesStavracas

Copy link
Copy Markdown

Looks like the Litra Glow doesn't have a "max effective" brightness. I think the commit I added should let the brightness command run through without any errors.

Okay I'll try it soon.

Have you tried the temp command? I don't know if that light has support for it.

I didn't test it, but this is what it outputs:

$ src/tools/hidpp20-illumination-light-control -v /dev/hidraw12 temp
	temperature: 5000
	min: 2700
	max: 6500
	res: 100

This is without the latest commit. So I think it's working fine.

@GeorgesStavracas

Copy link
Copy Markdown

With the latest commit:

$ src/tools/hidpp20-illumination-light-control -v /dev/hidraw12 brightness
	brightness: 84
	min: 20
	max: 250
	res: 1
	effective max: 250

I think it fixed it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants