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

Testing for v5.3.1 Release Candidate #1192

Closed bwssytems closed 3 years ago

bwssytems commented 4 years ago

Please post your issues or success with this new release candidate

https://github.com/bwssytems/ha-bridge/releases/download/v5.3.1RC5/ha-bridge-5.3.1RC5.jar https://github.com/bwssytems/ha-bridge/releases/download/v5.3.1RC5/ha-bridge-5.3.1RC5-java11.jar

This release fixes the following issues:

1044 Alexa app, error "Device doesn't support requested value" bug question

1118 Device status update in Alexa App is not working correctly for ha-bridge devices bug duplicate question

1126 Can't get XY ColorData into URL enhancement question

1127 Can't get separate hue, saturation and brightness enhancement question

1128 Wrong color calucation in HS mode bug question

1131 Changing color temperatur is not working correctly bug question

1132 Conversion from CIE to RGB incorrect bug question

1139 Device ID creation fails bug question

1170 Alexa not sending the correct color codes duplicate

1171 Please add option: If bright request present with on, only send dim enhancement

1184 Alexa will not discover HABridge question

1191 When "Use UPNP Address Interface Only" is selected, echo cannot find ha-bridge bug

1210 [Enahnacement] Have link button timeout be configurable enhancement

1215 Alexa unable to discover recently added devices to ha-bridge duplicate question

1227 Feature request: ${intensity.previous} value passing control enhancement

1239 HA-Bridge has suddenly given up itself - Exception in thread "main" java.lang.NullPointerException bug question

1243 Alexa device discovery now broke question

1253 HABridge hue ColorDecode 0 0 0 bug question

gohamstergo commented 4 years ago

awesome! will check it out. thanks for the continued work.

altheeagle commented 4 years ago

Thank you, all my devices have been rediscoverd!

gohamstergo commented 4 years ago

Bugs #1044 and #1118 look to be fixed.

Note to others: All devices may still display "Device doesn't support requested value" at first in the app, but once you power cycle each device, it will go away and the correct state will be displayed.

bwssytems commented 4 years ago

@gohamstergo Thanks for pointing that out!

bwssytems commented 4 years ago

Finally got to working on this as staying home more during these times.

Everyone stay safe and social distance....

cylon147 commented 4 years ago

Setting Device Brightness to 3% is not working. Alexa says OK but on the app, it shows Brightness 4%.

I am Using 3% level to execute some routins.

altheeagle commented 4 years ago

Note to others: All devices may still display "Device doesn't support requested value" at first in the app, but once you power cycle each device, it will go away and the correct state will be displayed.

I didn't get that message, but i used the website (https://alexa.amazon.de/spa/index.html#appliances) to search for new devices. My Alex still says that the device seems not to work properly, but this is a different problem.

gohamstergo commented 4 years ago

@altheeagle

For the devices saying that.. do you have "No State (Do not update state for device)" true or false? I've noticed Alexa saying that when I have that setting set true. When false, the problem goes away.

Mooose1 commented 4 years ago

It did not work for me. I still cannot discover HA-bridge devices.

cylon147 commented 4 years ago

@gohamstergo Do not use the web interface of Alexa. it seems to be buggy as it has not been updated for a long time. I have found that if you forget devices from the Web interface and then you discover the Device Alexa will show the Forgotten devices also.

Same thing if you do it from Mobile app by Deleting the Devices one by one then Alexa will not discover the Deleted Devices.

Nachtfalke49 commented 4 years ago

Same here. It doesn't work.

gohamstergo commented 4 years ago

@cylon147 I don't use the web interface... what is your comment related to? Were you meaning to reply to @altheeagle?

@Nachtfalke49 have you tried creating a completely new device AFTER updating and trying to discover that? You might have to recreate your devices if any possibly have the device ID errors related to bug #1139.

Nachtfalke49 commented 4 years ago

@gohamstergo It works with new devices.

Nachtfalke49 commented 4 years ago

Oh i have a lot of devices. That is a hard work.

Thank you for the fast solution!

Mooose1 commented 4 years ago

I tried creating a brand new device. It still will not discover any Ha-bridge devices.

cylon147 commented 4 years ago

Setting Device Brightness to 3% is not working. Alexa says OK but on the app, it shows Brightness 4%.

I am Using 3% level to execute some routines.

Can anyone test this and Confirm Please.

gohamstergo commented 4 years ago

