snowdd1 / homebridge-knx

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

Solution for brightness setting also turns device on? #145

Closed zork17 closed 5 years ago

zork17 commented 5 years ago

My dimmer lights could not be used with HomeKit since whenever I set the brightness, the lights are set ON with full 100% brightness. I found several mentions of this issue, but I couldn't find a solution. Is there a solution or workaround for this problem?

coinraiser commented 5 years ago

Im on mobile now but can send u the one that is working for me

zork17 commented 5 years ago

@coinraiser

Im on mobile now but can send u the one that is working for me

Thanks, looking forward to this. Does it involve changing the code of some plugin?

coinraiser commented 5 years ago

knx_config.zip Here is my config file

zork17 commented 5 years ago

Basically I have the same settings except for this line in the Brightness: "DPT": "DPT5.001"

What is the change that you made to fix this problem?

coinraiser commented 5 years ago

I m using addin from /usr/lib/node_modules/homebridge-knx/lib/addins

zork17 commented 5 years ago

what does it mean? Do you use a specific addin? I do not know which addin I use. As I said, I have the same syntax in the knx config file and I don't know which addin is used

coinraiser commented 5 years ago

Try this one m8 LIGHT.zip if it dont work for u then use the one from addin folder,that one is defined by "Handler": "Dimmer" Dimmer.zip

zork17 commented 5 years ago

1) the syntax in LIGHT.zip looks like the one I have with ServiceType Lightbulb. What is the difference? 2) In Dimmer.zip there is indeed a new Handler and extra parameters at the end. How do I use a Handler? Should I just add its line in the config file?

coinraiser commented 5 years ago

copy the whole lines from dimmer.zip file,change GA and parameters on bottom. u can check addin config and what it does in /usr/lib/node_modules/homebridge-knx/lib/addins.

zork17 commented 5 years ago

I set it up as you describe but still, the dimming does not work properly. Any other suggestions?

coinraiser commented 5 years ago

What problem r u experiencing?do u have read flags on knx side for status adresses?

zork17 commented 5 years ago

The problem is I can't set Brightness or dim the lights. They are set to 100%. If I set the brightness using another app (not HomeKit) than Homekit displays the correct dimming. So read works but not write.

I don't know what is read flags on knx side for status addresses?

coinraiser commented 5 years ago

Template works for me just fine.Are u sure u not using relative 4 bit dimming for brightness?U need 1byte absolute brightness value to get it to work.

zork17 commented 5 years ago

I had a little error in the config file. It now works great with the Dimmer handler. Thanks a lot for the help!

coinraiser commented 5 years ago

Glad i could help