albertogeniola / meross-homeassistant

Custom component that leverages the Meross IoT library to integrate with Homeassistant
MIT License
687 stars 76 forks source link

mrs100 #484

Closed thebadboyltz closed 2 months ago

thebadboyltz commented 5 months ago

Describe the bug A clear and concise description of what the bug is.

Your environment HomeAssistant version: -- 11.4 -- Hassio Version (if applicable): -- PLEASE SPECIFY -- Hardware environment: -- PLEASE SPECIFY --

I am having a problem with my MRS100 switches, the up or down command works but the status feedback does not work. If I close a shutter with the MRS100 local remote control, the feedback always indicates open in HA.

Do you have an idea of ​​the problem. THANKS

viktor56240 commented 5 months ago

+1

Ginxo commented 5 months ago

+1 this library is so awesome, I'm just missing shutter position (or percentage information). Shutter status is always open unless is totally closed (or during closing/opening/moving status). @albertogeniola do you think there is any chance to obtain proper value from https://albertogeniola.github.io/MerossIot/api-reference/controller/mixins/rollershutter.html?highlight=shutter#meross_iot.controller.mixins.roller_shutter.RollerShutterTimerMixin.get_position ? according to your documentation...

The current roller shutter position. Returns 100 if the given roller shutter is open, 0 if it is close, -1 if it is stop.
pyrexfm commented 4 months ago

Same. But found this in the code comments:

So far, the Roller Shutter RST100 supports position, but it looks like it is fake and not reliable. So we don't support that on HA neither.

Seems like it is going to be complicated

thebadboyltz commented 3 months ago

hello, is there any hope that the MRS100 will be 100% functional one day, I am willing to pay for it to work.

If my shutters are closed and I restart HA, it tells me that they are all open.

