[122] Philips Hue support Topic is solved

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: [122] Philips Hue support

Post by gizmocuz »

Blueone wrote:it is possible to change the colors from the lights live when adding the lights to a scene?
Implemented in #2090
Quality outlives Quantity!
dennusb
Posts: 12
Joined: Thursday 23 October 2014 8:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [122] Philips Hue support

Post by dennusb »

Strange behaviour here.... i want to add the Hue Bridge so a added "hardware" ->

Image

All looking good... but when i click "Register on Bridge" i get :

Image

What to do?
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: [122] Philips Hue support

Post by gizmocuz »

Leave the username empty, then press register, it should give you a new username.
i think domoticz is to short, or because it is registered as device 'domoticz' you can not also use the username 'domoticz'
Quality outlives Quantity!
dennusb
Posts: 12
Joined: Thursday 23 October 2014 8:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [122] Philips Hue support

Post by dennusb »

gizmocuz wrote:Leave the username empty, then press register, it should give you a new username.
i think domoticz is to short, or because it is registered as device 'domoticz' you can not also use the username 'domoticz'
Yes, that is it. You cant fill in a username by yourself. Maybe good idea to disable that input box and say next to it will be automatically filled! This is confusing!
globalassist
Posts: 25
Joined: Monday 09 December 2013 16:51
Target OS: Windows
Domoticz version: Beta
Location: Netherlands
Contact:

Re: [122] Philips Hue support

Post by globalassist »

I don't get it.
Using build 2084 on Windows, I can only add the Hue Bridge with username "newdeveloper" which I created on the Hue Bridge.
I cannot register it or add it with a different username (it also does not generate a user).
Even when I add it with the newdeveloper-user it doesn't list any lights.
In the logging the following is displayed:
Tue Oct 28 20:44:06 2014 Philips Hue: Worker started...
Tue Oct 28 20:44:06 2014 EventSystem stopped...

What am I doing wrong?
dennusb
Posts: 12
Joined: Thursday 23 October 2014 8:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [122] Philips Hue support

Post by dennusb »

globalassist wrote:I don't get it.
Using build 2084 on Windows, I can only add the Hue Bridge with username "newdeveloper" which I created on the Hue Bridge.
I cannot register it or add it with a different username (it also does not generate a user).
Even when I add it with the newdeveloper-user it doesn't list any lights.
In the logging the following is displayed:
Tue Oct 28 20:44:06 2014 Philips Hue: Worker started...
Tue Oct 28 20:44:06 2014 EventSystem stopped...

What am I doing wrong?
Add a bridge to the hardware page but DON'T fill in the username, just click "Register on bridge", a username is generated automatically.
globalassist
Posts: 25
Joined: Monday 09 December 2013 16:51
Target OS: Windows
Domoticz version: Beta
Location: Netherlands
Contact:

Re: [122] Philips Hue support

Post by globalassist »

Nops, then a Red blob is displayed : Undefined
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: [122] Philips Hue support

Post by gizmocuz »

New windows version, and wiki updated

http://www.domoticz.com/wiki/Philips_Hue_Lights
Quality outlives Quantity!
Blueone
Posts: 130
Joined: Friday 29 November 2013 11:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [122] Philips Hue support

Post by Blueone »

Everything is working goed now :D
Is it possible to read the current color from lights in the webinterface from domoticz instead of only the script? (maybe with a text field below the rgb color picker or something?)
Last edited by Blueone on Wednesday 29 October 2014 21:56, edited 1 time in total.
dennusb
Posts: 12
Joined: Thursday 23 October 2014 8:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [122] Philips Hue support

Post by dennusb »

Blueone wrote:Everything is working goed now :D
Is it possible to read the current color from lights in the webinterface from domoticz? (maybe with a text field below the rgb color picker or something?)
I suggested that in a separate topic already :) Would be great!
globalassist
Posts: 25
Joined: Monday 09 December 2013 16:51
Target OS: Windows
Domoticz version: Beta
Location: Netherlands
Contact:

Re: [122] Philips Hue support

Post by globalassist »

