Philips Hue app?

Discussions about Z-Way software and Z-Wave technology in general
BobElHat
Posts: 23
Joined: 27 Dec 2016 21:32

Re: Philips Hue app?

Post by BobElHat » 14 Jan 2017 21:53

Glad it's working. What kind of Hue lights do you have? As I only have Ambience lights I'd be interested to know if it all still works with the coloured ones or the plain white ones.

I think at the moment it'll create a colour device for the plan white bulbs as there's no code to detect them, but it would be very easy to add that.

klaasjoerg
Posts: 97
Joined: 30 Sep 2016 23:49

Re: Philips Hue app?

Post by klaasjoerg » 14 Jan 2017 21:58

I just noticed, that the defined Saturation- and Brightnesslevels are updated and shown properly. Also if I change brightnes with iphone-hue-app it's updated properly in the zwave-UI. So, that's good.

But this is not the case for the color-settings in the RGB-device. So that would be a nice little thing.
Additionally it would be good to immediately see the color, without having to click on the RGB pulldown. e.g. similar to the zwave-RGB-Bulb...(see screenshot below)
Attachments
ss 1.png
ss 1.png (28.33 KiB) Viewed 878 times

klaasjoerg
Posts: 97
Joined: 30 Sep 2016 23:49

Re: Philips Hue app?

Post by klaasjoerg » 14 Jan 2017 22:09

I have several Philips Hue LivingColors Iris, some Philips Hue LightStrip+ a lot of Philips Hue LED-Bulbs and also some Philips Hue LivingColors Bloom. They all work fine, as I can say right now.

What I just noticed too:
If I try to create a new color scene within zway-me (scene app), it's showing me all the brightness and saturation devices, but not the rgb-devices as dimmers or so.

So right now I couldn't figure out how to pre-define/adjust presets of light-scenes because the rgb-devices is somehow missing. Hmmm. have to think about because of course you don't really want to change all the lights/devices manually from yellow to orange, or green etc.
Ideas?

BobElHat
Posts: 23
Joined: 27 Dec 2016 21:32

Re: Philips Hue app?

Post by BobElHat » 15 Jan 2017 03:54

Yes, the code for updating the colour of RGB lights hasn't been written yet. Minux hadn't written it and I've not got any so I didn't add it as I wouldn't be able to test it.

Not sure about updating the UI element, but for refreshing the values set via your phone or whatever it'll need a function to convert the coordinates the Hue uses to the ones ZWay uses, there's one that goes the other way (Hue.prototype.toXY) so it'll need the reverse function writing and the code to update the ZWay device adding to Hue.prototype.refreshHueLight.

As for adding RGB lights to scenes, I think that's a problem with the scene module rather than the Hue module - it just doesn't have the right UI elements.

Looking at the Hue API documentation, it should be possible to control the colour just using Hue and Saturation controls, and if I'm reading it right then a colour temperature control would also work on the colour lights. It appears the app doesn't create a hue control at the moment, just brightness and saturation. That would be easy to add though.

If you could use hue and saturation to set the levels then you could control those with a scene - or smoothly transition between them with the module I wrote this evening :) DimmableScene.

klaasjoerg
Posts: 97
Joined: 30 Sep 2016 23:49

Re: Philips Hue app?

Post by klaasjoerg » 15 Jan 2017 22:55

Yes, you are right. I will give it a try.
Currently I am still using my old bash-shell script to deal with my hue' devices from zway., because of one new more reason:
Suddenly I have all in all 54 new virtual devices in zway - for my 18 physical hue-lights. (3 for each light).
While this is not a problem for zway of course, it's a problem for Apple's homebridge/homekit.

Now I have far more than 100 devices in total and apple hombridge/homekit is not able to deal with this limit, so completely breaks. So I had to deactivate the hue-app again completely an re-setup homebridge again.
The solution for now would be quite easy: Simply adding "Homebridge.Skip" Tag to all Philips-Hue-Devices, because zway doesn't need to provide those back to Homekit anyway. I just didn't found out the easiest way to achieve this yet. (apart from doing it manually). Another setting in App-Settings would be great for this. A kind of "default-tags" to define or so. Going to have a look at you code now... ;-)

BobElHat
Posts: 23
Joined: 27 Dec 2016 21:32

Re: Philips Hue app?

Post by BobElHat » 15 Jan 2017 23:16

If you're looking at the code there's a development branch up on Github. It's a pretty rough at the moment, but I have made the device IDs consistent so it doesn't break all your scenes when you reinitialise the module (unfortunately it'll still lose tags and rooms).

I've mostly done some refactoring as dealing with different kinds of lights was getting clumsy. I know the RGB colour picker and scenes don't work in the development version (commented out as I still need to make them work with the amended sendAction), but there's a slim chance that you'll get hue, saturation and colour temperature controls (if you have extended colour lights). Oh, and it gets the API key automagically.

klaasjoerg
Posts: 97
Joined: 30 Sep 2016 23:49

Re: Philips Hue app?

Post by klaasjoerg » 16 Jan 2017 00:15

I simply added the following default-tag for all hue-devices during creation:
vDev.addTag("Homebridge.Skip");
I think it makes sense adding this generally, because the Philips Huebridge is already providing all Hue-Devices to Homekit. Thus hombridge-zway doesn't need to do this creat triple-redundant informations to Homebridge and Homekit. (And additionally: On my side it solves the problem of having to deal with more than 100 Homekit-Accessories )

BobElHat
Posts: 23
Joined: 27 Dec 2016 21:32

Re: Philips Hue app?

Post by BobElHat » 16 Jan 2017 01:43

Great idea (and useful for me too!). I've added it in the same way in the development version, but made it a configurable option as not everyone might want the tags cluttering things up.

A better way to do it would be to have a field to add whatever tags you like, but that's for the future :)

BobElHat
Posts: 23
Joined: 27 Dec 2016 21:32

Re: Philips Hue app?

Post by BobElHat » 17 Jan 2017 01:41

The good news is that I went out and bought some new Lightstrips. Any excuse to buy more toys!

I've added the RGB colour picker back in to the development version. The great news is that when you set a colour with the colour picker, when it next refreshes from the bridge (every 15 seconds) the Hue and Saturation sliders are set to the right values for that colour! That means you can pick a colour and wait for the refresh to see the appropriate Hue and Saturation values to use in a scene. The colour might be slightly off as the multilevel control only goes from 0-99 and the Hue accepts 0-65000 so it's not nearly as precise, but the colour is still very close.

To download the development branch:

Code: Select all

git clone -b development https://github.com/timauton/Hue.git
I'll merge it back in to the master once I have scenes working again.

klaasjoerg
Posts: 97
Joined: 30 Sep 2016 23:49

Re: Philips Hue app?

Post by klaasjoerg » 17 Jan 2017 15:15

Hi, I just pulled you github-dev-branch and it already works very well! - Good job!

Personally I won't really use the original "Philips scenes" because it's always limited to philips lights and I have so many more zwave-dimmers/switches installed. So next, I can finally go and try define dimmable-scenes (with your other app) and try to cover every thinkable light-scenery. In the past I used to use only Homekit (eve and home app) for this. But running this from zwave seems to be much more reliable and still allows use of Siri too.

By the way: I added a little recommendation to your github project. Have a look.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests