GithubHelp home page GithubHelp logo

100prznt / huehook Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 2.0 311 KB

Control your Philips Hue system with simple HTTP GET requests.

License: MIT License

C# 100.00%
philips-hue philips-hue-lights philips-hue-lighting philipshue webhook

huehook's Introduction

HueHook

Control your Philips Hue system with simple HTTP GET requests. POST parameters are not needed!

HueCmd

You can find a seperate README.md for HueCmd, now. Browse to HueCmd/README.md

How to use

Start the program

Since version 1.0.19

Before the first program start, a settings file must be created. You can modify the example file, found in ExampleData/HueHookSettings.xml. The file must be in the same directory as the program and named HueHookSettings.xml. See next point Settings for detailed informations.

Up to version 1.0.18

Run the HueHookServer.exe with 2 start parameters.

  • parameter 1: IP of the hue-bridge
  • parameter 2: authorized username to access the bridge*

To obtain this parameters you can start the program with a shortcut. Append the parameters to the target path, e.g. C:\path-to-program\HueHookServer.exe 192.168.0.1 my-app-key.

Settings

The program settings are stored in a xml-formated file, named HueHookSettings.xml. This file have one root node <HueHookSettings>, which have several child nodes.

Node Description
<BridgeIp> ⚠️ IP address of the Philips Hue Bridge
<BridgeUsername> ⚠️ authorized user on the Philips Hue Bridge*
<LocalServerIp>
<LocalServerPort> port of the HueHookServer
<WhiteList> ⚠️ this node contains child nodes (<IpAddress>) for each IP address of allowed client

⚠️ required setting

An example you can find under ExampleData/HueHookSettings.xml.

* to get an new username see the Getting Started article on my blog.

After successfully initialization the programm prints the server address (ip and port).

Use the program

Call the urls described below, each url starts with the address (ip and port) and have some optional parameters:

Description Name Value Light Group Scene
⚠️ URL /*.hue /light.hue /group.hue /scene.hue
⚠️ ID id 0 - 254 ✔️ ✔️ ✔️
On state on 0, 1 ✔️ ✔️
Hue hue 0 - 65535 ✔️ ✔️
Saturation sat 0 - 254 ✔️ ✔️
Brightness bri 0 - 254 ✔️ ✔️
Color Temperature ct 153 - 500 ✔️ ✔️

⚠️ required parameter   ✔️ parameter allowed   ❌ parameter not allowed

The URL must at least be made up of the required parameters (:warning:). In addition, further allowed parameters (:heavy_check_mark:) can be appended. The parameters are appended to the URL as a query string (name/value pairs), see the example below.

Example

The url http://192.168.0.1/light.hue?id=1&on=1&bri=127 means, switch on the light with id 1 and setup the brightness to a value of 127.

Security

  • Since version 1.0.14 access is only allowed from the same computer on which the program is running.
  • Since version 1.0.15 access is managed by a whitlist file, this file contains whitlisted ip-addresses (each per line). The file must be in the same directory as the program and named ip-whitelist.txt. An example you can find under ExampleData.
  • Since version 1.0.19 the whitelist is defined in the settings file. See Since version 1.0.19.

Releases

This project build on the continuous integration (CI) platform AppVeyor and released in the Release-Feed.

AppVeyor Build
AppVeyor Tests

GitHub Release
GitHub (Pre-)Release (Pre-)Release

Credits

  • Elias Ruemmler - Initial work - 100prznt

Under Contributors you can see more project supporter.

Open Source Project Credits

  • Q42.HueApi C# helper library to talk to the Philips Hue bridge

License

This project (HueHook) is licensed under MIT License.
Refer to LICENSE for more information.

license

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.