Can confirm. Here's my Domoticz log:

2020-03-27 09:32:17.938 Status: User: Admin initiated a switch command (368/Hallway/On) 2020-03-27 09:32:17.950 (Z-Stick) Light/Switch (Hallway) 2020-03-27 09:32:18.962 Status: User: Admin initiated a switch command (368/Hallway/On) 2020-03-27 09:32:18.969 (Z-Stick) Light/Switch (Hallway) 2020-03-27 09:32:19.041 Status: User: Admin initiated a switch command (368/Hallway/On) 2020-03-27 09:32:19.048 (Z-Stick) Light/Switch (Hallway) 2020-03-27 09:32:20.156 Status: User: Admin initiated a switch command (368/Hallway/On) 2020-03-27 09:32:20.159 (Z-Stick) Light/Switch (Hallway) 2020-03-27 09:32:20.269 Status: User: Admin initiated a switch command (368/Hallway/Set Level) 2020-03-27 09:32:20.270 OpenZWave: Domoticz has send a Switch command!, Level: 4, NodeID: 15 (0x0f) 2020-03-27 09:32:20.274 (Z-Stick) Light/Switch (Hallway)

Four "On" commands and then the level+1. Interesting. I only have it set to send two commands. Not sure why it's doubling.

bwssytems commented 4 years ago

Interesting as I get 3 for saying set to 3...

Mar 27 11:45:29 condopi java[8865]: 2020-03-27 11:45:29,455 [qtp15028939-96] DEBUG com.bwssystems.HABridge.hue.HueMulator - Calling dim as requested. Mar 27 11:45:29 condopi java[8865]: 2020-03-27 11:45:29,556 [qtp15028939-96] DEBUG com.bwssystems.HABridge.hue.HueMulator - Decode Json for url items: [{"item":"http://192.168.2.25:3480/data_request?id=action&output_format=json&DeviceNum=36&serviceId=urn:upnp-org:serviceId:Dimming1&action=SetLoadLevelTarget&newLoadlevelTarget=${intensity.percent}","type":"veraDevice"}] Mar 27 11:45:29 condopi java[8865]: 2020-03-27 11:45:29,557 [qtp15028939-96] DEBUG com.bwssystems.HABridge.hue.HueMulator - Calling Home device handler for type : veraDevice Mar 27 11:45:29 condopi java[8865]: 2020-03-27 11:45:29,559 [qtp15028939-96] DEBUG com.bwssystems.HABridge.plugins.http.HTTPHandler - doHttpRequest with url <<http://192.168.2.25:3480/data_request?id=action&output_format=json&DeviceNum=36&serviceId=urn:upnp-org:serviceId:Dimming1&action=SetLoadLevelTarget&newLoadlevelTarget=3>>, verb: null, contentType: null, body <<>> Mar 27 11:45:29 condopi java[8865]: 2020-03-27 11:45:29,560 [qtp15028939-96] DEBUG com.bwssystems.HABridge.plugins.http.HTTPHandler - Making outbound call in doHttpRequest: <<<GET http://192.168.2.25:3480/data_request?id=action&output_format=json&DeviceNum=36&serviceId=urn:upnp-org:serviceId:Dimming1&action=SetLoadLevelTarget&newLoadlevelTarget=3 HTTP/1.1>>> Mar 27 11:45:34 condopi java[8865]: 2020-03-27 11:45:34,102 [qtp15028939-96] DEBUG com.bwssystems.HABridge.plugins.http.HTTPHandler - GET execute (0) on URL responded: 200 Mar 27 11:45:34 condopi java[8865]: 2020-03-27 11:45:34,104 [qtp15028939-96] DEBUG com.bwssystems.HABridge.plugins.http.HTTPHandler - Successfull response - The http response is <<<{ "u:SetLoadLevelTargetResponse": { "OK": "OK" } }>>> Mar 27 11:45:34 condopi java[8865]: 2020-03-27 11:45:34,226 [qtp15028939-84] DEBUG com.bwssystems.HABridge.hue.HueMulator - HueMulator GET called on api/* with request <<</api/78f07df39ddf4763b61966422bf81443/lights/107>>>, and body <<<>>> Mar 27 11:45:34 condopi java[8865]: 2020-03-27 11:45:34,229 [qtp15028939-84] DEBUG com.bwssystems.HABridge.hue.HueMulator - hue light requested: 107 for user: 78f07df39ddf4763b61966422bf81443 from 192.168.2.210 Mar 27 11:45:34 condopi java[8865]: 2020-03-27 11:45:34,229 [qtp15028939-84] DEBUG com.bwssystems.HABridge.hue.HueMulator - found device named: Living Room Ceiling

Nachtfalke49 commented 4 years ago

Hi,

I tested it with two more new devices. Alexa has found the newly created devices. Then I hit "Forget All" and I had created more new devices. After that Alexa doesn't find any of my devices again.

Unfortunately, that was not the full solution.

Nachtfalke49 commented 4 years ago

Oh I have to make more devices. The last two have now been found. So it's a number problem. It seems that I cannot use the number again in Alexa after pressing "Forget All".

gohamstergo commented 4 years ago

Figured out my duplicate issue was just my two echos each sending the command...thought they were smarter than that, oh well.

I asked for level 3 and am indeed getting 4 tho. Think its something to do with converting the 3% 0-100 scale to bri:9 0-255 scale?

03-27-2020 16:02:02.942 | DEBUG | HueMulator GET called on api/ with request <<</api/--/lights>>>, and body <<<>>> | com.bwssystems.HABridge.hue.HueMulator 03-27-2020 16:02:08.784 | DEBUG | HueMulator PUT called on api/ with request <<</api/--/lights/134/state>>>, and body <<<{"on":true,"bri":9}>>> | com.bwssystems.HABridge.hue.HueMulator 03-27-2020 16:02:08.785 | DEBUG | hue state change requested: -- from 192.168.-.--- body: {"on":true,"bri":9} | com.bwssystems.HABridge.hue.HueMulator 03-27-2020 16:02:08.785 | DEBUG | Calling on-off as requested. | com.bwssystems.HABridge.hue.HueMulator 03-27-2020 16:02:08.785 | DEBUG | Decode Json for url items: [{"item":"http://192.168.-.---:----/json.htm?type=command&param=switchlight&idx=368&switchcmd=On","type":"domoticzDevice","delay":"1000","count":"2"}] | com.bwssystems.HABridge.hue.HueMulator 03-27-2020 16:02:08.785 | DEBUG | Calling Home device handler for type : domoticzDevice | com.bwssystems.HABridge.hue.HueMulator 03-27-2020 16:02:08.786 | DEBUG | Request <<json.htm?type=command&param=switchlight&idx=368&switchcmd=On>>, not done: false | com.bwssystems.HABridge.hue.DeviceDataDecode 03-27-2020 16:02:09.808 | DEBUG | Calling Home device handler for type : domoticzDevice | com.bwssystems.HABridge.hue.HueMulator 03-27-2020 16:02:09.809 | DEBUG | Request <<json.htm?type=command&param=switchlight&idx=368&switchcmd=On>>, not done: false | com.bwssystems.HABridge.hue.DeviceDataDecode 03-27-2020 16:02:09.857 | DEBUG | Calling dim as requested. | com.bwssystems.HABridge.hue.HueMulator 03-27-2020 16:02:09.959 | DEBUG | Decode Json for url items: [{"item":"http://192.168.-.---/json.htm?type=command&param=switchlight&idx=368&switchcmd=Set%20Level&level=${intensity.percent}","type":"domoticzDevice"}] | com.bwssystems.HABridge.hue.HueMulator 03-27-2020 16:02:09.960 | DEBUG | Calling Home device handler for type : domoticzDevice | com.bwssystems.HABridge.hue.HueMulator 03-27-2020 16:02:09.961 | DEBUG | Request <<json.htm?type=command&param=switchlight&idx=368&switchcmd=Set%20Level&level=4>>, not done: false | com.bwssystems.HABridge.hue.DeviceDataDecode 03-27-2020 16:02:09.984 | DEBUG | HueMulator GET called on api/* with request <<</api/--/lights/134>>>, and body <<<>>> | com.bwssystems.HABridge.hue.HueMulator 03-27-2020 16:02:09.986 | DEBUG | hue light requested: 134 for user: -- from 192.168.-.--- | com.bwssystems.HABridge.hue.HueMulator 03-27-2020 16:02:09.986 | DEBUG | found device named: Hallway

bwssytems commented 4 years ago

@gohamstergo So how did you get 9? I have the echo sending 7 and if I use the test dim on the page I get 8. Which both of those numbers get converted back to 3. What source are you using to control the ha-bridge to get 9?

gohamstergo commented 4 years ago

Im just asking my echo dot gen3 to 'set hallway to 3' and the log above is what i get.

edit: tested with my echo dot gen1 and get same values.

EnGamma commented 4 years ago

I just updated from 5.3.0RC9 to 5.3.1RC1. Alexa is not finding new devices with either.

gohamstergo commented 4 years ago

@EnGamma choose a device, edit/copy, give it a different name, then add bridge device. see if that one gets discovered.

EnGamma commented 4 years ago

Well after failing about 10 tries using "Alexa Discover", I just now tried the web Alexa (https://alexa.amazon.com/spa/index.html#appliances) and it worked.

Has anyone else seen this difference (i.e., web method works, voice method does not)?

@gohamstergo I've tried what you suggested in the past with 5.3.0RC9, which is how I added the new device that wasn't being found, but I hadn't tried that since the ha-bridge update to 5.3.1RC1. --Just tried that now with Alexa Discover and it worked (and, to my surprise, Alexa stated the name of the renamed device I added. I hadn't heard that before--used to just say, "I found n smart home devices".)

Looks like I'm good (for now). Thanks for the help.

EnGamma commented 4 years ago

FYI: Another odd behavior I've noticed with Alexa in the last few days:

It takes 2 tries to get her to recognize a name. First time through she responds with something like "I can't find device in xxx profile." Next time and subsequently, recognized w/o problem. (This also happened prior to my update to 5.3.1RC1.)

Anyone experiencing this?

audiofreak9 commented 4 years ago

Setup is HA-Bridge v5.3.1RC on RPi that is connected with ethernet cable. I have a mix of Echos: Gen 1 Echo, 2 Gen 1 Dots, 5 Gen 2 Dots, Gen 1 Show, Gen 1 Spot, they all successfully discover, but have always discovered, have not had discovery issues (knock on wood). My Echos are on my 5GHz network, that has multiple access points. I have and still have the duplicate device discovery when viewed from the web app. One is "Dimmable Light", the other is "Royal Philips Electronics smart device". If I "Forget" the "Dimmable Light" versions individually, they reappear on their own within hours. Has not seemed to be a real problem, except in Routines where you can't choose which 'version' of device, of course if I use the deleted "Dimmable Light" it breaks the routine, even though the device name still exists as "Royal Philips Electronics smart device". I guess I'll just keep the "Dimmable Light" versions, since they auto-discover.

Some observations:

I'd be curious to find out which Echo is discovering during the Web discover request for others, if it's the same every time.

Mooose1 commented 4 years ago

Well, after dozens of hours, I have Alexa voice controlling X10 devices. I had to rebuild HG and Habridge from scratch. And, it only worked from my Echo gen 1, but I was able to discover devices about 5 times out of a total of 100 discovery attempts. Very flaky.

audiofreak9 commented 4 years ago

Well that is a long journey to good news, guess we can thank Amazon's flakey updates. Did the devices discover as "Dimmable Light" or "Royal Philips Electronics smart device"?

Mooose1 commented 4 years ago

All as "Dimmable Light"

Nachtfalke49 commented 4 years ago

Only new devices work. Iobroker with Amazon Echo Hub has the same problem. Only new devices are discovered there, too.

Mooose1 commented 4 years ago

In my case, I rediscovered the same 7 devices. I tried adding new devices, but it made no difference.

EnGamma commented 4 years ago

How are you determining which Echo is doing the discovering? I've got 7 or 8 of them.

On Sat, Mar 28, 2020 at 1:08 PM audiofreak9 notifications@github.com wrote:

Setup is HA-Bridge v5.3.1RC on RPi that is connected with ethernet cable. I have a mix of Echos: Gen 1 Echo, 2 Gen 1 Dots, 5 Gen 2 Dots, Gen 1 Show, Gen 1 Spot, they all successfully discover, but have always discovered, have not had discovery issues (knock on wood). My Echos are on my 5GHz network, that has multiple access points. I have and still have the duplicate device discovery when viewed from the web app. One is "Dimmable Light", the other is "Royal Philips Electronics smart device". If I "Forget" the "Dimmable Light" versions individually, they reappear on their own within hours. Has not seemed to be a real problem, except in Routines where you can't choose which 'version' of device, of course if I use the deleted "Dimmable Light" it breaks the routine, even though the device name still exists as "Royal Philips Electronics smart device". I guess I'll just keep the "Dimmable Light" versions, since they auto-discover.

Some observations:

  • Forget All on the Web does not work. The devices are right back again, even if I stop the HA-Bridge.
  • My Gen 2 Dots discover devices as "Royal Philips Electronics smart device", when asked to discover.
  • My Gen 1 Echo discovers devices as "Dimmable Light", when asked to discover. I believe this Echo also auto discovers.
  • The web application exclusively uses the same echo to discover, my office Echo which is a Gen 2 Dot. This could explain some with web discovery success, while others do not.
  • Alexa understands device names
  • I have not tested the Gen 1 Dots, Show or Spot to see what device type they discover.

I'd be curious to find out which Echo is discovering during the Web discover request, if it's the same every time.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bwssytems/ha-bridge/issues/1192#issuecomment-605489873, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSR2EPCUDFDJRTL53ECOXTRJYVH3ANCNFSM4LUPV24Q .

Mooose1 commented 4 years ago

Up until now, I had unplugged all but the Gen 1 Echo. This morning, I had 3 beside me, but put the Gen 2 and Gen 3 dots on mute. The gen 1 did the discovery and it worked.

Mooose1 commented 4 years ago

I had to re-Discover because Alexa's mind went blank. Asking the Echo gen 1 to discover came back with all "Royal Philips Electronics smart device"s. The Dimmable Light label was from discovery from my desktop web page. hhmmm

Nachtfalke49 commented 4 years ago

I tried the Echo 2, Echo 3 and Fire TV Cube. Alexa found all the devices on Echo 2. I had always taken the other devices off the power. Now, when I hit "Forget All" again, nothing was found. That makes no sense. I don't have Echo 1 here. I tested from the desktop and in the app. Alexa doesn't find anything anymore. I'm getting tired of it.

audiofreak9 commented 4 years ago

For me, the blue I ring starts rotating on the device that is discovering. When I use the webpage, my Office echo exclusively is the discovering echo.

Mooose1 commented 4 years ago

I am getting more confused. There are so many permutations available. Your rotating blue ring comment got me thinking. I have 3 devices beside me. I originally configured the X10 devices with only the Echo gen 1 plugged in. I now have a gen 2 and gen 3 Echo Dot beside me as well, in mute mode. I ask Alexa on the Gen1 Echo to Discover New devices, the blue light on the gen 1 goes out but the other 2 dot's blue rings rotate. When I look at my router for active wifi clients, it looks like the gen 2 may have been the one that responded!

cylon147 commented 4 years ago

In my setup, Alexa is Discovering Device Without any Problems.

but I had to reset my Raspberry Luckily I had a backup but after restoring the Backup and asked Alexa to discover devices. Alexa Didn't Find anything but it messed up all my Routines and COmmands. Now if I ask Alexa to do something it is Executing the Different Commands.

Also in Routine, all the Devices got changed.

I have tried Pressing the Renumber Devices button and Rediscovering again but it's still the same.

I don't want to Reprogram all my Routines again as I have already Done it two days ago while MOving to RC build.

@bwssytems Please help me out from this.

cylon147 commented 4 years ago

ok... I have come across the Major bug in my previous post I have mentioned that Alexa Executing different commands. This is because after Doing Renumber Device Alexa Not finding the change in uniqueid. As this is not being Changed when we do renumber devices.

To test this out I have entered Devices with the name "Test 100" with Device ID 100 and so on up to Test 110 with Device id 110. Behavior

Alexa Discover Device Working perfectly without calling another Device.

Now, I pressed the Renumber device so it did the re-id all the device. Again I rediscover the device as there is no Device Added only the IDs are changed Alexa Didn't find any Devices. this is Correct behavior but should work as it is as we have sent the updated Device list with Changed Device Ids but not when I execute Test 100 it Executed Device 102 as its Unique id didn't get updated after Renumber Device.

So I have done Wireshark to check before and after the response(after pressing the Renumber Devices) of the Alexa nad Fond it's not updated the Uniquid means it's keeping the same uniques ID and this Brokes the whole Setup.

I am POsting the Json Device list.

Before pressing the Renumber Devices. {"110":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 110","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:6E-00","swversion":"66012040"},"100":{"state":{"on":true,"bri":254,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 100","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:64-00","swversion":"66012040"},"101":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 101","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:65-00","swversion":"66012040"},"102":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 102","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:66-00","swversion":"66012040"},"103":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 103","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:67-00","swversion":"66012040"},"104":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 104","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:68-00","swversion":"66012040"},"105":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 105","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:69-00","swversion":"66012040"},"106":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 106","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:6A-00","swversion":"66012040"},"107":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 107","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:6B-00","swversion":"66012040"},"108":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 108","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:6C-00","swversion":"66012040"},"109":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 109","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:6D-00","swversion":"66012040"}}

After Pressing the Renumber devices as you can see Device id and Name gets reassociated but uniqueid remains the same. and this is why Alexa not differentiating the change.

{"110":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 109","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:6E-00","swversion":"66012040"},"100":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 102","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:64-00","swversion":"66012040"},"101":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 107","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:65-00","swversion":"66012040"},"102":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 100","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:66-00","swversion":"66012040"},"103":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 108","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:67-00","swversion":"66012040"},"104":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 110","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:68-00","swversion":"66012040"},"105":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 105","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:69-00","swversion":"66012040"},"106":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 104","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:6A-00","swversion":"66012040"},"107":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 101","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:6B-00","swversion":"66012040"},"108":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 106","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:6C-00","swversion":"66012040"},"109":{"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Test 103","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:6D-00","swversion":"66012040"}}

To fix this problem i guess Device id and uniqueid and Device Name should be linked with each other.

juergen2345 commented 4 years ago

After update the device status update works fine.

The REST API

curl 192.168.0.2/api/pi/lights/3 {"state":{"on":false,"bri":0,"alert":"none","reachable":true},"type":"Dimmable light","name":"Side Blind","modelid":"LWB007","manufacturername":"Philips","uniqueid":"00:17:88:5E:D3:03-03","swversion":"66012040"}

works fine, but i can not switch on/off

curl -X PUT -d "{"on": true}" "192.168.0.2/api/pi/lights/3/state" []

Did i do something wrong? Thx

SchmuFoo commented 4 years ago

https://github.com/bwssytems/ha-bridge/issues/1044 fix is working fine, thanks

bwssytems commented 4 years ago

@juergen2345 That looks correct. Did you turn on trace state changes and look at the log?

juergen2345 commented 4 years ago

@juergen2345 That looks correct. Did you turn on trace state changes and look at the log?

When i send the off command:..

4-08-2020 19:54:19.318 | INFO | Tracestate: hue state change requested: pi from 192.168.0.2 body: {on: false} | com.bwssystems.HABridge.hue.HueMulator

i have also tried this on 5.3.0 - same result. On 4.5.6. it worked fine. Thx

bwssytems commented 4 years ago

Ok, the off command is represented properly by the {on:false} body.

juergen2345 commented 4 years ago

The log above was from an off command, when i try on then the log shows Tracestate: hue state change requested: pi from 192.168.0.2 body: {on: true}

but ha-bridge doesn't execute the script.. The curl response is only []

(On 4.5.6 curl responses {"success":{"/lights/3/state/on":true}}, And the script was executed.)

When i use for example the Test Off Button, the Command will be executed and the log shows

04-09-2020 07:17:05.616 | INFO | Tracestate: Calling on-off as requested: false | com.bwssystems.HABridge.hue.HueMulator

04-09-2020 07:17:05.635 | INFO | Tracestate: Decode Json for url items: [{"item":"/home/pi/Fernbedienung/Sonnenschutz.py up","type":"cmdDevice"}] | com.bwssystems.HABridge.hue.HueMulator

04-09-2020 07:17:05.676 | INFO | Tracestate: Calling Home device handler for type : cmdDevice | com.bwssystems.HABridge.hue.HueMulator

bwssytems commented 4 years ago

@juergen2345 will take a look

SchmuFoo commented 4 years ago

1044 fix is working fine, thanks

Had to rollback to 5.3.0 because Alexa Voice Control wasn't reliable anymore -> Sometime Alexa sends the "ok signal" but nothing happens, sometimes Alexa didn't recognized the device etc.

Not sure if this is realy HA-Bridge related but I will observe the situation now after the rollback

stitchbit commented 4 years ago

Switched to 5.3.1RC1 after Alexa stopped working with my devices on 20. April 2020. I got the message 'Device not responding' for all my devices. So I upgraded to RC1, added a new device in ha-bridge but Alexa is unable to discover neither any of the old devices nor the new one.

I´m running on a Pi 2 port 80 and have 3 3rd gen. Echos, 3 FireTV Sticks and one Show 5 in my system.