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

adding manual WC calibration. #449

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

juangamnik
Copy link

I added the ability to manually calibrate roller shutters (window closing). This should be used for roller shutters with end position detection, only (should be the case for any motor newer than 25 years). Therefore, a "Caution" hint is added as soon as manual calibration is activated. Two values can be set: (1) the move time. (2) For movements to limit positions a second (i.e., longer) movement time (to limit pos) can be added.

@timoschilling
Copy link
Collaborator

I think it’s not a good idea to depend on a external library just for an icon.

@juangamnik
Copy link
Author

I think that the whole "Caution" is unnecessary since the calibration expects, that the motor safely finds its limit position, too. So no need for a Caution. From my point of view this can be removed without replacement :)

@vaenror
Copy link

vaenror commented Aug 1, 2021

Any news on this? Awaiting this feature eagerly!
Thanks for all the hard work!

@iBlackyUE
Copy link

Me too, I wait impatiently, because the automatic calibration only gives me 20% of the Shutter.
This homekit firmware is awesome.

@philmue1988
Copy link

hi @rojer are there any news regarding the implementation? would be great!

@rojer
Copy link
Contributor

rojer commented Oct 19, 2021

no update yet

@philmue1988
Copy link

@rojer thanks for your effort! Could you estimate, when it will be possible? I have the same problem that I cant use the shelly like I want to due to the fact that the consumption is 1.083 and stop after 1 sec instead of 28.

@rojer
Copy link
Contributor

rojer commented Oct 19, 2021

sorry, no ETA. i'm focusing on other things at the moment.

@philmue1988
Copy link

philmue1988 commented Oct 19, 2021

okay thank you. I haven't found a walkaround so far. Do you know if there would is one?

@rojer
Copy link
Contributor

rojer commented Oct 20, 2021

you could always use a custom build, i believe @juangamnik posted a link to firmware with this patch before.

@philmue1988
Copy link

thank you! @juangamnik do you have the link again? can't find it

@raaaf
Copy link

raaaf commented Oct 29, 2021

@juangamnik entweder bin ich zu blöd... siehe Screenshot.

Hab's dann selber per Fork probiert, jedoch scheitert der Buildprocess.. könntest du mir deine Firmware irgendwie anders zukommen lassen? :)

CleanShot 2021-10-29 at 15 24 47
.

@juangamnik
Copy link
Author

@juangamnik entweder bin ich zu blöd... siehe Screenshot.

Hab's dann selber per Fork probiert, jedoch scheitert der Buildprocess.. könntest du mir deine Firmware irgendwie anders zukommen lassen? :)

CleanShot 2021-10-29 at 15 24 47 .

Dear @raaaf. The artifacts are removed after some time. I couldn't rebuild the project as is either (although this is done in docker and should be repeatable...), but I synced with the upstream repository and did a rebuild and that completed. But be careful... I did not test the new build yet!

Here you can find the release:
https://github.com/juangamnik/shelly-homekit/actions/runs/1403210981

@raaaf
Copy link

raaaf commented Oct 31, 2021

@juangamnik cheers, mate. It works perfectly and finally I have the correct visual ui in Apple Home. Thanks for writing the necessary code and rebuilding it. I appreciate it.

image

@juangamnik
Copy link
Author

@raaaf kewl… thanks you‘re welcome

@vaenror
Copy link

vaenror commented Oct 31, 2021

Thank you very much for updating 🙏
I've only used the OTA method to install/update my shellys. How do I install this fork, dies it work OTA? I tried uploading the.zip from this fork/zipball/master but that doesn't work.

Thanks in advance.

@rojer
Copy link
Contributor

rojer commented Oct 31, 2021

thanks @juangamnik !
i uploaded the shelly 2.5 zip to my site, you can use this url for OTA: http://rojer.me/files/shelly/misc/shelly25-449.zip

@vaenror
Copy link

vaenror commented Oct 31, 2021

Thank you guys very much 🙏

@lucaspinelli85
Copy link

For problem 3 unfortunately I can't know if it does the same thing with automatic calibration because I can't automatically calibrate because there is no current draw.
So if you tell me that you have not made important changes to the software, I will try to understand why the ECU goes haywire if I move through the percentage bar!

@lucaspinelli85
Copy link

I think I understand problem 3.
If I raise / lower the homekit button it works, but if I raise / lower the percentage bar or even directly from webui, the control unit goes into alarm as if I had operated up and down at the same time.
In my opinion this happens because the exchange of the output from up to down and vice versa is so fast and sudden that the control unit perceives it as a signal at the same time and therefore goes into alarm.
This does not happen if I use the button in the homekit because there is a time lag between one action and another (there is a stop, instead of going from up directly to down and vice versa).
It would take a few milliseconds of interval between the up and down action and vice versa, or interpose the stop between one and the other so as not to pass directly from one condition to another.

@juangamnik
Copy link
Author

I think I understand problem 3.
If I raise / lower the homekit button it works, but if I raise / lower the percentage bar or even directly from webui, the control unit goes into alarm as if I had operated up and down at the same time.
In my opinion this happens because the exchange of the output from up to down and vice versa is so fast and sudden that the control unit perceives it as a signal at the same time and therefore goes into alarm.
This does not happen if I use the button in the homekit because there is a time lag between one action and another (there is a stop, instead of going from up directly to down and vice versa).
It would take a few milliseconds of interval between the up and down action and vice versa, or interpose the stop between one and the other so as not to pass directly from one condition to another.

The firmware is implemented as a state machine which has besides others different states for stopped, ramp-up, moving, and ramp-down. It might be, that the settings for ramp-up and ramp-down do not match your setup. @rojer is the ramp-up/-down depending on the flowing current? Perhaps this abrupt changes are because the state change is two fast without a value for current?

@raaaf
Copy link

raaaf commented Apr 11, 2022

@juangamnik @rojer we just moved to a new flat and I need the modified firmware again.. sadly, I can't find it on your server (@rojer).

Can you provide it again (@rojer) or can you build the artifact and provide it again, @juangamnik? :)

Cheers guys!

@raaaf
Copy link

raaaf commented May 2, 2022

@juangamnik @rojer Help a fella out, please ;)

@juangamnik
Copy link
Author

@juangamnik @rojer Help a fella out, please ;)

@raaaf sorry, but the file has been erased from GitHub automatically IIRC. @rojer had a link to the firmware AFAIK. Can you send it again?

Or else I need to do a new build but I am unsure when I can do this 😰

@raaaf
Copy link

raaaf commented May 17, 2022

How about right now? :)
Just kidding – though having the possibility to calibrate my shutters again is much appreciated.

Cheers!

@rojer
Copy link
Contributor

rojer commented May 17, 2022

@raaaf built and uploaded to https://rojer.me/files/shelly/misc/shelly25-449.zip

@raaaf
Copy link

raaaf commented May 18, 2022

@rojer awesome – thanks for your effort.. however the manual calibration part is missing or did it change? :(
CleanShot 2022-05-18 at 09 43 03

@rojer
Copy link
Contributor

rojer commented May 18, 2022

@raaaf it definitely is there, i just flashed and verified. check the build id under system settings, make sure it's 20220517-212055/2.10.1-10-gae6dacd-p449

@raaaf
Copy link

raaaf commented May 18, 2022

@rojer damn it.. accidentally flashed the latest beta (browser url cache).. cheers and keep it up!

PS: if you need any support in terms of design, give me a ping. I'd love to give back!

@greensouth
Copy link

greensouth commented May 19, 2022

One lil question... does this work for rolling shutters with BIG rollers, like spanish ones? That suppose that time for opening and closing is non linear, because with every turn the rollers gets bigger exponentially. That makes the position not accurate at all. I think that there is another issue covering that subject.

#204

@simonbrueckner
Copy link

First of all, thanks a million for the HomeKit firmware in general and this addition to tweak calibration.
I tried the firmware, however I am also running into the stopping at 99% open issue when using the manual calibration.
I believe that several people (including myself) have a different Problem as is tackled here:
For me at least, the issue is that my roller motor stops correctly at the top position, but at the bottom position, it will still roll even if the blinds are already full closed, leading to an ugly rattle noise until the motor stops. My blinds are fully closed at around 15%.
So I set a scene stopping closing the blinds at 15%. Doing so, I am not seeing the calibration going off, probably because the stock calibration only is used to indicate the rough position and will actually realign each time the motor reaches one end position.
So for me, I’d actually need two input fields to limit top or bottom positions to a given percentage value, and letting the other one go to the final position. Doing so, the calibration would stay intact and I could still use the 0-100% in HomeKit.

@lb-supertec
Copy link

I have multiple window openers GEZE ECChain which i want to control with a shelly 2.5.
I never managed to calibrate them in roller shutter mode.
The reason might be the low energy consumption of the motors of only 2 watts.

I tried many things (RC snubbers, Simulating higher energy consumption with bulbs and switches).
What in the end worked best for me is the firmware shelly25-449 with manual calibration.
I would be more then happy if this would be added to the regular firmware.

@Nately3
Copy link

Nately3 commented Oct 16, 2022

Does the roller-shutter-mode work when the Shelly_2.5 is running at 24 Volt? I read that under low voltage the current measurement does not work. This would mean that also can not be calibrated.

@lb-supertec
Copy link

lb-supertec commented Oct 16, 2022 via email

@Nately3
Copy link

Nately3 commented Oct 16, 2022

Hi,

my question did not refer to your problem. I need to control a 24V motor in a 24V enviroment. So I would need roller-shutter-mode with manual calibration at 24V. I am not sure if this is possible at all.

@ingski
Copy link

ingski commented Nov 30, 2022

Great Job. This alpha version solved my issue :-) Thanks a lot

Ingo

@dev2ek
Copy link

dev2ek commented Mar 28, 2023

First of all, I would like to thank you for this great project 😊👍👍👍😊

@rojer are there any thoughts from you as to when this great feature can be integrated into the current firmware?

I am using the current version from your link:

http://rojer.me/files/shelly/misc/shelly25-449.zip

Unfortunately this version still has the 99% problem ☹

Thank you very much for your work!

@GEORGzer
Copy link

I just registered because I wanted to say that this custom firmware actually solved a problem I had with the calibration. The ability to set a custom time for that spared me a ton of headaches 👍

I think it should be a part of the official release to give people the option.

@juangamnik
Copy link
Author

I just registered because I wanted to say that this custom firmware actually solved a problem I had with the calibration. The ability to set a custom time for that spared me a ton of headaches 👍

I think it should be a part of the official release to give people the option.

Thanks

@GEORGzer
Copy link

GEORGzer commented Jun 8, 2023

I just registered because I wanted to say that this custom firmware actually solved a problem I had with the calibration. The ability to set a custom time for that spared me a ton of headaches 👍
I think it should be a part of the official release to give people the option.

Thanks

You‘re welcome!

Unfortunately I‘ve run into the „99%“ problem as well, where the Shelly stops at „idle 99“ and the status in Homekit keeps spinning at „opening“ 🤷‍♂️

@juangamnik
Copy link
Author

Unfortunately I‘ve run into the „99%“ problem as well, where the Shelly stops at „idle 99“ and the status in Homekit keeps spinning at „opening“ 🤷‍♂️

Yeah, I have this issue to. I am not sure what is causing this. Perhaps I misunderstood the state machine „behind“ the firmware and missed a case. If someone finds my mistake, feel free to correct me.

@desek90
Copy link

desek90 commented Jun 11, 2023

I really hope there will be soon some progress on the 99% issue, because that feature is exactly what I need for my roller blinds
Keep up that excellent work guys!

Ps: please include the feature in the main release

@timoschilling timoschilling changed the title fixed #404 adding manual calibration. adding manual WC calibration. Jun 23, 2023
@timoschilling timoschilling mentioned this pull request Jun 23, 2023
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.