By Dan Moren
September 6, 2022 6:00 AM PT
Controlling the Logitech Litra Glow via Shortcuts
You might think that being away on paternity leave would mean 2am feedings, lots of diaper changes, and not a lot of spare time in which to muck about with silly technology projects.
And on two out of three of those, you’d be absolutely right.
But after several hours of tending to and entertaining a newborn, the brain starts to crave some other form of intellectual pursuit and delving into a knotty tech problem, well, that’s just my way of unwinding. I ended up undertaking a number of little projects over the last several weeks, from the unfortunately urgent—dealing with a dead computer (more on which in another post)—to the leisurely—upgrading and tweaking my office setup.
Most recently, I found myself trying to untangle a particular niche frustration. Several months back I bought a Logitech Litra Glow: it’s a small USB-powered light that perches atop my monitor, intended to help me improve my lighting setup for streams and videos. Previously I’d been using a $20 USB-powered book light that had gotten a little unwieldy.
The Litra Glow is a pretty nice piece of hardware: it has variable levels of brightness and color temperatures, has a well-designed adjustable mounting bracket, and is priced pretty reasonably at $60. It’s controlled by physical buttons on its back and has separate rockers for brightness and color temperature, as well as an on/off switch. That’s nice, though a little awkward because you have to reach up toward the camera to adjust your lighting.
However, the Litra Glow is also controllable via Logitech’s G Hub software. Which is, well, terrible. I’d much rather have control via my Stream Deck or Shortcuts or really any other software, but despite what look like a number of requests for Logitech to provide an open API, none has been forthcoming.
In previous months, I’d taken a desultory look at seeing if anybody else had cracked this, but hadn’t come across anything. But the other day, as I was making sure my office was all shipshape, I decided to take another crack at it.
This time I came across a Github project that had reverse engineered the Logitech API and provided command line tools to control the Litra Glow. Just one problem: the project was designed for use on Linux and wasn’t easily compatible with macOS. Adapting the project was beyond me, but I kept poking around, convinced that somebody else must have encountered this issue, and I quickly stumbled across the solution via programmer Paul Hubbard.
Paul had the technical know-how I lacked and supplied the biggest missing component: another Github project called
hidapitester, a command-line tool that lets you interact with USB devices as long as you know what codes to send.
And good news! The creator of the Linux project that reverse-engineered the Litra Glow drivers had already done that heavy lifting, so all that remained was to turn those long codes into shorter commands, which Paul accomplished via the use of aliases in the
zsh shell.1 I followed his instructions and sure enough, it works a treat.
Per Paul’s example, I was even able to set up a Shortcut to run a shell script that controls the lights in basic ways, which was then easy to port to the Stream Deck. And, it also means that it’ll be easier to automate this in the future as part of a larger workflow.
Yes, in an ideal world, there’d be a way to quickly tweak the relative lighting levels and color temperatures up and down, just like on the physical buttons, but that again requires slightly more complexity (either reading the device’s current state or storing that information locally). For the moment, I’ll have to be satisfied with having at least gotten this far. Big thanks to Paul Hubbard for blazing the trail here, and, I suppose, on to the next project.
Though he uses a system called Oh My ZSH! to manage the aliases, I just stuck with defining them in the
.zshrcfile in my home directory. ↩
[Dan Moren is the East Coast Bureau Chief of Six Colors. You can find him on Twitter at @dmoren or reach him by email at email@example.com. The latest novel in his Galactic Cold War series of sci-fi space adventures, The Nova Incident, is available now.]
If you appreciate articles like this one, support us by becoming a Six Colors subscriber. Subscribers get access to an exclusive podcast, members-only stories, and a special community.