rstrouse / ESPSomfy-RTS-HA

Control your somfy shades in Home Assistant
The Unlicense
125 stars 9 forks source link

Stop command returns shade to previous position #44

Closed hovorkap closed 5 months ago

hovorkap commented 6 months ago

Hi @rstrouse ,

Many thanks for you work, this whole project is awesome and works out of the box.

I'm just having one issue with my shades. The cover.stop_cover command rerturns shades to previous position, mostly if triggered after shades movement stop.

Steps to reproduce:

  1. Close shades completely (full down)
  2. Hit up button (cover.open_cover) -> shades go up
  3. After few moments (before shades went up completely) Hit stop button (cover.stop_cover) -> shades stop
  4. Hit stop button again (cover.stop_cover) -> shades go down

EspSomfy-RTS Firmware 2.4.0 on ESP Wroom Shades with HZ remove (not sure what type of receiver is in the shade box), 80bit RTS

I spotted this problem during integration with Loxone Automatic shades module. It also has configuration of times up and down. My integration sends http commands to HA cover service. It always sends command up/down and when movement should stop, it sends stop command. So if the shade is faster than loxone time projection, stop command is sent after movement stopped. Which results in shade going full up and then down again. It is kind of frustrating, but sunny days are not here yet.

I can supply more logs or config backup if required.

Best Regards, Petr Hovorka, @hovorkap

rstrouse commented 6 months ago

What appears to be occurring is that the shade is moving to the favorite position. When the motor is at the stop position and you press stop again it should move to the favorite stored on the motor.

https://github.com/rstrouse/ESPSomfy-RTS?tab=readme-ov-file#setting-a-favorite

hovorkap commented 6 months ago

Clearing my position from both shades seems to solve the problem. But partially. Shades ignore second stop command if called directly to shades. But I control them via group. And the group seems to still have the my position. And it cannot be cleared, long press on group My button does nothing.

I also tried to delete the group and create another one (while both windows My positions were cleared before). The new group still has My position configured.

By reading the integration wiki section I understand that group is kind of a hack that creates a new remote and assignes selected motors to it. So it also could have the my position configurable. Correct? Or at least "clearable". Or am I wrong?

As a workaround I can still send commands to each motor separately. But making the group work without My position would be brilliant.

Any suggestions?

BR, Petr

rstrouse commented 6 months ago

The My favorite position is a Somfy thing. It simply stores a position in the motor memory that is activated when the my/stop button is pressed and the motor is at rest. Groups do not have such a setting since there is nothing in the motors that make them aware that they are even part of a group. Each group member simply responds to the command from the group address. This makes it appear as if there is some sort of coordination.

So if you have 10 members of a group and the my button is pressed, if 4 of those motors are moving they will simply stop while the other 6 will move to their stored my position if the motor has a position stored in it. So what you are experiencing is not expected behavior.

Please upload a backup so I can see what is going on with your configuration.

hovorkap commented 6 months ago

ESPSomfyRTS 2024-03-13T17_05_37.backup.txt

hovorkap commented 6 months ago

image Shades (Okno 1, Okno 2) My button does nothing, the group (Obyvak_All) My button moves to some position (like 90% closed or so)

rstrouse commented 6 months ago

I loaded your backup and tried this out. When pressing the my button on the group I do not see any movement of the shades. Is this linked to any automations?

hovorkap commented 6 months ago

No, no automations. I also disabled the group entity in HA. Maybe it is a problem of motors. They are still paired with original remote, which has some my positions stored. I also noticed that one od the motors does not react on command if i send two commands fast one after another. For example close to Okno_1 1 and close to Okno_2. Second motor reacts, but first does not. Is there some required period to keep between two commands are sent? I mean on the radio level?

rstrouse commented 6 months ago

I'm sorry I meant to answer you last week.

First, I should probably clear up some things about the motors and remotes. The remotes do not store My positions. That storage is on the motor and there is exactly one My position that can be set. So the fix for the blinds moving unexpectedly is very easy to fix in a couple of steps.

1, Open the blind completely using ESPSomfy RTS. This will ensure we have good reference as to the position of the blind. 2.. Press and hold the My button on the ESPSomfy RTS screen. A screen will appear with a slider and a Set My Position button. Move the slider to a position like 25% then press the Set My Position button.

  1. The motor should move to 25% then stop and within a few seconds jog one more time indicating that the new My Position has been set.
  2. If you press and hold the My button again it will allow you to clear the My Position.

Do this for both motors.

For the condition where a motor does not react add a repeat to the definition in ESPSomfy RTS.

rstrouse commented 5 months ago

I assume you have gotten this sorted out so I am going to close this for now.