krahabb / meross_lan

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

MSS310 unavailable #226

Closed olej24 closed 1 year ago

olej24 commented 2 years ago

Hi,

I have 4 MSS310 smart plugs all on the same firmware (latest version 6.1.12).

I had no issue connecting these through HA, however, two work fine and two just show as “unavailable” they seem to connect momentarily before disconnecting again every minute.

I’ve tried unplugging and re plugging them in and deleting and readding to HA and neither worked, 680B787E-CE4A-4672-A402-D805E20B973B

krahabb commented 2 years ago

Hello @olej24, could you provide a diagnostic trace for the problematic devices ? Here the docs on how to gather diagnostics for each device

enazevedo commented 2 years ago

Hi @krahabb ,

I hope this file is what is required: Diagnostics

As the fellow user of your code above, I've also tried

  1. Removed the device from HA;
  2. Step above + Cleared the "deleted devices" from the core.device_registry;
  3. Two steps above + change the IP address of the power plug

The issues persisted on all three tests.

My tests were based in me thinking it was some kind of conflict with old settings, I dont know.. was just in shoot from the hip approach 😃 .

olej24 commented 2 years ago

Hi,

I tried downloading the diagnostic report by going to devices, clicking on the smart plug in the Meross LAN listing, then clicking download diagnostic. After a minute or two i got a txt file which contains “401: unauthorised”.

Any ideas what I’m doing wrong?

krahabb commented 2 years ago

Yep, this is because you're likely accessing HA either through your NabuCasa instance or any other proxy. Since the diagnostic is collected for a period of time after clicking 'download' I've experienced the same issue but it works correctly if you access the HA instance directly on your LAN (or at least it worked when I originally implemented it)

olej24 commented 2 years ago

Hi, I tried logging in via local IP address and same issue…

enazevedo commented 2 years ago

Hi Krahabb,

I am having the same issue as the OP. Was the files I shared sufficient for an initial analysis?

Thank you!

On Tue, 15 Nov 2022, 22:13 olej24, @.***> wrote:

Hi, I tried logging in via local IP address and same issue…

— Reply to this email directly, view it on GitHub https://github.com/krahabb/meross_lan/issues/226#issuecomment-1315161009, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMXXQILMA2Z5HMZAQPIKQOLWINV57ANCNFSM6AAAAAAR77RNXM . You are receiving this because you commented.Message ID: @.***>

enazevedo commented 2 years ago

Hi everyone. Today I got a notification on Meross App about an updated on some powerplugs. To my happyness, both powerplugs that had issues had an update available. Changlog was also promising: Screenshot_20221116_195453_meross

Update done, immediately, the issue was gone on HA. Powerplugs back available, stable and reliable.

Im not popping the champagne, because it was working, and stopped without any changes, but for now, I'm glad. Hopefully will remain stable.

krahabb commented 2 years ago

Hello @enazevedo, Yep, the diagnostic you gathered is pointing me to a suspect: the device is refusing to reply to the inquiry about the energy consumption so that's a start. This is likely the same issue as per other users experiencing these frequent disconnect (it looks like this is consistent with the 6.x.x firmware versions) I don't have any firmware of this level to test but I'll try to make meross_lan more robust against these kind of issues since they could be predictable in some way (the device always crashes on the same command so it should be easy to automatically cut out the 'offending' command from the meross_lan dictionary of available ones)

krahabb commented 2 years ago

Hi everyone. Today I got a notification on Meross App about an updated on some powerplugs. To my happyness, both powerplugs that had issues had an update available. Changlog was also promising: Screenshot_20221116_195453_meross

Update done, immediately, the issue was gone on HA. Powerplugs back available, stable and reliable.

Im not popping the champagne, because it was working, and stopped without any changes, but for now, I'm glad. Hopefully will remain stable.

Oh..I was just typing while your comment popped up. That could be some good news for this kind of issue but still there's some improvement to carry on on meross_lan

olej24 commented 2 years ago

Hi

I haven’t received the firmware update yet (on 6.1.12) but hopefully soon. I deleted the two plugs from my Meross app and re added them and they’re working for now.

I did have an automation setup via the app to turn these two plugs off at night (nothing for the other two that continued to work fine) is there any chance this could cause the issue? I can always setup the automation via HA instead

ioannispelelis commented 1 year ago

Personally I updated today on 6.3.21 and I lost power consumption on all 9 of my meross 310 devices that are one hardware 6.0 +firmware 6.3.21 😭 Screenshot_2022-11-27-23-49-41-482-edit_com meross meross

I have 3 mss310 that are one hardware 2.0 and those work still well as they are on an older firmware Screenshot_2022-11-27-23-51-09-910-edit_com meross meross

ioannispelelis commented 1 year ago

So in the logs i have regularly this 9 lines since upgrading firmware on my 9 meross devices with hardware 6.0.0 to firmware 6.3.21:

2022-11-27 23:54:36.078 WARNING (MainThread) [custom_components.meross_lan] MerossDevice(2102080879741251805448e1e94c4cbf) error in async_http_request: Server disconnected
2022-11-27 23:54:36.083 WARNING (MainThread) [custom_components.meross_lan] MerossDevice(2102087359498651805448e1e94c46eb) error in async_http_request: Server disconnected
2022-11-27 23:54:36.084 WARNING (MainThread) [custom_components.meross_lan] MerossDevice(2102089185115651805448e1e94c463e) error in async_http_request: Server disconnected
2022-11-27 23:54:36.086 WARNING (MainThread) [custom_components.meross_lan] MerossDevice(2102087578213651805448e1e94c5a0b) error in async_http_request: Server disconnected
2022-11-27 23:54:36.088 WARNING (MainThread) [custom_components.meross_lan] MerossDevice(2102081483139351805448e1e94c5798) error in async_http_request: Server disconnected
2022-11-27 23:54:36.096 WARNING (MainThread) [custom_components.meross_lan] MerossDevice(2102089333874251805448e1e94c5ab2) error in async_http_request: Server disconnected
2022-11-27 23:54:36.097 WARNING (MainThread) [custom_components.meross_lan] MerossDevice(2102080288099451805448e1e94c53c4) error in async_http_request: Server disconnected
2022-11-27 23:54:36.099 WARNING (MainThread) [custom_components.meross_lan] MerossDevice(2102088891033351805448e1e94c5d10) error in async_http_request: Server disconnected
2022-11-27 23:54:36.102 WARNING (MainThread) [custom_components.meross_lan] MerossDevice(2102086496295451805448e1e94c4e14) error in async_http_request: Server disconnected

But it looks like I found how to "fix" my issue after firmware update: Have to reconfigure each of those devices to get the "key"

image

Select Auto in the connexion protocol image

Enter Meross username/pass image

it will pull the device key image

then validate image

then reload the device image

And the plug works again.. Repeat that for every device with the new firmware