peter-murray / node-hue-api

Node.js Library for interacting with the Philips Hue Bridge and Lights
Apache License 2.0
1.19k stars 145 forks source link

Sensors API support #89

Closed PeteLawrence closed 5 years ago

PeteLawrence commented 8 years ago

Hi, thanks for all your work so far.

Have you got any plan to implement the part of the Hue API that deals with sensors/switches?

peter-murray commented 8 years ago

Yes, it is on my list, it is the rules based part of the API.

I am not likely going to get to it until later this year though, due to work commitments so if there is a particular part you need, let me know and I may be able to get something done when I have some spare time.

PeteLawrence commented 8 years ago

I'm looking at integrating it into a homebridge plugin, so that button presses of a Hue sensor can be used to trigger Homekit scenes. The particular parts I'd need would be listing of all sensors that have been registered, and getting the state of those sensors - eg. 5.1 and 5.5 of http://www.developers.meethue.com/documentation/sensors-api.

Happy to have a go at implementing it myself and raising a PR.

peter-murray commented 7 years ago

I have merged in an initial pull request on this that provides a sensors and getSensors function to list all the known sensors.

I need to expand the implementation to support the other API functions that you need. If you still want this, let me know exactly what API calls you need and I can prioritise those implementations for you.

Thanks

Connor-Knabe commented 7 years ago

@peter-murray I would love to see support for motion sensors (similar to what the native hue app does) so we could detect when motion is sensed and turn on lights accordingly (with more customization).

bwired-nl commented 6 years ago

any update on this, hope it will be supported

peter-murray commented 6 years ago

I will be adding more support in the next major release that I have started work on, but this incorporates a number of changes to remove be some older libraries and migrate to native promises, which will take some time to complete.

I would hope that I can get it finished before the end of the year.

bwired-nl commented 6 years ago

great! thanks for all the good work

Baenker commented 5 years ago

any news? Hope for motion sensor

bwired-nl commented 5 years ago

same here, please please update :-)

peter-murray commented 5 years ago

I will be resuming work on this as of this weekend, been inundated with work that has prevented me completing the update

bwired-nl commented 5 years ago

HI Peter any update, i hope you find the time, this is best Hue nodejs code, but missing sensors etc. I dont want to switch :-(

peter-murray commented 5 years ago

Hi, I made a massive start on this over the festive period, https://github.com/peter-murray/node-hue-api/tree/v_3 but still need to finish off a couple of backward compatible pieces to ensure that you do not need to change too much code.

I am going to try to get this completed in the next two weeks subject to real work getting in the way...

bwired-nl commented 5 years ago

Thanks Peter, we appreciate this very much!

jaruba commented 5 years ago

ping

peter-murray commented 5 years ago

I am just completing out the test suite for backwards compatibility and the documentation for the new API and the changes in the old/current API due to the removal of the ancient dependencies. There are still a few quirks that I am working through so as not to break too much of the existing code out there.

I expect to cut a release later this month.

jaruba commented 5 years ago

i got bored waiting and hooked into the hue sensor http api directly about 30 mins after pinging

peter-murray commented 5 years ago

There is an alpha release 3.0.0-alpha.2 in the npm registry as of now, this will be released as the next major version once I complete the documentation. All the API functionality is practically locked down now for

peter-murray commented 5 years ago

3.0.0 was released to npm registry today there is support for sensors under the v3 api