Skip to content

add tilt/angle #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

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

add tilt/angle #8

wants to merge 12 commits into from

Conversation

thesaint1975
Copy link

Hi Cornim,

as discussed earlier that day, here is my pull request.
tilt can be adjusted from 30 (open) and 100 (fully closed)
shades[1].set_shade_tilt_position(100)

with shades[1].get_shade_state(True) every of my 6 raffstores (venetian blinds) shows slightly different tilt values, so this are the "lowest common denominator", and the difference in tilt/ angle is imperceptible.

shades[1].stop_moving_shade() stops surprisingly a moving shade, sometimes it needs some seconds bust most of my trials it stops during 1or 2 seconds

please dont hesitate to reject if the quality is insufficient, my coding skills are very limited (as you have surely noticed).

if you have any pointers or clues regarding the HA Integration, it would be really helpful

cheers
roland

Copy link
Owner

@cornim cornim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Roland,

thanks for the pull request. Looks very good overall.
I left a couple of comments with suggestions on how I would change things. Have a look.

My one big concern (it's also in the comments) is if position and tilt should be send as seperate commands. Have you checked if this is how it is done be the webcontrol server? Can they not be send in one command, e.g., '03{position}{tilt}ffff' ?

Best
Cornelius

thesaint1975 and others added 7 commits July 6, 2022 10:01
Co-authored-by: Cornelius Mund <4417017+cornim@users.noreply.github.com>
Co-authored-by: Cornelius Mund <4417017+cornim@users.noreply.github.com>
Co-authored-by: Cornelius Mund <4417017+cornim@users.noreply.github.com>
Co-authored-by: Cornelius Mund <4417017+cornim@users.noreply.github.com>
Co-authored-by: Cornelius Mund <4417017+cornim@users.noreply.github.com>
Co-authored-by: Cornelius Mund <4417017+cornim@users.noreply.github.com>
Co-authored-by: Cornelius Mund <4417017+cornim@users.noreply.github.com>
@cornim
Copy link
Owner

cornim commented Jul 7, 2022

While looking through this PR I realized that there is one thing missing. So far only one type of blind was supported so it wasn't necessary to distinguish different product types but if we want to integrate this properly into HA, the library needs to carry the information which product type a shade has.
The info is returned as part of the channel request. My shades are <produkttyp>10</produkttyp><bedientyp>4</bedientyp>. I don't know which one is the relevant info but perhaps comparing with what you got will help us here.
Can you have a look, please?

@thesaint1975
Copy link
Author

will check this hopefully tonight

@thesaint1975
Copy link
Author

sorry for the late response,
my 6 blinds returning all the same,
<produkttyp>0</produkttyp> <bedientyp>2</bedientyp>

for explanation,
4 venetian blinds are mounted in front of sloping roof windows and can take an angle of (simplified) -90° to +90° (where 0° = full open) technically speaking -90° and +90° are fully closed but with a different incidence of light depending on the position of the sun or whatever.
the other two venetian blinds are in front of the terrace doors (so they are vertically) and technically open their angle between 0° and +90°C. Inconsistently, in the scrappy Warema App these two are also displayed with a tilt adjustment range of -90° to +90°.

I'll provide exact model types later, for case it helps someone

if i can do any further check or investigation, pls let me know

regarding the move/tilt in one command, id dint have time yet, hopefully tonight

@cornim
Copy link
Owner

cornim commented Jul 11, 2022

Thanks for looking it up. It seems that between the model that you have and the model that I have we can only distinguish between with/without tilt and we can use bedientyp for it.
If you don't have time, I can try and come up with an implementation but it might take a couple of weeks as I have very limited free time at the moment.

@thesaint1975
Copy link
Author

thesaint1975 commented Jul 13, 2022

unfortunately it's the same for me too (time management is very challenging with one-year-old twins, haha)
unfortunately I'm also making no progress with move/tilt in one command and have to ask for a little patience.
regarding the Model Type, it seems that there is only one "Funkzwischenstecker" (kind of wireless adapter) from Warema.

Regarding your HA integration, I tried to implement the stop function, added SUPPORT_STOP in the import and feature section and
def stop_cover(self, **kwargs): self.force_update_until = datetime.now() + timedelta(seconds=15) self.shade.stop_moving_shade()

unfortunately I always get a Shade Object has no Attribute stop_moving_shade error. do you have any idea what i missed here?

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.

2 participants