FedeDP / Clightd

A linux bus interface that lets you change screen brightness, compute captured webcam frames brightness and change screen temperature.
GNU General Public License v3.0
83 stars 10 forks source link

Yocto Light sensors as ALS? #43

Closed aecepoglu closed 3 years ago

aecepoglu commented 4 years ago

Below is the output of udevadm monitor

I know they use the standard HID interface but I'm wondering how I can go about getting clight to read values from them.

Thank you

UDEV  [1979.537983] add      /class/usbmisc (class)
UDEV  [1979.538750] add      /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4 (usb)
UDEV  [1979.541120] add      /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4/1-3.4:1.0 (usb)
UDEV  [1979.542625] add      /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4/1-3.4:1.0/usbmisc/hiddev0 (usbmisc)
UDEV  [1979.543187] add      /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4/1-3.4:1.0/0003:24E0:0043.0009 (hid)
UDEV  [1979.551811] add      /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4/1-3.4:1.0/0003:24E0:0043.0009/hidraw/hidraw1 (hidraw)
UDEV  [1979.552210] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4/1-3.4:1.0/0003:24E0:0043.0009 (hid)
UDEV  [1979.552633] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4/1-3.4:1.0 (usb)
UDEV  [1979.553140] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4 (usb)
FedeDP commented 4 years ago

Hi! Latest clightd does indeed support Yoctolight (v3) sensor, and it must be enabled at compile time through ENABLE_YOCTOLIGHT cmake flag, eg: cmake -DENABLE_YOCTOLIGHT=true ../

Note that it is not yet advertised nor listed between sensors wiki page as i still have to fix some small issues here and there; it is not fully stable and may cause deadloops.

FedeDP commented 4 years ago

Ok, yoctolight sensor should now be fully supported. Let me know please if you are able to test it!

aecepoglu commented 4 years ago

I ended up writing some shell utility in the mean time to read sensor data and update screen brightness and other settings. And it has less than 20% of clight's features but because it's mine I'm having difficulty parting with it :)

I'll test it in a few days and let you know though

FedeDP commented 4 years ago

And it has less than 20% of clight's features but because it's mine I'm having difficulty parting with it

:D that's great to hear anyway! Can't blame you :)

I'll test it in a few days and let you know though

Thank you!

FedeDP commented 3 years ago

I will close this! Feel free to reopen if you spot any issue! Thank you very much!