Luminous Logitech Litra on Linux
I have been working on developing a course for Xdebug, PHP's Debugger. I am now close to start making the first recordings, so I thought it would be good to invest in some lighting and a green screen.
The light that I bought is a Logitech Litra Glow, but once it arrived I quickly found out that if you want to control its brightness and light temperature, you need a Windows or macOS app. I have neither, bummer. It was not a total disaster as there are buttons on the light to do the same.
When I have had "Windows/macOS" only tech in the past, there was usually already somebody who has reverse engineered it. For my old TomTom smart watch, there was ryanbinns/ttwatch, which I ended up contributing to.
It turned out that the Logitech Litra was no exception. I found a Python implementation of a command line and UI tool, which does the job after messing around with some UDEV rules to allow non-root users make use of it:
sudo su -
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c900", MODE:="0666", GROUP="plugdev"' > /etc/udev/rules.d/82-litra-glow.rules
udevadm control --reload-rules && udevadm trigger
After I plugged in the light again, I could now control it through the Python UI and command line tools.
However, a separate tool is not really what I was after. I rather would like to control it from my Elgato Stream Deck through a Go application that I have written for it. Although I could configure it to use a command line tool invocation, I thought it would be nicer if I could control it directly from that Go applications. Which meant that I had to write a Go driver for it.
Building on top of the work on the Python driver, I extracted the specific bytes to send to the USB device, and wrapped that with the derickr/go-litra-driver. After some research into how to talk directly with a USB device, that turned out to be not too hard. I could now control the Litra from Go!
The next step was to integrate the driver into my Stream Deck control app. I added a configuration with 2 different colour temperatures, and each with three light levels. Combined with a state to turn the light off, that makes seven configurations that the button can cycle through.
Success! I can now control the Logitech Litra Glow from my Stream Deck.
Life Line
I know my French is pretty terrible, but I'm sure I'm closer to the correct answer than what's shown here...
Merge branch 'v2022'
Merge pull request #169 from psumbera/solaris-2
I walked 7.0km in 1h6m48s
Fixed some ffing sidewalks again.
I walked 10.5km in 1h40m26s
Updated a pet_grooming shop
I walked 8.6km in 2h12m58s
I walked 8.7km in 1h24m16s
Updated a restaurant
I walked 2.4km in 24m20s
I walked 6.6km in 1h4m32s
I walked 0.6km in 4m38s
I walked 8.5km in 1h22m35s
Merged pull request #1029
Reflow some comments
Add comments, add end of file newlines, fix php 8.5 compilation
Benchmark Xdebug performance
Merged pull request #1051
PHP 8.6: printf() is now optimised out if it only uses %s and %d (andβ¦
PHP 8.6: The object IDs of objects changed in tests
PHP 8.6: ZSTR_INIT_LITERAL() no longer takes non-literals, so use zenβ¦
PHP 8.6: WRONG_PARAM_COUNT has been removed in favour of zend_wrong_pβ¦
PHP 8.6: zval_dtor() has been deprecated in favour of zval_ptr_dtor_nβ¦
Update test for version constraints, as well as the error messages


Shortlink
This article has a short URL available: https://drck.me/linuxlitra-h50