Coder Social home page Coder Social logo

esp_hue's Introduction

Philips Hue Library for ESP8266

This library is designed to access and control Philips Hue Lights Directly with an ESP8266 using the Arduino IDE.

To use:

  1. Download ZIP

  2. In Arduino IDE from the menu Sketch→Include Library→Add .ZIP Library…​

  3. Browse to the .zip file and install

  4. Library will show up under Include Library

  5. Examples are in File→Examples→ESP_Hue

Available Class Methods:

void setAPIKey(const char* APIKey);
void setHubIP(const char* host);
void setHubPort(uint8_t port);
String getLightInfo(int lightNum);  								// Gets the light raw http request data
int getLightState(int lightNum);									// Gets Light State On, or Off
void setLight(int lightNum, int state, int sat, int bri, int hue);  // Set Light State, Saturation, Brightness, and Hue
void setLight(int lightNum, int state, int sat, int bri, int hue, unsigned int trans);  // Set Light State, Saturation, Brightness, and Hue, with transition speed
void setLightPower(int lightNum, int state);						// Set Light Power On, or Off
String getGroupInfo(int groupNum);									// Gets the group raw http request data
int getGroupState(int groupNum);									// Gets Group State On, or Off
void setGroup(int groupNum, int state, int sat, int bri, int hue);  // Set Group State, Saturation, Brightness, and Hue
void setGroup(int groupNum, int state, int sat, int bri, int hue, unsigned int trans);  // Set Group State, Saturation, Brightness, and Hue, with transition speed
void setGroupPower(int groupNum, int state);	                 	// Set Group Power On, or Off

See Examples for Usage

== License ==

Copyright (c) Richard Wardlow. All right reserved.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

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.