krahabb / meross_lan

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

Beta firmware (6.1.10) connection issue #219

Closed ffrog8 closed 2 years ago

ffrog8 commented 2 years ago

Similar to https://github.com/krahabb/meross_lan/issues/181 Mss 310 smart plugs not resetting their energy usage to 0 at midnight. I raised the issue with meross - they said they had a beta firmware that should resolve the issue. They uploaded it to one of my plugs and how HA can't interface to it anymore.

Device info: mss310 6.0.0 by Meross: Firmware: 6.1.10

Version of the custom_component

Configuration


{
  "home_assistant": {
    "installation_type": "Home Assistant Container",
    "version": "2022.9.0",
    "dev": false,
    "hassio": false,
    "virtualenv": false,
    "python_version": "3.10.5",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Australia/Adelaide",
    "os_name": "Linux",
    "os_version": "4.4.59+",
    "run_as_root": true
  },
  "custom_components": {
    "meross_lan": {
      "version": "2.6.2",
      "requirements": []
    },

Describe the bug

A clear and concise description of what the bug is.

Debug log


Logger: custom_components.meross_lan
Source: custom_components/meross_lan/config_flow.py:199
Integration: Meross LAN ([documentation](https://github.com/krahabb/meross_lan), [issues](https://github.com/krahabb/meross_lan/issues))
First occurred: 8:30:12 PM (3 occurrences)
Last logged: 8:32:25 PM

Error (Server disconnected) configuring meross device (host:<ip>)
krahabb commented 2 years ago

Hello @ffrog8 , Did you retrieve the 'cloud key' correctly? When you configure your device (since it appears to be paired to the Meross cloud).

If you set the key to an empty field and try using 'Hack mode' in order to bypass the configuration check, the device might reject the connection attempts.

If you instead went through the cloud retrieval process with success and the key is set then the issue might lie in a bugged firmware

ffrog8 commented 2 years ago

Here's the sequence of events.

  1. Meross central updated the firmware
  2. Device power cycled as part of firmware update
  3. HA lost contact
  4. Hours later HA was restarted HA config for plug was unchanged (it would have been hack mode and auto connection protocol)
  5. Attempted to reconfigure device, using hack mode. Got error "Key error: select 'Cloud retrieve' to get from Meross account"
  6. Attempted to reconfigure device, using cloud retrieve. seemed to 1/2 work in that for a while entity values would flash a value then go back to undefined
  7. At this point a bunch of random button clicks to get shit to work was attempted

Most recently

  1. Power cycled device
  2. Cleared the device key
  3. Tried hack mode - same error as above
  4. Tried cloud mode - key retrieved

And now HA entities are populated! Go figure! I'm guessing step 1 power cycle did the trick (or step 8). Thanks for the assist.