Skip to content

Go implementation of a CLI and UI to control Logitech Litra Glow and Beam

License

Notifications You must be signed in to change notification settings

kharyam/go-litra-driver

Repository files navigation

Go workflow Go Report Card - configGo Report Card - libGo Report Card - cliGo Report Card - ui

logo Go utility for Litra Glow and Beam

Introduction

After purchasing a Logitech Litra Glow I was unable to find any support for linux. I created a python project which reverse-engineered the basic functionality of the litra glow so that we can control it via USB without using the physical buttons on the device. It also now supports the Logitech Litra Beam. This project is the port from python to go.

Quick Start

Linux

# If necessary, create a udev role to grant permission to access the light
sudo tee /etc/udev/rules.d/82-litra-glow.rules <<< 'SUBSYSTEM=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c900",MODE="0666"'
sudo tee /etc/udev/rules.d/82-litra-beam.rules <<< 'SUBSYSTEM=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c901",MODE="0666"'

# For most operating systems, reloading udev rules is enough
sudo udevadm control --reload-rules
sudo udevadm trigger

# For others, a reboot may be required
# sudo reboot

# Command Line Interface
lcli --help

# User Interface
lcui

The UI

A basic UI can be launched to allow control of the light:

lcui

lcui Screen Shot

The CLI

This command line interface allows you to control a litra Glow or Beam 
device using the commands described below.

Usage:
  lcli [command]

Available Commands:
  bright      Sets the brightness level (0-100)
  brightdown  Decrements the brightness by the amount specified
  brightup    Increments the brightness by the amount specified
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  off         Turn lights off
  on          Turn lights on
  temp        Sets the temperature of the lights (2700 - 6500)
  tempdown    Decrements the temperature by the amount specified
  tempup      Increments the temperature by the amount specified

Flags:
  -h, --help     help for lcli
  -t, --toggle   Help message for toggle

Use "lcli [command] --help" for more information about a command.

Sample Usage

lcli on
lcli bright 10
lcli temp 6500
lcli brightup 30
lcli tempdown 2000
lcli off

About

Go implementation of a CLI and UI to control Logitech Litra Glow and Beam

Resources

License

Stars

Watchers

Forks

Packages

No packages published