Page 1 of 1

Philips Hue Lux

Posted: Mon Feb 23, 2015 7:44 pm
by stefangsbb
I have now added "theoretical" support for the Hue Lux lamp. I don't have one myself, but I tried to program according to the specs at Philips' site (btw, they have excellent documentation of their API).
I wonder if there is someone that could help me test this? The feature is in the nightly build.

Re: Philips Hue Lux

Posted: Sun Mar 01, 2015 8:16 pm
by erik
I've just bought a package with one Hue bridge and two Hue lamps.
I can connect to the bridge but this is then shown in the log
15.03.01 21:12:00 HueBridge Command failed in HueBridge
15.03.01 21:11:00 HueBridge Command failed in HueBridge
15.03.01 21:10:00 HueBridge Command failed in HueBridge

Its not possible to connect to the Lux units either right now

Re: Philips Hue Lux

Posted: Sun Mar 01, 2015 9:16 pm
by stefangsbb
Well, so much for theoretical programming... :-)

If you have the time, you can help me debug this, so we can get it working. It seems like the bridge answers something that I do not expect, and cannot decode when Hule Lux lights are connected, and I need to know what is says...

To get this information you need to do the following:

1 Upgrade to the latest nightly build (I added some logging)
2 Create a DebugManager Home Item
3 Set LoggerContext to: "nu.nethome.home.items.hue" and WantedLogLevel to "FINE" and press Apply.
4 Press the "ApplyLogLevel" link. Now you have activated finer debug logging for the Hue stuff.
5 Go to the "Create/Edit"-Page. Now there should be a number of large log messages in the log.
6 Either copy the text from the log window, or even better, copy your entire log file and send to me, so I can see what the Bridge is really saying...

Re: Philips Hue Lux

Posted: Sun Mar 01, 2015 11:15 pm
by erik
Absolutely, i will do it when i come home tomorrow.

And thank you so much for developing!

Re: Philips Hue Lux

Posted: Mon Mar 02, 2015 9:04 pm
by erik
I didn't know where to send the logfile so here is the information from it :)

2015.03.02 21:49:30.823 INFO:**Starting HomeManager 2.1-SNAPSHOT-4fc66** (HomeManagerStarter 0, TID1)
2015.03.02 21:49:30.992 INFO:Logging to: /var/log/nethome/HomeManager%g.log (HomeManagerStarter 1, TID1)
2015.03.02 21:49:31.234 WARNING:Prefs file removed in background /home/nethome/.java/.userPrefs/nu/nethome/home/impl/prefs.xml (FileSystemPreferences$6 2, TID1)
2015.03.02 21:49:31.281 INFO:Loading Items from /etc/opt/nethome/config.xml (HomeItemFileLoader 3, TID1)
2015.03.02 21:51:29.849 INFO:Activated 21 of 21 Items (HomeServer 4, TID1)
2015.03.02 21:52:00.235 FINE:[{"error": {
"address": "/lights",
"description": "unauthorized user",
"type": 1
}}] (PhilipsHueBridge 5, TID15)
2015.03.02 21:52:00.263 INFO:Command failed in HueBridge (HueBridge 6, TID15)
nu.nethome.home.items.hue.HueProcessingException: Not a JSON Object
at nu.nethome.home.items.hue.PhilipsHueBridge.listLights(PhilipsHueBridge.java:139)
at nu.nethome.home.items.hue.HueBridge.reportAllLampsState(HueBridge.java:186)
at nu.nethome.home.items.hue.HueBridge.receiveEvent(HueBridge.java:155)
at nu.nethome.home.impl.HomeServer.eventDistributorTask(HomeServer.java:359)
at nu.nethome.home.impl.HomeServer$2.run(HomeServer.java:221)
2015.03.02 21:53:00.97 FINE:[{"error": {
"address": "/lights",
"description": "unauthorized user",
"type": 1
}}] (PhilipsHueBridge 7, TID15)
2015.03.02 21:53:00.101 INFO:Command failed in HueBridge (HueBridge 8, TID15)
nu.nethome.home.items.hue.HueProcessingException: Not a JSON Object
at nu.nethome.home.items.hue.PhilipsHueBridge.listLights(PhilipsHueBridge.java:139)
at nu.nethome.home.items.hue.HueBridge.reportAllLampsState(HueBridge.java:186)
at nu.nethome.home.items.hue.HueBridge.receiveEvent(HueBridge.java:155)
at nu.nethome.home.impl.HomeServer.eventDistributorTask(HomeServer.java:359)
at nu.nethome.home.impl.HomeServer$2.run(HomeServer.java:221)
2015.03.02 21:54:00.97 FINE:[{"error": {
"address": "/lights",
"description": "unauthorized user",
"type": 1
}}] (PhilipsHueBridge 9, TID15)
2015.03.02 21:54:00.101 INFO:Command failed in HueBridge (HueBridge 10, TID15)
nu.nethome.home.items.hue.HueProcessingException: Not a JSON Object
at nu.nethome.home.items.hue.PhilipsHueBridge.listLights(PhilipsHueBridge.java:139)
at nu.nethome.home.items.hue.HueBridge.reportAllLampsState(HueBridge.java:186)
at nu.nethome.home.items.hue.HueBridge.receiveEvent(HueBridge.java:155)
at nu.nethome.home.impl.HomeServer.eventDistributorTask(HomeServer.java:359)
at nu.nethome.home.impl.HomeServer$2.run(HomeServer.java:221)
2015.03.02 21:55:00.91 FINE:[{"error": {
"address": "/lights",
"description": "unauthorized user",
"type": 1
}}] (PhilipsHueBridge 11, TID15)
2015.03.02 21:55:00.97 INFO:Command failed in HueBridge (HueBridge 12, TID15)
nu.nethome.home.items.hue.HueProcessingException: Not a JSON Object
at nu.nethome.home.items.hue.PhilipsHueBridge.listLights(PhilipsHueBridge.java:139)
at nu.nethome.home.items.hue.HueBridge.reportAllLampsState(HueBridge.java:186)
at nu.nethome.home.items.hue.HueBridge.receiveEvent(HueBridge.java:155)
at nu.nethome.home.impl.HomeServer.eventDistributorTask(HomeServer.java:359)
at nu.nethome.home.impl.HomeServer$2.run(HomeServer.java:221)
2015.03.02 21:56:00.79 FINE:[{"error": {
"address": "/lights",
"description": "unauthorized user",
"type": 1
}}] (PhilipsHueBridge 13, TID15)
2015.03.02 21:56:00.93 INFO:Command failed in HueBridge (HueBridge 14, TID15)
nu.nethome.home.items.hue.HueProcessingException: Not a JSON Object
at nu.nethome.home.items.hue.PhilipsHueBridge.listLights(PhilipsHueBridge.java:139)
at nu.nethome.home.items.hue.HueBridge.reportAllLampsState(HueBridge.java:186)
at nu.nethome.home.items.hue.HueBridge.receiveEvent(HueBridge.java:155)
at nu.nethome.home.impl.HomeServer.eventDistributorTask(HomeServer.java:359)
at nu.nethome.home.impl.HomeServer$2.run(HomeServer.java:221)

Re: Philips Hue Lux

Posted: Mon Mar 02, 2015 10:04 pm
by stefangsbb
Ahaaa, well the log told us about this problem at least...
You have not registered the username you are using in the HueBridge.

Follow the three steps on this page http://wiki.nethome.nu/doku.php?id=HueBridge to register the user.

I have to parse the error codes a bit better I think...

Re: Philips Hue Lux

Posted: Tue Mar 03, 2015 9:01 pm
by erik
Thanks a lot, it works fine now.

I did register the username but it wasn't the same name as the bridge name..
It was possible to find the bridge but when i pressed registerUser the state was changed to disconnected. This didn't happened when correct user name was entered, so maybe some note about it when state is changed.

And again, thank you for developing this awesome system!

Re: Philips Hue Lux

Posted: Tue Mar 03, 2015 9:53 pm
by stefangsbb
Great! So this means that I have confirmation that Hue Lux is also supported!!!

Re: Philips Hue Lux

Posted: Thu Mar 05, 2015 9:41 am
by niclasf
Impressive @stefangsbb that you made it work on the first try, just by implementing according to the specification :) Good work! (and a good job on the specification from Philips of course :) )