bwssytems / ha-bridge

Home automation bridge that emulates a Philips Hue light system and can control other systems such as a Vera, Harmony Hub, Nest, MiLight bulbs or any other system that has an http/https/tcp/udp interface. This is a compact impl to run on small format computers. This is impl started from this project https://github.com/armzilla/amazon-echo-ha-bridge.
Apache License 2.0
1.45k stars 198 forks source link

Nuimo app discovers Ha-Bridge but can't control lights #299

Closed spedja closed 7 years ago

spedja commented 7 years ago

Nuimo is an android app that controls Philips Hue lights with physical Nuimo controller. (more info on senic.com) Nuimo app can discover Ha-Bridge and all "lights" added there, and within app there is a Test button and chosen light can be turned On/Off. (just for a test purpose) At that moment (pressing test button) Ha-bridge throws Exception: log.txt

--192.168.0.35:80 HA-bridge server ip --192.168.0.28 Nuimo app on android

at line 2016-12-07 18:44:56,683 Nuimo app tries to create a new user and fails, even though light can be turned On/Off (with a test button).

After you choose light that you wanna control with Nuimo controller, Nuimo app fails to control (turning the light On/Off) log 2.txt

pay attention on line 2016-12-07 18:55:04,052 config requested: from 192.168.0.28

bwssytems commented 7 years ago

There seems to be no issues in the log, That line with is a valid request. Also there were create user requests already: 2016-12-07 18:54:57,091 [qtp22965473-24] INFO com.bwssystems.HABridge.hue.HueMulator - Traceupnp: hue api/* user create requested: from 192.168.0.28 Which creates the id ti send back to the client.

You can turn on debug for the HueMulator class to look at calls for state change.

spedja commented 7 years ago

Hi BWSSystem,

thanks for replay. After enabling debug for the HueMulator i am getting following output: log3.txt

Its really strange, like Nuimo app tries to create new user every time after i press command On/Off on Nuimo controler, right?

output from http://192.168.0.35/api/user: users.txt

BTW, Nuimo app works ok with real PhilipsHue bridge, where you can On/Off Light, dim, change color, etc.

Thanks!

bwssytems commented 7 years ago

It is very weird as it does ask for the complete state of the system every minute. What is weird is that even though it is creating new users, it uses a different user for all the calls. It keeps asking for a light ID of "new" as well which would be incorrect in the vernacular of the hue api as they are all numbers. Have you tried turning off your real hue bridge and try it without that running?

spedja commented 7 years ago

Ok, did that, PhilipsHue Bridge off and its still the same. Seems that they have problem in their app, but then, why its working with original hue bridge (confused)?

2016-12-08 20:07:14,875 moment when App tries to reach Ha-bridge and retrieve lights 2016-12-08 20:08:31,597 test button is pressed

screenshot_2016-12-08-21-17-08

log5.txt

audiofreak9 commented 7 years ago

@bwssytems HUE firmware is now at 01036562. Last time we spoke it was 01035934. This might be the reason the app is not picking up the ha-bridge.

Maybe make the emulated firmware version that the bridge reports a setting on the ha-bridge?

bwssytems commented 7 years ago

@audiofreak9 That may be the best course of action as that seems to be one of the issues with these apps.

spedja commented 7 years ago

How i can change firmware version in Ha-bridge and test it out?

bwssytems commented 7 years ago

3 files contain the SW version, HueConfig.java, HuePublicConfig.Java and UpnpSettingsResource.java. I'll put in a setting to control this in the next release. But if you would like to test it, that would be great.

spedja commented 7 years ago

Yes, i will test it today. Will let you know about outcome. Thanks!

spedja commented 7 years ago

I updated SW version to 01036659 (current version on my Philips HUE hub), but behaviour is the same :(

screen shot 2016-12-21 at 06 59 21

Any other ideas? Thanks!