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-magichome-sync

v0.1.1

Published

Syncs a display to your Magic Home device that's controllable with Homebridge

Downloads

7

Readme

Sync your Magic Home device to your display and control it all via Homebridge

This Homebridge plugin provides a simple switch that enables and disables a Python script on a host display. The script finds the most dominant colour on the display ands sends it to a Magic Home light.

The result is a much more immersive viewing experience.

Installation

Homebridge

Given that you already have Homebridge installed and set up, you can install this plugin with the following command:

$ sudo npm install -g homebridge-magichome-sync

Host Display

A Python version >= 3 must be used to run the host application.

First you must clone the repository on the host machine using the following command:

$ git clone https://github.com/mjsamuel/Homebridge-MagicHome-Sync.git

After that, to create a virtual environment for all the projects dependencies to be installed into, use the following commands:

# Navigate to the host folder
$ cd Homebridge-MagicHome-Sync/host

# Create a Python virtual environment
$ python -m venv venv

# Activate the virtual environment
$ source ./venv/bin/activate

# Download the requirements
$ pip install -r requirements.txt

Once all the dependencies have been installed, to run the Python script use the following command:

$ python run.py

The Python application can also be configured to run on startup using tools such as forever or launchctl.

Configuration

Settings

  • name is the name for the accessory, default is "Magic Home Sync"
  • host_ip is the IP address of the host device that is running the sync program
  • host_port is the host display port, default is "6006"
  • light_ip is the IP address of the light to be synced with the host
  • light_type is the Magic Home device type, being either "RGB", "RGBW" or" RGBWW", default is "RGBW"
  • polling interval is the interval in seconds that the lights are updated in, default is 1

Example Configuration

"accessories": [
    {
        "accessory": "MagicHomeSync",
        "name": "MH Sync",
        "host_ip": "192.168.2.128",
        "host_port": 6006,
        "light_ip": "192.168.2.129",
        "light_type": "RGBWW",
        "polling_interval": 0.5
    }
]

Acknowledgements

Many thanks to: