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

MRS100 wrong open setting after reboot #170

Closed
galamarco opened this issue Feb 18, 2022 · 2 comments
Closed

MRS100 wrong open setting after reboot #170

galamarco opened this issue Feb 18, 2022 · 2 comments
Labels
enhancement New feature or request fixed Upcoming fix/feature already on dev

Comments

@galamarco
Copy link

galamarco commented Feb 18, 2022

MRS100 device are set to 50% opening after HomeAssistant restart even if the shutter was completely open or completely closed.

Version

System

Version | core-2022.2.8
Installation type | Home Assistant OS

Home Assistant Supervisor

SO | Home Assistant OS 7.4
Supervisor version | supervisor-2022.01.1

Meross device

MRS100
firmaware version 2.1.4
hardware version 2.0.0

Describe the bug

MRS100 device are set to 50% opening after HomeAssistant restart even if the shutter was completely open or completely closed.
At each restart the shutter opening status is lost and set to 50% again.

In these days when automatic updates bring HomeAssistant to one restart a day, every day the shutters close in half or open in half because they think they are starting from the wrong point.

After each restart the device forgets the status of the rolling shutter and sets it to 50%.
The automations to bring the shutter to 0% then move it to half height, leaving the house open instead of closed.
Same thing by asking to open at 100% with an automation, the shutter will go up by 50% because it thinks it starts from mid-opening.

If I use the up or down arrow buttons manually (in the home assistant device interface) the component respects the total up / down time. If I insert the closing of the shutter in an automation by setting 0% opening, it only moves by 50% of the set time (because it thinks it starts from 50% when in reality it is completely open).

Error log

I don't know if it is useful but looking in the error log I found this (a few hours after the restart which causes the reset of the original position of the shutter).

Questo errore ha avuto origine da un'integrazione personalizzata.
Logger: custom_components.meross_lan
Source: custom_components/meross_lan/helpers.py:23
Integration: Meross LAN (documentation, issues)
First occurred: 17:41:49 (6 occurrences)
Last logged: 17:41:51
MerossDevice(2006096481753790815448e1e91e7501) error in async_http_request: Server disconnected
MerossDevice(2006093320459790815448e1e91e7cb3) error in async_http_request: Server disconnected
MerossDevice(2006090988485790815448e1e91e7c21) error in async_http_request: Server disconnected
MerossDevice(2007165824177090819948e1e92579b4) error in async_http_request: Server disconnected
MerossDevice(2006094896864290815448e1e91e7cb6) error in async_http_request: Server disconnected

Resolution expectation

After the restart, the shutter remembers the status it was in and is set again with that opening percentage.

Marco

@krahabb
Copy link
Owner

krahabb commented Feb 18, 2022

Hello @galamarco ,
Yes that is an issue hardly solvable because the mrs100 itself doesn't know it's own position and reports only 0 or 100 (this is at least the 'state of my knowledge' up to a few months ago when I did implement it.
So, in order to provide a nicer HA experience meross_lan overrides the internal device positioning information by calculating its own trajectories based on time of run.
Of course when you restart, the meross_lan doesn't know any reliable starting position and so the 50%. There's no alternative to this since after you restart you cannot be sure someone else didn't move the shutter in between (even if it's a few seconds...). I mean, you could be sure you didn't but meross_lan cannot ;)

I suggest you to use the more dedicated service calls like 'close_cover' and 'open_cover' which should (I cannot try myself) instruct the mrs100 to do a full run whatever the actual position: this way, the calculated state will 'relax' to the correct position 0 or 100 since the run lasts the full timing configured on the shutter.
I could tweak a bit meross_lan in order to do a full run if it knows the state is unknown at the start but that would be anyway a trick with the consequence that the first set_position would behave as a full run independently of the destination position..and that could be confusing even more....(It would work if you set 0 or 100 but what if you set 30 as the first target? We cannot really know where that 30% position lies).
That's why, if it fits you, I suggest to use the open/close cover which could be more appropriate for the intended action in your automations: i.e. do you want to open/close it full?
Nevertheless, I'll see if I can save the meross_lan HA state between restarts, not an ideal solution but maybe better than nothing (and would work if noone moves the shutter in between!)

@krahabb krahabb added the enhancement New feature or request label Feb 18, 2022
@galamarco
Copy link
Author

Thanks for the explanation.
The use of close_cover is a work around but not a solution of forgetting the position problem at each restart, even automatic, that occurs.

It is true that it is not possible to be sure that the button was pressed during the restart, but on the contrary we are sure that the shutters at 50% in a house are a 99% incorrect setting.

Currently it happens that I leave the house and the shutters are brought to 0% but they go down in the middle and do not close the house. I noticed it from the video surveillance otherwise I would have gone on like this for months. Who knows how many people this is happening to and they haven't noticed.
I come home and they are open normally, so you don't notice anything abnormal.

"close_cover" is certainly better, but it is the least userfriendly when creating automation from the interface. It is natural, not knowing this problem, to set the closing to 0% in the automations.
It could be a solution when setting 0% "close_cover" is executed and when setting 100% "open_cover" is executed. This implicitly resets the dubious status and makes sure that the shutter is fully opened or closed completely.
But I don't know if it's feasible.
Of course the 50% position after each reboot is always wrong.

Best regards
Marco Galassi

krahabb added a commit that referenced this issue Feb 19, 2022
@krahabb krahabb added the fixed Upcoming fix/feature already on dev label Feb 19, 2022
@krahabb krahabb mentioned this issue Feb 20, 2022
@krahabb krahabb mentioned this issue Jul 15, 2022
@krahabb krahabb closed this as completed Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed Upcoming fix/feature already on dev
Projects
None yet
Development

No branches or pull requests

2 participants