Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing state update correctly on homebridge #108

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BirknerAlex
Copy link

Fixes #61

@MaxiHuHe04
Copy link

For me, this doesn't change anything apparently. It seems that target_pos is not updated correctly in the shellies-ng Cover component if it is opened/closed using a physical switch. I didn't investigate at all, but this could perhaps be a bug in the Shelly API itself. A quick and dirty fix that worked for me without changing anything in the library was updating the target position to the value of the current position in the currentPosChangeHandler.

@MaDDeePee
Copy link

could anyone make this a easy installable package for n00bs like me? :)

@MaDDeePee
Copy link

For me, this doesn't change anything apparently. It seems that target_pos is not updated correctly in the shellies-ng Cover component if it is opened/closed using a physical switch. I didn't investigate at all, but this could perhaps be a bug in the Shelly API itself. A quick and dirty fix that worked for me without changing anything in the library was updating the target position to the value of the current position in the currentPosChangeHandler.

@MaxiHuHe04 How did you solve this? With a simple script running on the shelly? could you share it with us, please?

@MaxiHuHe04
Copy link

You can install my fork (https://github.com/MaxiHuHe04/homebridge-shelly-ng) instead of the original package (uninstall that first) by typing in

npm install https://github.com/MaxiHuHe04/homebridge-shelly-ng.git

in the Homebridge console.

@apartmedia
Copy link

@MaxiHuHe04 does your fork support the same amount of devices as that one from cubi1337 homebridge-shelly-ds9?
Is it possible for you to create a PR of the relevant code fraction for the other fork and put the effort together?

@MaDDeePee
Copy link

I would really appreciate if you two could work it out together <3

@MaxiHuHe04
Copy link

@apartmedia no, I just fixed a few issues and added the ability to use Shelly relays as door locks in HomeKit.
Do you have this problem on his fork too? Then I will have to see if I can get it to work on top of his changes.

@apartmedia
Copy link

I do not have physical switches connected, so I can‘t test it.
But some users report issues with the state getting out of sync.
Look at this issue for example #134
There is also a PR (#108) already for several issues (#24, #37, #45, #52, #61) which might or might not be related, but seems to not solving the whole thing.
The author of homebridge-shelly-ds9 cubi1337 says he would looking forward for a PR fixing this. See his comment here

@ohad-e
Copy link

ohad-e commented Oct 1, 2024

Hey @MaxiHuHe04 can you please look at my issue at #134 ?
I detailed the issue with the plugs' states (plus 1 and plus 2), which don't report their state to the HOME app after being controlled from the physical bridge (after several hours).

Thanks!

@MaxiHuHe04
Copy link

MaxiHuHe04 commented Oct 1, 2024

@ohad-e my PR should fix the problem regarding covers with directional physical switches. But I think you are having a different issue with your devices as there is no separate target value for switches.

@cubi1337
Copy link

cubi1337 commented Oct 2, 2024

DS9 Version 1.5.4... - thx!

@MaDDeePee
Copy link

I can confirm that 2pm with 1.5.4 cover status with wallswitches is updating state now correctly (although there is no "closing..." or "opening..." anymore while moving but i dont care about that!)

Thank you very very much for keeping this alive @cubi1337 <3 <3 :)

@cubi1337
Copy link

cubi1337 commented Oct 2, 2024

np ... but its @MaxiHuHe04 s Fix ;-)

@tigpt
Copy link

tigpt commented Oct 8, 2024

We don't have any updates on this repo since 2022, should we move on to another fork like BirknerAlex one ?

@MaDDeePee
Copy link

MaDDeePee commented Oct 8, 2024

either go with DS9-Fork or just install matterbridge (https://github.com/42wim/matterbridge) on your Homebridge-System.
Matterbridge can run side by side with homebridge and all shelly are supported flawlessly. This fork is supported by shelly as well. ;) You don't have to run Matter, just matterbridge with that plugin (https://github.com/Luligu/matterbridge-shelly) and it behaves just like Homebridge :)

@ohad-e
Copy link

ohad-e commented Oct 9, 2024

After several hours, there is a problem with the state of the covers.
This state update issue is relevant for all the devices controlled with a physical switch and HOME app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HomeKit representation of Shelly PM2 gets out of sync when using directional buttons
8 participants