meross-homeassistant: Error from API with apiStatus 1402

Describe the bug Suddenly all the meross device stopped being available in HA. After checking the logs I discovered there was a return error from the Meross API. It seems the API answers with {‘apiStatus’: 1402, ‘sysStatus’: 0, ‘data’: None, ‘info’: ‘Mysql excution timeout’, ‘timeStamp’: ‘2020-12-21 18:54:54’}

Your environment HomeAssistant version: 2020.12.7 Hardware environment: RPi 4, 2 Meross 210 smart plugs, + other stuff on zwave + IKEA smart plug and IKEA gateway zigbee

Logs taken when the issue happened

2020-12-21 19:54:54 ERROR (MainThread) [meross_iot.http_api] Could not parse error code 1402.
2020-12-21 19:54:54 ERROR (MainThread) [custom_components.meross_cloud] Error occurred.
-------------------------------------
Component version: 0.4.1.0rc7
Device info: 
<Unavailable>
Error Message: "An exception occurred while setting up the meross manager. Setup will be retried..."
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/meross_iot/http_api.py", line 195, in _async_authenticated_post
    error = ErrorCodes(code)
  File "/usr/local/lib/python3.8/enum.py", line 315, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.8/enum.py", line 617, in __new__
    raise ve_exc
ValueError: 1402 is not a valid ErrorCodes
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/config/custom_components/meross_cloud/__init__.py", line 109, in async_setup_entry
    client, http_devices, creds_renewed = await get_or_renew_creds(email=email, password=password, stored_creds=creds)
  File "/config/custom_components/meross_cloud/__init__.py", line 67, in get_or_renew_creds
    http_devices = await http_client.async_list_devices()
  File "/usr/local/lib/python3.8/site-packages/meross_iot/http_api.py", line 260, in async_list_devices
    result = await self._async_authenticated_post(_DEV_LIST, {}, cloud_creds=self._cloud_creds)
  File "/usr/local/lib/python3.8/site-packages/meross_iot/http_api.py", line 197, in _async_authenticated_post
    raise AuthenticatedPostException(f"Unknown/Unhandled response code received from API. "
meross_iot.model.http.exception.AuthenticatedPostException: Unknown/Unhandled response code received from API. Response was: {'apiStatus': 1402, 'sysStatus': 0, 'data': None, 'info': 'Mysql excution timeout', 'timeStamp': '2020-12-21 18:54:54'}
2020-12-21 19:54:54 WARNING (MainThread) [homeassistant.config_entries] Config entry for meross_cloud not ready yet. Retrying in 80 seconds

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 21

Most upvoted comments

Same here in the UK, but the app continues to work without error. All fine until rebooted, now the same issues identified above.

Don’t make the mistake I did and log out, you won’t get back in again!