rstrouse / ESPSomfy-RTS-HA

Control your somfy shades in Home Assistant
The Unlicense
125 stars 9 forks source link

Group with 5 shades works perfectly, unless controlled via HomeKit in HA #40

Closed larserhardsen closed 7 months ago

larserhardsen commented 7 months ago

Hi,

I have grouped 5 shades in my kitchen on the ESP and when controlled directly via HA, all shades move up&down simultaneously. I have exposed the group to HomeKit so my wife can ask Siri to open or close the shades in the kitchen, but when initiated this way, the shades seem to be operating individually and only 4 of the 5 shades are moving, so the override of the group functionality seems to ignore commands when operated through HomeKit.

Is it possible to make the existing override apply on HomeKit based commands? Or is there a workaround?

rstrouse commented 7 months ago

The reason why only 4 of the 5 are moving is because of a limitation in the current release of ESPSomfy RTS. However, if you update to the v2.4.1 pre-release, then reload the integration, all 5 will move.

The issue with Homekit is that instead of sending the single up or down command to the group it instead sends a command to each individual member of the group. Unfortunately, I have yet to figure out how to coerce it to just do what it should and tell the integration to send the group up or down.

Perhaps in HomeKit what it is actually doing is sending the position to 100% or 0% which of course causes HA to send individual commands. If it is doing that I might be able to capture the rewire the incoming command to call the appropriate grouping address instead of sending commands for each motor. The only path to figuring any of this out is to go through the code.

larserhardsen commented 7 months ago

I have just updated my ESP with the 2.4.1 pre-release, and I can confirm that now all 5 shades move when controlled via HomeKit (unlike before). Thanks!

I am fairly sure that you are right about HomeKit sending 100% or 0%, as I have experienced some weird Siri behavior where Siri some times responds asking for a position when told to open or close. It is not consistent though.

rstrouse commented 7 months ago

Yeah when I get a chance I will chase down the service that is being called and see if I can short circuit it.