npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

homebridge-logitech-keyboard

v1.3.0

Published

Controlls Logitech keyboard lighting using g810-led under linux.

Downloads

10

Readme

homebridge-g810-led

This homebridge plugin allows controlling the lighting of Logitech keyboards under linux using g810-led.

Installing and homebridge plugin

The homebridge plugin will create a websocket server which provides the values that the homebridge receivies using homekit.

Install the plugin using npm:

$ sudo npm install -g homebridge-logitech-keyboard

After that restart your homebridge and create a new accessory. Here's a example config:

{
    "accessory": "G810-led",
    "name": "My Keyboard",
    "port": 50000,
    "rgb": false
}

You can change name to distinglish your keyboard.

The port parameter is setting the port of the websocket server that will run on the homebridge. You can change it if you want to connect more than one keyboard.

You should set rgb to true if your keyboard supports RGB. If it is set to false you only have controll over the brightness and it will always show white, this should be used if your keyboard has only white leds.

Installing the client on your linux machine

This client will connect to the websocket server of this plugin, get the color and use g810-led to update the lighting of your keyboard. You need to have g810-led installed.

A precompiled static binary for x86_64 is available in each GitHub release. Download it and add it to your PATH. If you need it for another architecutre you'll need to compile it yourself using go build in the go-client directory.

Temporarily start the client using this command:

$ homebridge-g810-led-client --command g810-led --server ws://<homebridge-ip>:<port>

You may want to change the --command parameter to use the correct command for your keyboard. Refer to this page to see all available commands.

The --server parameter sets the server. Change the ip and port accordingly.

There is also a --disableWhenIdle flag that will disable the lighting of your keyboard when your computer is idling for extended periods of time or locked. This feature is disabled by default and you have to enable it by passing the --disableWhenIdle flag to the client.

After you executed the command you can test whether everything works.

As a permanent install I recommend creating a systemd service unit to start the client if you start your computer.

To use a systemd service create a file at /etc/systemd/system/homebridge-g810.service with the following contents:

[Unit]
Description=Homebridge g810-led client
After=network-online.target

[Service]
Type=simple
Restart=on-failure
RestartSec=10s
ExecStart=/bin/sh -c 'homebridge-g810-led-client --command g810-led --server ws://<homebridge-ip>:<port>'
User=<yourUserName>

[Install]
WantedBy=multi-user.target

Then reload systemd and enable the service:

$ sudo systemctl daemon-reload
$ sudo systemctl enable homebridge-g810.service
$ sudo systemctl start homebridge-g810.service