Giter Club home page Giter Club logo

py_ping2hue's Introduction

py_ping2hue

Changes the hue and the brightness of one or more Philips Hue lights depending on the current ping value.

The color of the light will shift from green, past yellow and orange, to red as the ping worsens and/or more packets are lost. The brightness will increase from a minimum of 0 (minimal Hue brightness, for green) to 128 (half max. brightness, for red).

The script does not turn the lamps on or off on its own. You can simply turn off the lamp and keep the script running.

Motivation

Since we are currently suffering from intermittent unreliable internet connections, the phrase "Is the internet down again?" is frequently heard at our home.

To easier answer this question, I have whipped up this little script that pings a server and colors one of our Philips Hue lights based on the current response time. The script is running on a Raspberry Pi.

Features

  • changes hue and brightness of one or more Philips Hue lights depending on ping results
  • optionally turn those lights on and off automatically at specified times

Configuration

Copy sample_config.toml to config.toml and enter the necessary configuration values, especially the bridge parameters (see Get Started - Philips Hue Developer Program) and the lamp ID numbers. Finding the correct IDs is currently left as an exercise to the reader...

Roadmap

Some possible improvements to the script include:

  • configurable update period
  • configurable min and max brightness and the ability to disable brightness changes
  • support for light names, groups, and rooms

py_ping2hue's People

Contributors

piepero avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.