Giter Site home page Giter Site logo

josef-friedrich / hue-shell Goto Github PK

View Code? Open in Web Editor NEW
53.0 11.0 5.0 404 KB

A collection of UNIX shell scripts to control the Hue LED lamps from Philips.

Home Page: http://josef-friedrich.github.io/Hue-shell/

License: MIT License

Shell 98.77% Python 0.61% Makefile 0.62%
shell unix hue-lamps

hue-shell's Introduction

Build Status

Hue-shell is a collection of shell scripts to control the Hue lamps from Philips.

                    _________________________
                   /                         \
                  +    ___________________    +
                  |   /                   \   |                      .
                  |   + _$ hue set 1 --on  +  |            .    +    ,
                  |   |                    |  |             \   '   /
  ,+.             |   +                    +  |              ` ,+. '
 (   )            |   \___________________/   |           +-+ (   ) +-+
  \ /     -->     +  /+\               _      +     -->        \ /
 _+=+_             \_________________________/                _+=+_
+_____+              !______________________!                +_____+

It is designed for embedded operating systems with very limited resources (successfully tested on the old and outdated wifi router "Linksys WRT54GL").

Hue-shell runs on many shells (sh, dash, ash, bash) and many UNIX operating systems (Linux, MacOS X, FreeBSD, OpenWrt). Hue-shell works well in a small BusyBox environment. Out of the box Hue-shell runs on many single-board computer like Raspberry Pi, Cubieboard, BeagleBone etc.

Installation

sudo sh -c "OPT=install; $(curl -fksSkL http://raw.github.com/Josef-Friedrich/Hue-shell/master/install.sh)"

To install Hue shell manually please read the documentation on the project page.

Features

              .--------------.
           ___|  _  _  _  _  |_________________
          /   |  || || || ||_|___             /;      Hue-shell runs on
         /.--------------.      /|___        //     many single-board computer
        / |  _  _  _  _  |     / ___ \      //     like Raspberry Pi,
       /  |  || || || || |____/ ___ \(\)   //     Cubieboard, BeagleBone etc.
      /   |  || || || || |    | /  \(\)   //
     /    |______________|____|/   (\)   //
    / _                                 //
   / (\) Raspberry Pi                  //
  /___________________________________//
  `-----------------------------------'
  • Versatile basic command hue set ...
  • Requires very little resources, runs in small UNIX environments
  • Moving light scenes to create a ambient and decent atmosphere (huescene-breath ..-pendulum, ..-sequence)
  • Background services to detect reachable bridge and blubs.

For further documentation please visit the project site:

http://josef-friedrich.github.io/Hue-shell/

Commands

Basic commands

Load commands

One color commands

Scene commands

Service commands

Management commands

hue-shell's People

Contributors

bjori avatar josef-friedrich avatar kvnco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hue-shell's Issues

SenseHAT turns all lights on when you press the joystick

I have a SenseHAT attached to a Raspberry Pi, where I use hue-shell to control lights. I use the SenseHAT's joystick to turn a video surveillance system on or off. When pressed it triggers (or emulates) a key pressed (ENTER) button event.

When I press the button, all lights are turned on, regardless I shut down the hue service (with hue stop). I've disabled the hue service (with systemctl disable hue-shell.service and hue-detect-bridge.service and hue-detect-lights.service) with same result.

When I press the button I can see this on the log file:
[hue] HTTP_REQUEST: PUT PATH: groups/0/action DATA: {"on":true}

I don't know why it triggers a PUT to all lights.

Thanks
Alfonso

Problem bei Restart des Clients

Hi,

ich übersehe vermutlich etwas Grundlegendes, aber wenn ich den Raspberry auf dem hue-shell installiert ist neu starte, dann wechseln alle zu diesem Zeitpunkt eingeschalteten hue-Lampen die Farbe. Erst werden sie auf den Standard-warmweiß-Ton gestellt und wechseln dann ein wenig durch und schalten final (nachdem der Raspberry wieder hochgefahren ist) auf rot.

Was mache ich hier falsch bzw. was muss ich ändern um dieses Verhalten abzuschalten?

Lights are set to red when DNS disappears

I've got a confusing issue, where sometimes all the lights that are currently ON turn red. It seems to be related to the network -- specifically DNS -- dropping.

I had originally thought that it was running a scene upon dropping and reconnecting from the hub, but I tried to disable that, and it is still happening.

DEFAULT_SCENE='hueload-random'

The only scene is 'default.scene', which looks like it might set things red, but to try to debug this issue before, I had tried inserting an 'exit' in default.scene before it does anything.

However, it still set the lights red when the DNS server rebooted.

sudo usage

I haven't checked the whole script but i'm pretty sure this script doesn't necessarily need sudo. Could you please provide an option to enable/disable the usage of sudo?

Console-paste-installation not working on Openwrt

Console-paste-installation not working on Openwrt

sh -c "OPT=install; $(curl -fksSL https://raw.github.com/Josef-Friedrich/Hue-shell/master/install.sh)"

Terminal output:

Hue-shell-master/
Hue-shell-master/.gitignore
Hue-shell-master/LICENSE.md
Hue-shell-master/README.md
Hue-shell-master/base.sh
Hue-shell-master/bin/
Hue-shell-master/bin/hue
Hue-shell-master/bin/huecolor-basic
Hue-shell-master/bin/huecolor-recipe
Hue-shell-master/bin/hueload-default
Hue-shell-master/bin/hueload-random
Hue-shell-master/bin/hueload-scene
Hue-shell-master/bin/huescene-breath
Hue-shell-master/bin/huescene-pendulum
Hue-shell-master/bin/huescene-sequence
Hue-shell-master/bin/hueservice-detect-bridge
Hue-shell-master/bin/hueservice-detect-lights
Hue-shell-master/config/
Hue-shell-master/config/hue-shell.conf
Hue-shell-master/config/random-scenes.conf
Hue-shell-master/config/scenes/
Hue-shell-master/config/scenes/default.scene
Hue-shell-master/doc/
Hue-shell-master/doc/hue-manager.txt
Hue-shell-master/doc/hue.txt
Hue-shell-master/doc/huecolor-basic.txt
Hue-shell-master/doc/huecolor-recipe.txt
Hue-shell-master/doc/hueload-default.txt
Hue-shell-master/doc/hueload-random.txt
Hue-shell-master/doc/hueload-scene.txt
Hue-shell-master/doc/huescene-breath.txt
Hue-shell-master/doc/huescene-pendulum.txt
Hue-shell-master/doc/huescene-sequence.txt
Hue-shell-master/doc/hueservice-detect-bridge.txt
Hue-shell-master/doc/hueservice-detect-lights.txt
Hue-shell-master/install.sh
Hue-shell-master/service/
Hue-shell-master/service/README.md
Hue-shell-master/service/SysVinit/
Hue-shell-master/service/SysVinit/load-default
Hue-shell-master/service/openwrt.initd/
Hue-shell-master/service/openwrt.initd/detect-bridge
Hue-shell-master/service/openwrt.initd/detect-lights
Hue-shell-master/service/openwrt.initd/load-default
Hue-shell-master/service/systemd/
Hue-shell-master/service/systemd/detect-bridge
Hue-shell-master/service/systemd/detect-lights
Hue-shell-master/service/systemd/load-default
Hue-shell-master/tags
Hue-shell-master/triggerhappy/
Hue-shell-master/triggerhappy/hue-shell.conf
BusyBox v1.22.1 (2014-09-20 22:01:35 CEST) multi-call binary.

Usage: mkdir [OPTIONS] DIRECTORY...

Create DIRECTORY

    -m MODE Mode
    -p  No error if exists; make parent directories as needed

install: -r config/hue-shell.conf config/random-scenes.conf config/scenes
mkdir: 
BusyBox v1.22.1 (2014-09-20 22:01:35 CEST) multi-call binary.

Usage: mkdir [OPTIONS] DIRECTORY...

Create DIRECTORY

    -m MODE Mode
    -p  No error if exists; make parent directories as needed

install: base.sh
BusyBox v1.22.1 (2014-09-20 22:01:35 CEST) multi-call binary.

Usage: cp [OPTIONS] SOURCE... DEST

Copy SOURCE(s) to DEST

    -a  Same as -dpR
    -R,-r   Recurse
    -d,-P   Preserve symlinks (default if -R)
    -L  Follow all symlinks
    -H  Follow symlinks on command line
    -p  Preserve file attributes if possible
    -f  Overwrite
    -i  Prompt before overwrite
    -l,-s   Create (sym)links

install: bin/hue bin/huecolor-basic bin/huecolor-recipe bin/hueload-default bin/hueload-random bin/hueload-scene bin/huescene-breath bin/huescene-pendulum bin/huescene-sequence bin/hueservice-detect-bridge bin/hueservice-detect-lights
cp: can't stat 'bin/hueservice-detect-lights/hue': Not a directory
cp: can't stat 'bin/hueservice-detect-lights/huecolor-basic': Not a directory
cp: can't stat 'bin/hueservice-detect-lights/huecolor-recipe': Not a directory
cp: can't stat 'bin/hueservice-detect-lights/hueload-default': Not a directory
cp: can't stat 'bin/hueservice-detect-lights/hueload-random': Not a directory
cp: can't stat 'bin/hueservice-detect-lights/hueload-scene': Not a directory
cp: can't stat 'bin/hueservice-detect-lights/huescene-breath': Not a directory
cp: can't stat 'bin/hueservice-detect-lights/huescene-pendulum': Not a directory
cp: can't stat 'bin/hueservice-detect-lights/huescene-sequence': Not a directory
cp: can't stat 'bin/hueservice-detect-lights/hueservice-detect-bridge': Not a directory
install: install.sh /hue-manager
mkdir: 
BusyBox v1.22.1 (2014-09-20 22:01:35 CEST) multi-call binary.

Usage: mkdir [OPTIONS] DIRECTORY...

Create DIRECTORY

    -m MODE Mode
    -p  No error if exists; make parent directories as needed

BusyBox v1.22.1 (2014-09-20 22:01:35 CEST) multi-call binary.

Usage: chmod [-R] MODE[,MODE]... FILE...

Each MODE is one or more of the letters ugoa, one of the
symbols +-= and one or more of the letters rwxst

    -R  Recurse

BusyBox v1.22.1 (2014-09-20 22:01:35 CEST) multi-call binary.

Usage: touch [-c] FILE...

Update the last-modified date on the given FILE[s]

    -c  Don't create files

BusyBox v1.22.1 (2014-09-20 22:01:35 CEST) multi-call binary.

Usage: chmod [-R] MODE[,MODE]... FILE...

Each MODE is one or more of the letters ugoa, one of the
symbols +-= and one or more of the letters rwxst

    -R  Recurse

mkdir: 
BusyBox v1.22.1 (2014-09-20 22:01:35 CEST) multi-call binary.

Usage: mkdir [OPTIONS] DIRECTORY...

Create DIRECTORY

    -m MODE Mode
    -p  No error if exists; make parent directories as needed

install: doc/hue-manager.txt doc/hue.txt doc/huecolor-basic.txt doc/huecolor-recipe.txt doc/hueload-default.txt doc/hueload-random.txt doc/hueload-scene.txt doc/huescene-breath.txt doc/huescene-pendulum.txt doc/huescene-sequence.txt doc/hueservice-detect-bridge.txt doc/hueservice-detect-lights.txt
cp: can't stat 'doc/hueservice-detect-lights.txt/hue-manager.txt': Not a directory
cp: can't stat 'doc/hueservice-detect-lights.txt/hue.txt': Not a directory
cp: can't stat 'doc/hueservice-detect-lights.txt/huecolor-basic.txt': Not a directory
cp: can't stat 'doc/hueservice-detect-lights.txt/huecolor-recipe.txt': Not a directory
cp: can't stat 'doc/hueservice-detect-lights.txt/hueload-default.txt': Not a directory
cp: can't stat 'doc/hueservice-detect-lights.txt/hueload-random.txt': Not a directory
cp: can't stat 'doc/hueservice-detect-lights.txt/hueload-scene.txt': Not a directory
cp: can't stat 'doc/hueservice-detect-lights.txt/huescene-breath.txt': Not a directory
cp: can't stat 'doc/hueservice-detect-lights.txt/huescene-pendulum.txt': Not a directory
cp: can't stat 'doc/hueservice-detect-lights.txt/huescene-sequence.txt': Not a directory
cp: can't stat 'doc/hueservice-detect-lights.txt/hueservice-detect-bridge.txt': Not a directory
BusyBox v1.22.1 (2014-09-20 22:01:35 CEST) multi-call binary.

Usage: touch [-c] FILE...

Update the last-modified date on the given FILE[s]

    -c  Don't create files

BusyBox v1.22.1 (2014-09-20 22:01:35 CEST) multi-call binary.

Usage: chmod [-R] MODE[,MODE]... FILE...

Each MODE is one or more of the letters ugoa, one of the
symbols +-= and one or more of the letters rwxst

    -R  Recurse

Installing init.d services ...
install: service/openwrt.initd/load-default /etc/init.d/hue-load-default
install: service/openwrt.initd/detect-lights /etc/init.d/hue-detect-lights
install: service/openwrt.initd/detect-bridge /etc/init.d/hue-detect-bridge
uninstall: /tmp/Hue-shell-master
uninstall: /tmp/Hue-shell.tar.gz

Support randomly generated bridge usernames (required from Feb 2016)

I'll just refer to the official documentation from Philips regarding this:

http://www.developers.meethue.com/documentation/important-whitelist-changes

Please be aware that in the coming months it will no longer be possible to create custom whitelist entries on the Hue bridge. The randomly generated bridge username must be used instead.
It is anticipated this change will be rolled out to the public in February 2016.

This means that if you have developed a Hue Library or have a Hue app in the market which uses a custom whitelist username the bridge authentication will start failing after this date. So of course, if this is the case for your app/library it is strongly advised for you to update your app/library in the coming months to use the randomly generated bridge username.

Doesn't work in MacOSX

Hey.

Wanted to use the Hue Shell, but couldn't install on MacOSX latest version. sudo ./install.sh install throws a lot of "Operation is not permitted"

See for instance.

cp: /usr/bin/huecolor-basic: Operation not permitted
cp: /usr/bin/huecolor-recipe: Operation not permitted
cp: /usr/bin/hueload-default: Operation not permitted
cp: /usr/bin/hueload-random: Operation not permitted
cp: /usr/bin/hueload-scene: Operation not permitted
cp: /usr/bin/huescene-breath: Operation not permitted
cp: /usr/bin/huescene-pendulum: Operation not permitted
cp: /usr/bin/huescene-sequence: Operation not permitted
cp: /usr/bin/hueservice-detect-bridge: Operation not permitted
cp: /usr/bin/hueservice-detect-lights: Operation not permitted

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.