krahabb / meross_lan

Home Assistant integration for Meross devices
MIT License
455 stars 47 forks source link

MRS100 stop working after update to the last firmware version 2.1.4 #148

Closed galamarco closed 2 years ago

galamarco commented 2 years ago

Hello, today I update Meross MRS100 firmware to the last version, version 2.1.4 then all devices stop to be available in home assistant. I try to remove it and connect again without success.

I check this devices on my network with IP address and they are online connected to the router but HomeAssistant is not able to menage. If I use Meross app they work well. If I controll this device from IFTTT they work well but stop working with HomeAssistant.

In the log I can see this:

Logger: custom_components.meross_lan Source: custom_components/meross_lan/helpers.py:23 Integration: Meross LAN (documentation, issues) First occurred: 20:34:32 (5 occurrences) Last logged: 20:34:32

MerossDevice(2007165824177090819948e1e92579b4) error in async_http_request: {'error': {'code': 5001, 'detail': 'sign error'}} MerossDevice(2006090988485790815448e1e91e7c21) error in async_http_request: {'error': {'code': 5001, 'detail': 'sign error'}} MerossDevice(2006094896864290815448e1e91e7cb6) error in async_http_request: {'error': {'code': 5001, 'detail': 'sign error'}} MerossDevice(2006096481753790815448e1e91e7501) error in async_http_request: {'error': {'code': 5001, 'detail': 'sign error'}} MerossDevice(2006093320459790815448e1e91e7cb3) error in async_http_request: {'error': {'code': 5001, 'detail': 'sign error'}}

I'm using Home Assistant 2021.12.8 with core-2021.12.8 and supervisor-2021.12.2 on an rpi4

How can I solve this problems?

Best regards Marco

dMopp commented 2 years ago

+1, same here You could Switch back to the iot solution

galamarco commented 2 years ago

@dMopp Thank you for your suggestion but don't use "Meross LAN" integration is not a solution to solve a problem in this integration... I'm reporting this bug to solve it for me and other users...

dMopp commented 2 years ago

I dont ask you to NOT use the addon, i just wanna p0rovide you a temporary solution. Iam also hoping this can be fixed, soon.

galamarco commented 2 years ago

@dMopp thanks for your temporary solution but I'm using IFTTT as work around this problem. Unfortunately, as I said, not using the extension is not a solution and for this reason I immediately reported the problem so that it can be solved for everyone. If this device has stopped working due to a firmware change, it is only a matter of time, the other meross devices will also be updated and may face the same fate.

galamarco commented 2 years ago

some user report the same problem after update the firmware of Meross power strips and smart sockets. Here the post.

pech84 commented 2 years ago

Is there someone try to solve this problem ?

CTJohnK commented 2 years ago

If you look at the Meross LAN plug-in and select one of the items which is not responding, can you confirm when you click the Configure link, if the IP address displayed is the same address your router is providing?

If so, I would presume the issue is related to the UUID/Device Key. Have you tried putting a (bad) value in the Device Key and clicking Submit to see if the plug-in would re-connect to the device?

pech84 commented 2 years ago

Same ip. I try to disconnect one and reconnect it. There is a key problem, I have to connect with my meross account. Now it works but I have to restart this procedure with my 10 other mrs100....

galamarco commented 2 years ago

Is not an IP error, the IP address is the same (setting from access point) and device is online. This is a new device key. This identifier is probably changed with the new firmware. With your suggestions I have done the following (which I report for other users who complain about these problems)

I try to remove one device and add it again but the Device Key is wrong both empty

and with random text

Pressing on "send" even if an error appears, you go to a login screen with meross credentials.

Enter your Meross credentials and the integration will fill in the "device code" with the correct data. Going "finis" will successfully add the device. If renamed as it was before, even automations, scripts and scenarios will work again.

krahabb commented 2 years ago

Thank you @galamarco , This is an 'emerging' issue as far as device firmwares get updated. In the issues raised so far this was almost always been fixed by correctly setting the device key in meross_lan configuration with the procedure you posted. They were previously working by using a key hack algorithm but it looks like Meross is closing up on this weakness. Sadly enough, it looks like there are some updated devices (#142) not working correctly even with the correct key but I don't have any option at the moment to further reverse engineer this issue.

Cippo2019 commented 2 years ago

Is not an IP error, the IP address is the same (setting from access point) and device is online. This is a new device key. This identifier is probably changed with the new firmware. With your suggestions I have done the following (which I report for other users who complain about these problems)

I try to remove one device and add it again but the Device Key is wrong both empty

and with random text

Pressing on "send" even if an error appears, you go to a login screen with meross credentials.

Enter your Meross credentials and the integration will fill in the "device code" with the correct data. Going "finis" will successfully add the device. If renamed as it was before, even automations, scripts and scenarios will work again.

HI Galamarco when you say "I try to remove one device and add it again" .. what do you mean ? I tried to revome and readd from meross app and try to hit "configure" again on meross add on.. wihtout seen what you indicate with the screen..

wbr

Tiziano

dMopp commented 2 years ago

I got one of my 4 switches working, but the workarround is always fetching the same key, independent from the IP address :9 So after readding my 2nd device, i got an"device already error" error and the device key is the same :(

krahabb commented 2 years ago

@dMopp , The device key is the same for all of the devices paired on the same meross account so, whenever you retry the 'key retrieval' with the same credentials you'll get the same one. meross_lan caches the device key internally so it is able to pre-fill the next time you configure another meross device (supposing the device is bound to the same Meross account!)

The 'device already configured' error is maybe due to another configuration (either 'disabled' or 'ignored') already set for the same ip/device

dMopp commented 2 years ago

@krahabb you where right, it hit an edge case at ha, that means the device was disabled and i was unnable to remove it, because it was NOT showing as disabled integration. so i had to remove it by hand from ha (/config/.storage/core.device_registry) and then i was able to readd it using the existing device key. thanks for pointing me in the right direction :)

krahabb commented 2 years ago

The incoming release 'Dare' has a better configuration management interface so you can retrieve the cloud key even on old already configured devices. The new configuration panel tests the key and disallow proceeding until it is ok, either a custom key (for people who have 'reprogrammed' their devices) or the 'original' meross cloud device key. Leaving the key empty is now allowed but you have to explicitly set so when configuring the integration.

I guess this issue is being fixed when the release will go public (right now it is marked as pre-release but it should work)