-
Notifications
You must be signed in to change notification settings - Fork 8
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
Cover is driving all the way up or down until end position, if a small position correction is needed #103
Comments
Could you please take a look at this? It's important to me. I have to edit it each time I update it. What do you think about these changes? |
Hello @JSchmid6, |
Hello grimmpp, |
I agree with the pull request in general. I'm wondering though why second granularity path was taken. In my previous - less well integrated - own enocean integration I used the 100ms granularity setup. Would you be fine if we switch to that approach? It would allow to more accurately do small corrections |
Of course, if 100ms are possible I would be happy. I think I missed that. For me it looked like the smallest number, to be set is one. |
@mkaufmann can you tell us what to adapt? In the meantime I will takeover this change into feature-branch and test it. |
I've merged it now into feature-branch. Can you please test it? |
In the 3F_7F telegram as documented here for FSB14 https://www.eltako.com/fileadmin/downloads/en/_main_catalogue/Gesamt-Katalog_ChT_gb_highRes.pdf there is a DB0_Bit1 that allows to configure 100ms granularity instead of second granularity. This is the Python code that I had running in my old script for computing the msb & lsb byte fields
and this was the code for getting the duration from the response
I hope this makes sense. |
Funnily, the command is implemented but the one with seconds is used. But only used for receiving the status not for sending the command.
Maybe you can try to replace the line with: |
The full close on short time frames is fixed, can confirm. With the |
I tried to use the feature branch, but I got some problems with tilt position. Is that something new? How could I test this branch? What do I have to do? Thanks for your support |
Yes, there are changes in it. You can see them here. What problems did you discover? |
I would like to suggest some modifications I have made to your integration and in more detail to the covers part. The goal of these changes is to prevent the covers from moving all the way up or down when only a small adjustment is needed.
I have adjusted the calculations in cover.py as follows:
Original:
time = min(int(((position - self._attr_current_cover_position) / 100.0) * self._time_opens), 255)
Changed to:
time = max(1, min(int((float(position - self._attr_current_cover_position) * float(self._time_opens) / 100.0)), 255))
and
Original:
time = min(int(((self._attr_current_cover_position - position) / 100.0) * self._time_closes), 255)
Changed to:
time = max(1, min(int((float(self._attr_current_cover_position - position) * float(self._time_closes) / 100.0)), 255))
Additionally, I modified lines 183 and 186 to ensure that the covers will move to the end position when 100 or 0 is set. This helps with calibration if the device is out of sync.
Original:
Changed to:
It would be great if you could incorporate these changes into your integration.
Thank you very much for your excellent work and great commitment.
The text was updated successfully, but these errors were encountered: