robertklep / name.klep.homekitty

HomeyKit 3.0
14 stars 5 forks source link

KNX windows coverings (Slatted Blinds) big mess with new HomeKitty #24

Closed Mel-Stef closed 12 hours ago

Mel-Stef commented 1 year ago

Dear Robert,

I move from HomeKit to HomeKitty the whole house yesterday.

Mostly of my equipment are wired KNX. Everything seems working well but slatted blinds.

After adding slatted blinds to HomeKitty I had some very stranges behaviours:

For now I'm using HomeKitty for all equipment but slatted blinds and HomeKit for slatted blinds and everything is working well again.

Kind regards & I wish you and your family a merry Christmas and a happy new year !

Stefano Moriggia

robertklep commented 1 year ago

Hi Stefano!

Regarding this remark: "When using wiring KNX push button I had the same behaviour, the app is creating conflict on KNX bus also if it is not directly used"

Do you mean that you also have problems outside of using HomeKitty? Or do you mean that just by running HomeKitty, using the wired button causes problems that don't happen when you don't use HomeKitty?

Mel-Stef commented 1 year ago

Hi Robert,

Exactly I have the same mess when the command come directly from KNX push button. Because of that I was first thinking it was an hardware problem with the KNX blinds outputs relays. But stopping HomeKitty in Homey solved the issue.

robertklep commented 1 year ago

This might be difficult to diagnose, but we can try.

First, restart the HomeKitty app.

Then add the blinds back to HomeKit, press the button (so things go wrong), and then create a diagnostics report (in the Homey app, go to "More > Apps > HomeKitty", press the gear icon in the top right corner, and press "Create Diagnostics Report").

Once the report has been generated you can remove the blinds from HomeKit again. I should receive it automatically through e-mail.

I think I have an idea on why this happens but it might be difficult to fix.

Mel-Stef commented 1 year ago

I should add the blind to HomeKitty or HomeKit ? I already added back to HomeKit and there is no problem now

robertklep commented 1 year ago

I meant to add them to HomeKit using HomeKitty.

But you can also add them directly to HomeKit without HomeKitty? How does that work?

Mel-Stef commented 1 year ago

Sorry I mess HomeyKit and HomeKit ... No I cannot add do HomeKit without your app

robertklep commented 1 year ago

You sent a diagnostics report from HomeyKit, not HomeKitty ๐Ÿ˜Š

If you're running HomeyKit and HomeKitty at the same time, it might be the cause for your problems.

Mel-Stef commented 1 year ago

Yes I'm running both at the same time and I send from HomeKitty not from HomeyKit ! (another bug ?)

Mel-Stef commented 1 year ago

But now is working well ! I cannot reproduce the problem

robertklep commented 1 year ago

I received a diagnostics report from both apps ๐Ÿ˜Š

Running both at the same time may have caused the problems if both apps are trying to handle the device. So if the problems reoccur, make sure that the devices that don't work properly are disabled in one app (so the other app can handle them).

With "disabled" I mean that they are "not added" in the settings:

image
Mel-Stef commented 1 year ago

Yes I did that but yesterday when the problem appears HomeyKit app was deleted from Homey, only HomeKitty was installed

robertklep commented 1 year ago

Ah okay. So perhaps the device is now added through HomeyKit (and working) and not through HomeKitty? What is the name of the device that wasn't working properly?

Mel-Stef commented 1 year ago

The device is "8-Store Est Table"

I will try to delete again HomeyKit now and add one by one all blinds, testing one by one to see if the problem appears again.

I will contact you later if I can reproduce the problem.

Mel-Stef commented 1 year ago

Done and everything working only trough HomeKitty. For now the problem did not appears anymore

robertklep commented 1 year ago

Let's hope it stays that way ๐Ÿ˜Š Happy festive season! ๐ŸŽ„

Mel-Stef commented 1 year ago

I'm making some test on kNX ETS app now because HomeKit is always telling me blind are "closing" and not switch to "close" also after KNX relay switch back to off and blind is closed.

This do not happen on "open"

robertklep commented 1 year ago

For which device (name) does that happen?

Mel-Stef commented 1 year ago

All slatted blind, for each I have a "status" adress coming from KNX telling the position (1 bit) Capture dโ€™eฬcran 2022-12-23 aฬ€ 11 51 48

robertklep commented 1 year ago

This was happening in an earlier version of HomeKitty because the "target position" and the "current position" weren't in sync, but that was solved a few versions ago.

Can you find one of the devices here: https://tools.developer.homey.app/tools/devices

And then let me know the "Class" of the device and which capabilities it has (the ID and the value for each).

Mel-Stef commented 1 year ago

Dear Robert, I will post some print screen to show you the behavior I have on my slatted blinds with HomeKitty. The first problem of this topic did not appear anymore, only status when slatted blinds are down still not working in HomeKit.

Mel-Stef commented 1 year ago

Blind exemple  1-Store  1 of 2

Mel-Stef commented 1 year ago

Blind exemple  1-Store  2 of 2

Mel-Stef commented 1 year ago

On up position everything work well, HomeKit is showing right (real) status "Ouvert" (Open in French)

HomeKit view

robertklep commented 1 year ago

And what does it show when they are in the down position?

Mel-Stef commented 1 year ago

Blind exemple  1-Store  closed 1 of 2

Mel-Stef commented 1 year ago

Blind exemple  1-Store  closed 2 of 2

Mel-Stef commented 1 year ago

HomeKit view close

Mel-Stef commented 1 year ago

As you can see on first 2 images the status is correctly Down (after the blind completely close) but HomeKit still showing "Fermeture" (Closing)

Mel-Stef commented 1 year ago

The status will never be "Fermรฉ" (Close) but it will again say correctly "Ouvert" (Open) if I open again the blind

Mel-Stef commented 1 year ago

this problem is on all slatted blinds (all are KNX)

robertklep commented 1 year ago

I don't see how it can work correctly with "open" and not with "closed" because it uses the exact same code path for that. Also, as far as I know the only reason it will show "closing..." (and also "opening...") is when the current position and target position are different, and also cannot happen because both are set at the same time to the same value (unless these devices also have other capabilities besides windowcoverings_state, but that doesn't appear to be the case).

I also can't reproduce the problem :(

Just to be sure: you're running HomeyKit at the moment, right?

Mel-Stef commented 1 year ago

No HomeKitty ! with HomeyKit it was working right

Mel-Stef commented 1 year ago

Blind moving up

Mel-Stef commented 1 year ago

When blind is moving up enum is set "up" and set value still "down"

Mel-Stef commented 1 year ago

Blind up

Mel-Stef commented 1 year ago

When is completely up enum still "up" and Set Value change to "up"

OlivierZal commented 1 year ago

@robertklep, I have no proof (yet) but my guess is that the device is "debounced" when 2 different characteristics are triggered or updated by the same capability. At least I think that some instance is destroyed but related old listeners are not.

I'm not at home this week so I can't provide logs from my local, but will do so once back. I'll parse the code and see if I can provide you accurate lines where it could happen.

robertklep commented 1 year ago

When blind is moving up enum is set "up" and set value still "down"

And what happens if you press "SET"?

robertklep commented 1 year ago

@OlivierZal setting different characteristics from the same capability has never proved to be an issue, HomeyKit also does that.

OlivierZal commented 1 year ago

Yes of course, that's not the issue I want to point out ๐Ÿ˜ƒ

The issue would be that a given characteristic is not correctly updated because related to an obsolete instance or listener.

Mel-Stef commented 1 year ago

If I press "Set" when the blind is coming down (enum "down") it move up again (because value still "up")

robertklep commented 1 year ago

@Mel-Stef the SET/UNSET button functionality is something that's offered on the Homey developer pages for convenience, but apps cannot control the values shown there. I have no idea why it would show a different value sometimes.

robertklep commented 1 year ago

@Mel-Stef you can try with the current test version (v1.2.9) that I just pushed? https://homey.app/a/name.klep.homekitty/test/

Mel-Stef commented 1 year ago

Fixed ! now is showing for very short time (less than 1s) "Closing" and after "Close".

Thank you very much for this (again) very top support !

Kind regards.

Stefano

robertklep commented 1 year ago

@Mel-Stef well, we now have to wait for other users for which I might have broken things ๐Ÿ˜…

Mel-Stef commented 1 year ago

Hope not !