GithubHelp home page GithubHelp logo

andyharmon / eurovisionhue Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cnorthwood/eurovisionhue

0.0 0.0 0.0 635 KB

Make Philips Hue take the colour of the Eurovision country that's currently on

License: MIT License

Ruby 87.95% Dockerfile 6.52% HTML 5.52%

eurovisionhue's Introduction

Eurovision Hue controller

Scrapes the live blog, updates your Hue light colours according to the country most recently mentioned in that live blog.

Requires a modern Ruby. Install RVM: https://rvm.io/rvm/install and then rvm use 3.0.1 or something.

Install dependencies with Bundler

bundle

If you have issues installing Nokogiri at this point, follow the instructions at http://www.nokogiri.org/tutorials/installing_nokogiri.html#mac_os_x and try again.

You will also need to install ImageMagick: https://www.imagemagick.org/script/binary-releases.php. (If you get Terrapin::CommandNotFoundError, ths is probably why).

If you haven't yet, you'll need to register with the Hue bridge (only first time):

bundle exec lights discover -s
bundle exec lights register

Alternatively, if the first fails to discover your bridge, and you know the IP address, bundle exec lights config -i <IP ADDRESS>.

Now start the script:

bundle exec ruby eurovisionhue.rb

Docker

This can be built/run using docker and the included Dockerfile.

Build with:

docker build -t eurovisionhue .

Run initial config:

echo "{}" > ~/.lightsconfig
docker run --rm -it -v ~/.lightsconfig:/app/.lightsconfig eurovisionhue bundle exec lights discover -s
docker run --rm -it -v ~/.lightsconfig:/app/.lightsconfig eurovisionhue bundle exec lights register

Run with:

docker run --rm -it -v ~/.lightsconfig:/app/.lightsconfig eurovisionhue

Last.FM mode

deprecated, this needs rework

This also supports polling Last.fm and using your most recent track's album art as the colours to use. You need to have a last.fm API key:

LASTFM_USER=lastfm-user LASTFM_API_KEY=012344556 bundle exec ruby lastfmhue.rb

eurovisionhue's People

Contributors

andyharmon avatar cnorthwood avatar dependabot[bot] avatar gaving avatar robertcain avatar shanemcc avatar snyk-bot 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.