Git Product home page Git Product logo

jshue's People

Contributors

blargoner avatar nylki 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jshue's Issues

Typescript Support

Would be great to have the typings for typescript :)

Bonus:
Having classes for Light, Sensor, etc.

Getting light state

Thanks for this project, here's a (probably super-simple) question from a Javascript newbie ;-) I've got user.setLightState to work without issues so I can turn the lamp on or off, but how do I use getLight or getLights to check the status of the light? It just returns true (for sending the request) and not the actual status...

Sample for getting data from HUE bridge

I managed to control lamps and schedules via java script.
e.g. user.setSchedule(sched, { status: "disabled" }, function(data) { /* ... */ });

But how can I get information from the bridge?
Tried this, but it didn't work: user.getSchedule(sched, function(data) { st = data[0].status; });

Thank you very much!
Peter

Allow creation of user with bridge-generated username

In the future, the Hue API will no longer support creating users with custom usernames on the bridge, only users with bridge-generated usernames. A new bridge method will need to be added to jsHue to support this change.

It will look something like:

var bridge = jsHue().bridge('192.168.1.2');
bridge.createUser('foo application', function(data) {
    // extract bridge-generated username from returned data
    var user = bridge.user(data[0].success.username);
});

npm package please

Please have an npm wrapper for use with webpack/browserify. Npm packages are then managed for updates and devs can use the npm cdns out there. ๐Ÿ˜€

Proper example for the user.create ?

I am not sure what I am doing incorrectly, but I only get errors when creating a user.

var user = hue.bridge('10.0.0.162').user('bakman');

// create user account (requires link button to be pressed)

user.create('bakman huetest', 
    function(success){

        console.log(success)
    },
    function(error){
        console.log(error)

    }
    );
[{"error":{"type":7,"address":"/username","description":"invalid value, bakman, for parameter, username"}}]

Store the "user info" to use without authentication on every page reload?

Hi,

I managed to get authenticated and switch the lights on/off (inside the bridge.createUser function).

How do I store the "user info" to use it again later (without authentication on every page reload)?

tried:
var user = 'AME8QQ.......';
user.setLightState(1, { on: false }, function(data) { /* ... */ });
error = user.setLightState is not a function

Question: Workable in a QML/non-browser env?

Small question - does jshue have any browser-based dependencies, such as using window for storing values, or other behavior that only work in browsers?

Am asking, as I use QML (Qt Quick), which uses Javascript without browser-related components.

Regards,
Nc.

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.