I really hate to bother you guys with this, but I'm still not getting it to work.
The register-proces works now (creates a random user) and then I press "add" and everything seems ok.
However, there are no lights added to the devices tab.
Screenshot added:
Attachments
Screenshot of added hardware Hue
Screenshot of added hardware Hue
PhilipsHue.jpg (176.64 KiB) Viewed 8005 times
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: [122] Philips Hue support

Post by gizmocuz »

globalassist wrote:I really hate to bother you guys with this, but I'm still not getting it to work.
The register-proces works now (creates a random user) and then I press "add" and everything seems ok.
However, there are no lights added to the devices tab.
Screenshot added:
Can you post the output of

http://HUE_IP/api/USERNAME/lights/

(Change the IP and Username to the on in the hardware setup)
Quality outlives Quantity!
globalassist
Posts: 25
Joined: Monday 09 December 2013 16:51
Target OS: Windows
Domoticz version: Beta
Location: Netherlands
Contact:

Re: [122] Philips Hue support

Post by globalassist »

I won't post all output, but here's the starting bit:

{"lights":{"1":{"state": {"on":true,"bri":240,"hue":15331,"sat":121,"xy":[0.4448,0.4066],"ct":343,"alert":"none","effect":"none","colormode":"hs","reachable":true}, "type": "Extended color light", "name": "Mediacenter 1", "modelid": "LCT001","uniqueid":"00:17:88:01:00:e6:ea:f3-0b", "swversion": "66010820", "pointsymbol": { "1":"0a00f1f01f1f1001f1ff100000000001f2000000", "2":"none", "3":"none", "4":"none", "5":"none", "6":"none", "7":"none", "8":"none" }},"2":{"state": {"on":true,"bri":240,"hue":15331,"sat":121,"xy":[0.4448,0.4066],"ct":343,"alert":"none","effect":"none","colormode":"hs","reachable":true}, "type": "Extended color light", "name": "Keukentafel 1", "modelid": "LCT001","uniqueid":"00:17:88:01:00:d0:fa:ab-0b", "swversion": "66010820", "pointsymbol": { "1":"0a00f1f01f1f1001f1ff100000000001f2000000", "2":"none", "3":"none", "4":"none", "5":"none", "6":"none", "7":"none", "8":"none" }},"3":{"state": {"on":true,"bri":240,"hue":15331,"sat":121,"xy":[0.4448,0.4066],"ct":343,"alert":"none","effect":"none","colormode":"hs","reachable":true}, "type": "Extended color light", "name": "Mediacenter 2", "modelid": "LCT001","uniqueid":"00:17:88:01:00:f8:07:03-0b", "swversion": "66010820", "pointsymbol": { "1":"0a00f1f01f1f1001f1ff100000000001f2000000", "2":"none", "3":"none", "4":"none", "5":"none", "6":"none", "7":"none", "8":"none" }},"4":{"state": {"on":true,"bri":240,"hue":15331,"sat":121,"xy":[0.4448,0.4066],"ct":343,"alert":"none","effect":"none","colormode":"hs","reachable":true}, "type": "Extended color light", "name": "Keukentafel 2", "modelid": "LCT001","uniqueid":"00:17:88:01:00:bf:64:44-0b", "swversion": "66010820", "pointsymbol": { "1":"0a00f1f01f1f1001f1ff100000000001f2000000", "2":"none", "3":"none", "4":"none", "5":"none", "6":"none", "7":"none", "8":"none" }},"5":{"state": {"on":true,"bri":240,"hue":15331,"sat":121,"xy":[0.4448,0.4066],"ct":343,"alert":"none","effect":"none","colormode":"hs","reachable":true}, "type": "Extended color light", "name": "Bank", "modelid": "LCT001","uniqueid":"00:17:88:01:00:e0:f9:3c-0b", "swversion": "66010820", "pointsymbol": { "1":"0a00f1f01f1f1001f1ff100000000001f2000000", "2":"none", "3":"none", "4":"none", "5":"none", "6":"none", "7":"none", "8":"none" }},"6":{"state": {"on":true,"bri":254,"hue":8191,"sat":4,"xy":[0.4377,0.4047],"alert":"none","effect":"none","colormode":"xy","reachable":true}, "type": "Color light", "name": "Mediacenter 3", "modelid": "LST001","uniqueid":"00:17:88:01:00:cf:cf:c5-0b", "swversion": "66010400", "pointsymbol": { "1":"0a00f1f01f1f1001f1ff100000000001f2000000", "2":"none", "3":"none", "4":"none", "5":"none", "6":"none", "7":"none", "8":"none" }}},"groups":{"1":{"name":"Mediacenter","lights":["1","3","6"],"type":"LightGroup","action": {"on":true,"bri":254,"hue":8191,"sat":4,"xy":[0.4377,0.4047],"ct":343,"effect":"none","colormode":"xy"}},"2":{"name":"Keukentafel","lights":["2","4"],"type":"LightGroup","action": {"on":true,"bri":240,"hue":15331,"sat":121,"xy":[0.4448,0.4066],"ct":343,"effect":"none","colormode":"xy"}},"3":{"name":"Bank","lights":["5"],"type":"LightGroup","action": {"on":true,"bri":240,"hue":15331,"sat":121,"xy":[0.4448,0.4066],"ct":343,"effect":"none","colormode":"xy"}}},"config":{"name": "Notofyourinterest","zigbeechannel": 15,"mac": "00:17:88:14:e6:4c","dhcp": true,"ipaddress": "192.168.1.222","netmask": "255.255.255.0","gateway": "192.168.1.1","proxyaddress": "none","proxyport": 0,"UTC": "2014-10-30T11:33:28","localtime": "2014-10-30T12:33:28","timezone": "Europe/Amsterdam","whitelist":{"BAMY5yxBKD093YS":{"last use date": "2014-10-27T20:20:40","create date": "2014-01-07T16:08:34","name": "iPad"},"l9xpeyrma6oxmjpwigu40jhcgq":{"last use date": "2014-05-12T21:41:30","create date": "2014-01-07T18:01:38","name": "Oni Light Control for Windows Phone"},"c75656bf23ee2767e115c55e38bc9921":{"last use date": "2014-01-07T20:01:20","create date": "2014-01-07T19:58:46","name": "PC"},"0f510d002fe80a4391e3620f439167f1":{"last use date": "2014-01-09T21:12:43","create date": "2014-01-07T20:13:38","name": "xbmc-player"},"iuPpZOA6NccN2S4D":{"last use date": "2014-10-29T19:11:39","create date": "2014-01-07T22:01:57","name": "Esther"},"0f607264fc6318a92b9e13c65db7cd3c":{"last use date": "2014-04-05T21:48:53","create date": "2014-01-07T22:05:09","name": "Esther"},"aNo4TTID2ZEdI5zE":{"last use date": "2014-10-02T15:03:19","create date": "2014-03-19T16:33:21","name": "iPad"},"162A38E99DE559441F99B6B97170E020":{"last use date": "2014-04-06T14:14:02","create date": "2014-04-06T10:33:08","name": "Philips hue"},"v6pbk2ou7ZiOShJy":{"last use date": "2014-09-21T18:16:02","create date": "2014-05-07T18:38:26","name": "philips.lighting.hue#iPhone etc. etc.
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: [122] Philips Hue support

Post by gizmocuz »

I get 6 lights with this, are you sure 'accept new hardware' is enabled in the application settings ?
Hue.png
Hue.png (58.75 KiB) Viewed 7982 times
Quality outlives Quantity!
globalassist
Posts: 25
Joined: Monday 09 December 2013 16:51
Target OS: Windows
Domoticz version: Beta
Location: Netherlands
Contact:

Re: [122] Philips Hue support

Post by globalassist »

Damn. I feel dumb. You are right. My apologies!
simonrg
Posts: 329
Joined: Tuesday 16 July 2013 22:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8807
Location: North East England
Contact:

Re: [122] Philips Hue support

Post by simonrg »

gizmocuz wrote:In the next beta you have the sat;hue in the sValue
Using the new functionality of otherdevices_svalues for the Hue lights :D , I have been playing around with my Hue lights and trying to rewrite my previous scripts (http://www.domoticz.com/wiki/Philips_Hu ... Hue_Scenes) which captured the current lights state and stored it within Domoticz as a scene to be replayed at a later date.

Unfortunately, the sat;hue returned by otherdevices_svalues are just the last values sent from Domoticz and are not the current colour of the lights.

Of course this is obvious when I think about it, :oops: , otherdevices_svalues is sent every script which is run, :idea: so the overhead of querying the lights everytime a script is run just doesn't make sense. (I guess this doesn't happen in realtime for other parameters of lights for the same reason?)

So a direct query of the Philips Hue bridge from Lua will still be the best way to get the true colour values to both capture different states of the lights as set by other apps, but also to check that the lights were actually displaying the expected colours.

:?: I guess this would also be the way to set the colour picker in the web ui to reflect the current colour of the lights, but this would require the device displaying the web ui to be registered with the Philips Hue bridge, as the query would need to come from Javascript on the web page.
Raspberry Pi 2 B - 2A@5V PSU - Raspbian + Domoticz + RFXtrx(89), LightwaveRF House(dimmers, sockets, wireless/mood switches), Owl CM113, 4 LaCross Temp / Humidity Sensors, 4 Siemens PIR, Smappee, Solaredge, ESP8266
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: [122] Philips Hue support

Post by gizmocuz »

When you change the hue of a light, wait at least 10 seconds, then check the svalue in the database, it should be there (see the code)
Quality outlives Quantity!
simonrg
Posts: 329
Joined: Tuesday 16 July 2013 22:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8807
Location: North East England
Contact:

Re: [122] Philips Hue support

Post by simonrg »

gizmocuz wrote:When you change the hue of a light, wait at least 10 seconds, then check the svalue in the database, it should be there (see the code)
The svalues don't seem to change (v2.2095), I have had a look at the code, but afraid my C++ is not up to understand the abstraction.

I have a very simple script:

Code: Select all

commandArray = {}

print('Hue Lamp 1 '..tostring(otherdevices_svalues['Hue Lamp 1']))
print('Hue Lamp 2 '..otherdevices_svalues['Hue Lamp 2'])
print('Hue Lamp 3 '..otherdevices_svalues['Hue Lamp 3'])

return commandArray
But the log shows the same values no matter what I do to the lights, they seem to change when I restart Domoticz:

Code: Select all

Fri Oct 31 08:38:18 2014 LUA: Hue Lamp 1 209;13198
Fri Oct 31 08:38:18 2014 LUA: Hue Lamp 2 209;13198
Fri Oct 31 08:38:18 2014 LUA: Hue Lamp 3 209;13198
Fri Oct 31 08:38:18 2014 Script event triggered: /home/pi/domoticz/scripts/lua/script_device_hue_test.lua
Fri Oct 31 08:38:31 2014 LUA: Hue Lamp 1 209;13198
Fri Oct 31 08:38:31 2014 LUA: Hue Lamp 2 209;13198
Fri Oct 31 08:38:31 2014 LUA: Hue Lamp 3 209;13198
Fri Oct 31 08:38:31 2014 Script event triggered: /home/pi/domoticz/scripts/lua/script_device_hue_test.lua
Fri Oct 31 08:38:55 2014 LUA: Hue Lamp 1 209;13198
Fri Oct 31 08:38:55 2014 LUA: Hue Lamp 2 209;13198
Fri Oct 31 08:38:55 2014 LUA: Hue Lamp 3 209;13198
Fri Oct 31 08:38:55 2014 Script event triggered: /home/pi/domoticz/scripts/lua/script_device_hue_test.lua
Fri Oct 31 08:39:04 2014 LUA: Hue Lamp 1 209;13198
Fri Oct 31 08:39:04 2014 LUA: Hue Lamp 2 209;13198
Fri Oct 31 08:39:04 2014 LUA: Hue Lamp 3 209;13198
Fri Oct 31 08:39:04 2014 Script event triggered: /home/pi/domoticz/scripts/lua/script_device_hue_test.lua
Fri Oct 31 08:39:07 2014 LUA: Hue Lamp 1 209;13198
Fri Oct 31 08:39:07 2014 LUA: Hue Lamp 2 209;13198
Fri Oct 31 08:39:07 2014 LUA: Hue Lamp 3 209;13198
Fri Oct 31 08:39:07 2014 Script event triggered: /home/pi/domoticz/scripts/lua/script_device_hue_test.lua
Fri Oct 31 08:39:18 2014 LUA: Hue Lamp 1 209;13198
Fri Oct 31 08:39:18 2014 LUA: Hue Lamp 2 209;13198
Fri Oct 31 08:39:18 2014 LUA: Hue Lamp 3 209;13198
Fri Oct 31 08:39:18 2014 Script event triggered: /home/pi/domoticz/scripts/lua/script_device_hue_test.lua
Fri Oct 31 08:39:31 2014 LUA: Hue Lamp 1 209;13198
Fri Oct 31 08:39:31 2014 LUA: Hue Lamp 2 209;13198
Fri Oct 31 08:39:31 2014 LUA: Hue Lamp 3 209;13198
Fri Oct 31 08:39:31 2014 LUA: Air Quality 0
Querying the bridge directly shows the different light colours:

Code: Select all

{"1":{"state": {"on":true,"bri":249,"hue":174,"sat":250,"xy":[0.6686,0.3242],"ct":500,"alert":"none","effect":"none","colormode":"xy","reachable":true}, "type": "Extended color light", "name": "Hue Lamp 1", "modelid": "LCT001", "swversion": "65003148", "pointsymbol": { "1":"none", "2":"none", "3":"none", "4":"none", "5":"none", "6":"none", "7":"none", "8":"none" }},"2":{"state": {"on":true,"bri":251,"hue":65527,"sat":253,"xy":[0.6736,0.3221],"ct":500,"alert":"none","effect":"none","colormode":"xy","reachable":true}, "type": "Extended color light", "name": "Hue Lamp 2", "modelid": "LCT001", "swversion": "65003148", "pointsymbol": { "1":"none", "2":"none", "3":"none", "4":"none", "5":"none", "6":"none", "7":"none", "8":"none" }},"3":{"state": {"on":true,"bri":124,"hue":58085,"sat":253,"xy":[0.4693,0.2087],"ct":385,"alert":"none","effect":"none","colormode":"xy","reachable":true}, "type": "Extended color light", "name": "Hue Lamp 3", "modelid": "LCT001", "swversion": "65003148", "pointsymbol": { "1":"none", "2":"none", "3":"none", "4":"none", "5":"none", "6":"none", "7":"none", "8":"none" }}}
Raspberry Pi 2 B - 2A@5V PSU - Raspbian + Domoticz + RFXtrx(89), LightwaveRF House(dimmers, sockets, wireless/mood switches), Owl CM113, 4 LaCross Temp / Humidity Sensors, 4 Siemens PIR, Smappee, Solaredge, ESP8266
mvdarend
Posts: 4
Joined: Friday 31 October 2014 14:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [122] Philips Hue support

Post by mvdarend »

Thanks for adding Hue support. I've just downloaded Domoticz to try it out, and all works well, great :)

One thing I'm missing though is the 'transitiontime' argument, is there a way to accomplish this (via the interface of LUA)? As it's my first day working with Domoticz I'm very unfamiliar with the system.

The reason I want this is for a wake up light, and soft transitions from one scene to another.

Thanks in advance for any help.
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: [122] Philips Hue support

Post by gizmocuz »

mvdarend wrote:Thanks for adding Hue support. I've just downloaded Domoticz to try it out, and all works well, great :)

One thing I'm missing though is the 'transitiontime' argument, is there a way to accomplish this (via the interface of LUA)? As it's my first day working with Domoticz I'm very unfamiliar with the system.

The reason I want this is for a wake up light, and soft transitions from one scene to another.

Thanks in advance for any help.
No this is not supported, but with a bit of work, you can make this work....
You have to add timers, for example each minute further more brightness

Is this transition time possible via the API ?
Quality outlives Quantity!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest