snowdd1 / homebridge-knx

KNX platform shim for homebridge
https://github.com/nfarina/homebridge
GNU General Public License v2.0
97 stars 55 forks source link

Strange Racecondition #35

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hello,

I get some strange race condition, I have two lightbulbs:

config "services":[

           {
                 "type":"Lightbulb",
                 "name":"Küche",
                 "On":{
                    "Set":"0/0/3",
                    "Listen":[
                       "0/2/3"
                    ]
                 },
                 "Brightness":{
                    "Set":"0/7/1",
                    "Listen":[
                       "0/2/3"
                    ]
                 }
              },
              {
                 "type":"Lightbulb",
                 "name":"Wohnzimmer",
                 "On":{
                    "Set":"0/0/2",
                    "Listen":[
                       "0/2/2"
                    ]
                 },
                 "Brightness":{
                    "Set":"0/7/0",
                    "Listen":[
                       "0/2/2"
                    ]
                 }
              }

Both should behave the same way, but "Küche" doesn't work, if I set "Küche" to 15% for example, it just switches to 100%.

So i debugged the issue and found the error using Busmonitor in ETS: bildschirmfoto 2016-08-18 um 9 16 36 pm

As you can see, set and on is in the wrong order, but why?

Thx,

Patrick

snowdd1 commented 8 years ago

Hi Patrick, I think HomeKit should not send an ON command at all when controlling brightness. At least it doesn't do in my configuration. I noticed you use the same response addresses (Rückmeldeadressen) for both On and Brightness - that is very strange as On is DPT1 (1 bit Boolean) and Brightness is DPT5 (8 bit integer )

I think you should fix these and try again.

Best regards Raoul

coliflower commented 8 years ago

Hi Patrick,

as Raoul already wrote, you will need a different GA on different KO of your dimmer for Brightness/Listen.

Have a nice day ! Dariusz

ghost commented 8 years ago

Hi,

Thx for your help, but its the same behavior:

"type":"Lightbulb", "name":"Kuche", "On":{ "Set":"0/0/3", "Listen":[ "0/2/14" ] }, "Brightness":{ "Set":"0/7/1", "Listen":[ "0/2/3" ] } },

bildschirmfoto 2016-08-20 um 5 06 33 pm

snowdd1 commented 8 years ago

Hi Patrick, I just made a group monitor screenshot of the addresses thatare sent when I change the brightness using Homekit.

image

As you can see there is no ON (EIN) command, only a ON response. You might have somehow mixed the response addresses or something. Homekit (and homebridge-knx) does not send the ON if the brightness is changed. I know that this is different with Hue Bulbs that require the ON before they accept brightness values. So I do not know where the ON is coming from in your configuration!

Regards Raoul

snowdd1 commented 8 years ago

No traffic on that issue - stale, closing.