If I were as competent as "albertogeniola or others", I would even make the modifications to benefit the community, unfortunately I am terrible at programming :-(

Ginxo commented 3 months ago

hello, is there any hope that the MRS100 will be 100% functional one day, I am willing to pay for it to work.

If my shutters are closed and I restart HA, it tells me that they are all open.

If I were as competent as "albertogeniola or others", I would even make the modifications to benefit the community, unfortunately I am terrible at programming :-(

well unless someone correct me, I'm afraid we are stuck by meros service integration here since it is not exposing real position, see documentation comment, according to it there's nothing between 0 a 100. About the problem you mention @thebadboyltz I would recommend you to check whether there is a related open ticket otherwise just open a new one, I'm not facing it on my installation TBH.

thebadboyltz commented 3 months ago

sorry for asking a stupid question, but in the official MEROSS application there is state feedback so it must be possible (for someone who knows about it).

where should I go to open a ticket?

THANKS

Ginxo commented 3 months ago

sorry for asking a stupid question, but in the official MEROSS application there is state feedback so it must be possible (for someone who knows about it).

where should I go to open a ticket?

THANKS

not stupid question at all... maybe @albertogeniola can bring some light here. I'm glad to help in case this is possible

pyrexfm commented 3 months ago

Yes, that tells me this should work. @albertogeniola if you want you could enable this and us that have the MRS100 could help you test this!

If you don't have time and could explain give me some pointers I can try (have some programming experience but never did anything in HA).

Ginxo commented 3 months ago

@albertogeniola I would say the missing point (at least for me) is about how to access meross API, once I get it I will be able to at least test whether this is feasible

thebadboyltz commented 3 months ago

I really hope someone can do this, that would be fantastic.

albertogeniola commented 3 months ago

Hi @thebadboyltz and all,

can you please provide some screenshots of the Meross app where you can find the feedback status? Also, can you please provide the HW version and the firmware version of your device?

I own a MRS100 device HW version 2.0.0 (firmware version 2.1.4) and the app does not even report whether the shutter is opened or not. I am curious to see if newer versions of the shutter has added this feature...

pyrexfm commented 3 months ago

https://github.com/albertogeniola/meross-homeassistant/assets/73044172/88d666f0-c2ac-4cf4-b8dc-59a7104f451e

Firmware 6.6.6 HW version is 8.0.0

Ginxo commented 3 months ago

I'm able to see it too, same firmware, same HW version WhatsApp Image 2024-03-15 at 20 16 52

albertogeniola commented 3 months ago

@Ginxo , @pyrexfm ,

you are running newer HW/FW versions of the MRS100: yours expose that functionality. I'll mark this repository as Enhancement. I'll possibly spend some time on adding this feature in the next release.

thebadboyltz commented 3 months ago

I'm using version 7.6.14 and 7.0.0 and it's like the higher videos. If you can do this in future versions I will support you financially

Ginxo commented 2 months ago

I've posted for now a solution, see https://github.com/albertogeniola/meross-homeassistant/pull/495 @albertogeniola please review

this is working for me, at least now the percentage is shown on the shutter component.

I'm now working on providing SET_POSITION feature for being able to work with a slider image

set position is not working for now, but I'm still trying it... Cheers

Ginxo commented 2 months ago

slider feature is now posted as a proposal together with the set position feature. See https://github.com/albertogeniola/meross-homeassistant/pull/496 let's wait for @albertogeniola 's approval Meanwhile you can replace your custom_components/meross_cloud/cover.py file by the one from my repo https://github.com/Ginxo/meross-homeassistant/blob/feature/setposition/custom_components/meross_cloud/cover.py

feedback is welcomed! Cheers, Kike

albertogeniola commented 2 months ago

Hi @Ginxo ,

thanks a lot for the great work. I've added a couple of comments to your PR and requested some changes. In general https://github.com/albertogeniola/meross-homeassistant/pull/495 seems ok (just confirm it will work also without assuming 50% when no position is available from underlying library). The #496 though requires some more work on the low-level library to determine if the specific roller-shutter supports setting the position. Can you please provide a sniffed payload with a hw 7.0.0+ revision? (please have a look at here to know how to do so.

thebadboyltz commented 2 months ago

hello, I tested your code and the percentage return works. This is a big step forward but as written above when restarting the percentage is set to 50% instead of obtaining the true value.

If only I were as competent as you, I would gladly help you but unfortunately in this area I have two left hands.

Ginxo commented 2 months ago

hello, I tested your code and the percentage return works. This is a big step forward but as written above when restarting the percentage is set to 50% instead of obtaining the true value.

If only I were as competent as you, I would gladly help you but unfortunately in this area I have two left hands.

we are working on improving that 50% thing, for now it is more useful than it was, @albertogeniola already guide me on how to sniff the meross app behaviour, we will have something soon :crossed_fingers:

albertogeniola commented 2 months ago

Hi! @Ginxo , as mentioned in #495 I've found the reason why the initial position was not reporting correctly. However, as I don't own the most recent MRS100 with the ability of adjusting the position, I need you to test the code on my behalf.

Please, do as follows.

Once I get this info from you, I can work on a new version release.

Ginxo commented 2 months ago

Hi! @Ginxo , as mentioned in #495 I've found the reason why the initial position was not reporting correctly. However, as I don't own the most recent MRS100 with the ability of adjusting the position, I need you to test the code on my behalf.

Please, do as follows.

* Change the `current_cover_position(self):` so that it does not return 50, but it always returns `self._device.get_position(channel=self._channel_id)`.

* Change the content of `manifest.json` updating the requirements as follows: `"requirements": ["meross_iot==0.4.7.0b1"],`

* Restart HA and check if this is now working as intended.

Once I get this info from you, I can work on a new version release.

already applied suggestion and working. Please find comments on https://github.com/albertogeniola/meross-homeassistant/pull/495 and https://github.com/albertogeniola/meross-homeassistant/pull/496

thebadboyltz commented 2 months ago

I tested with the modifications, the percentage is correct. When restarting HA the percentage is still correct. On the other hand, when the shutter is open it displays closed and when it closes it displays open...

Ginxo commented 2 months ago

I tested with the modifications, the percentage is correct. When restarting HA the percentage is still correct. On the other hand, when the shutter is open it displays closed and when it closes it displays open...

I don't see that happening :thinking: can you please share @thebadboyltz the steps you do for facing that behaviour?

Thanks!

thebadboyltz commented 2 months ago

I used your COVER.PY, then I modified it like this and I got this result. [Change the current_cover_position(self): so that it does not return 50, but it always returns self._device.get_position(channel=self._channel_id).

IMG_9601 IMG_9602 IMG_9603

Ginxo commented 2 months ago

I used your COVER.PY, then I modified it like this and I got this result. [Change the current_cover_position(self): so that it does not return 50, but it always returns self._device.get_position(channel=self._channel_id).

* Change the content of `manifest.json` updating the requirements as follows: `"requirements": ["meross_iot==0.4.7.0b1"],`

* Restart HA and check if this is now working as intended](url)

IMG_9601 IMG_9602 IMG_9603

just to be sure, you can take latest code from https://github.com/albertogeniola/meross-homeassistant/pull/496/files I don't have that behaviour :thinking:

thebadboyltz commented 2 months ago

Fantastic, it works wonderfully. You are the best

albertogeniola commented 2 months ago

Hi all! Just be patient, the feature is almost there. I just need to perform some minor adjustments on the low-level library and then I'll release a newer version of this component with this feature enabled.

I'll keep you posted!

albertogeniola commented 2 months ago

Hi all! I've just released a new version (v1.3.0) on HACS with some improvements. Improved support for MRS100 has been added. Can you please try it and report back if working as expected?

Ginxo commented 2 months ago

thanks @albertogeniola did you really released v1.3.0 ? :thinking: I just see v1.2.13 is the release process still ongoing? image

Ginxo commented 2 months ago

now it is, sorry

Ginxo commented 2 months ago

Hi all! I've just released a new version (v1.3.0) on HACS with some improvements. Improved support for MRS100 has been added. Can you please try it and report back if working as expected?

everything working as expected after upgrading to v1.3.0

albertogeniola commented 2 months ago

Great to hear that! Closing as done.