homebridge-shelly-ng
homebridge-shelly-ng copied to clipboard
Fixing state update correctly on homebridge
Fixes https://github.com/alexryd/homebridge-shelly-ng/issues/61
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.
could anyone make this a easy installable package for n00bs like me? :)
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?
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.
@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?
I would really appreciate if you two could work it out together <3
@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.
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…
Hey @MaxiHuHe04 can you please look at my issue at https://github.com/alexryd/homebridge-shelly-ng/issues/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!
@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.
DS9 Version 1.5.4... - thx!
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 :)
np ... but its @MaxiHuHe04 s Fix ;-)
We don't have any updates on this repo since 2022, should we move on to another fork like BirknerAlex one ?
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 :)
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.