HomeKit Integration additional ON/OFF command

I have been using this binding successfully for the past year also in combination with Amazon Echo and Alexa skill.
I am using these to control Sonoff devices with custom Tasmota firmware, all is good for basic switches but I ran into some problems with dimmers.

At the begining I saw some errors coming to the dimmer items that were associated with this binding and later I found out by troubleshooting that the HomeKit binding sends additional ON command to the dimmer apart from percentage number.

So for example when I set the level of the dimmer to 40% it will send ON then 40. This messes up things because openhab interprets ON as 100%, sets the device to 100% and back to 40. How can I manage this?
Ideally it would be if I could disable this first ON command coming to the item in the first place.

This is a good candidate for a proxy item.

This is a known problem with how homekit works compared to how the openhab plugin is programmed. Your idea of disabling the on and only sending level doesn’t actually work because sometimes homekit ONLY sends “on”. It’s quite frustrating to deal with actually. The proxy items shown below do work - but involve 50 or 100 ms timers to “catch” the double commands. My solution with node red is to save the previously used level in case homekit only sends “on”

There is another recent thread from yesterday I think about a new homebridge-openhab that could also address this but I’m not sure that developer has gotten that far yet. Search the forum for “homekit holy grail” and it will come up.

Most recent discussion here:

Also here for a possible solution with proxy items, works pretty well - about 3/4 of the way down:
https://github.com/openhab/openhab2-addons/issues/2782

Also here for how I’ve solved it in my house by using nodered instead of the built in homekit:

Yes, this is a behavior that is in accordance with the HomeKit Accessory Protocol (my description was linked above by @crxporter). The post @crxporter is referring to is this one.

Being the dev of the Homebridge plugin I can confirm, that I fixed this issue very early on (not having a proxy item for every light in my home was one of the main reasons I developed this plugin). I am currently using a 250ms delay, however this surely can be reduced a bit, just didn’t came around yet to test the minimum value required.

Either implement a proxy item and stick to your current setup or give my implementation a spin (additionally the dev of the official openHAB HomeKit plugin is currently working on the plugin, therefore it might be possible that he is also implementing some fix for this behavior).

2 Likes