diff --git a/.version b/.version index 5505e33..90a2716 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.4.7.2b3 +0.4.7.3 diff --git a/README.md b/README.md index 8fc32ac..35b1928 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,11 @@ [![Downloads](https://pepy.tech/badge/meross-iot)](https://pepy.tech/project/meross-iot) ![PyPI - Downloads](https://img.shields.io/pypi/dm/meross-iot.svg?label=Pypi%20Downloads) +⚠ !Attention! ⚠ +--- +Meross did change the login API without notice and that caused the library to break. +Please make sure to upgrade your library to v0.4.7.3 to fix the issue. +--- # Meross IoT library A pure-python based library providing API for controlling Meross IoT devices over the internet. @@ -27,7 +32,7 @@ Due to the popularity of the library, I've decided to list it publicly on the Pi So, the installation is as simple as typing the following command: ```bash -pip install meross_iot==0.4.7.1 +pip install meross_iot==0.4.7.3 ``` ## Usage & Full Documentation @@ -193,11 +198,15 @@ Anyway, feel free to contribute via donations!

## Changelog -#### 0.4.7.1 -Updated requirements to use pycryptodomex instead of Crypto +### 0.4.7.3 +- Fixes missing `mfaLockExpire` key in login response data due to unexpected API changes from Meross +
Older +#### 0.4.7.1 +- Updated requirements to use pycryptodomex instead of Crypto + #### 0.4.7.0 - Added local-lan encryption capabilities to support newest Meross devices - Fixed roller shutter mixin not updating initial position after a full async_update() invocation diff --git a/meross_iot/http_api.py b/meross_iot/http_api.py index b8536ce..dfd705d 100644 --- a/meross_iot/http_api.py +++ b/meross_iot/http_api.py @@ -277,7 +277,6 @@ async def async_login(cls, user_email=response_data["email"], domain=response_data["domain"], mqtt_domain=response_data["mqttDomain"], - mfa_lock_expire=response_data["mfaLockExpire"], issued_on=datetime.utcnow() ) if creds_env_var_name is not None: diff --git a/meross_iot/model/credentials.py b/meross_iot/model/credentials.py index 0f21e5a..9238549 100644 --- a/meross_iot/model/credentials.py +++ b/meross_iot/model/credentials.py @@ -9,14 +9,13 @@ class MerossCloudCreds(object): """ Utility class that holds Meross Cloud credentials for a given user. """ - def __init__(self, token: str, key: str, user_id: str, user_email: str, issued_on: Union[datetime, str], domain: str, mqtt_domain :str, mfa_lock_expire:int): + def __init__(self, token: str, key: str, user_id: str, user_email: str, issued_on: Union[datetime, str], domain: str, mqtt_domain :str): self.token = token self.key = key self.user_id = user_id self.user_email = user_email self.domain = domain self.mqtt_domain = mqtt_domain, - self.mfa_lock_expire = mfa_lock_expire if isinstance(issued_on, datetime): self.issued_on = issued_on @@ -35,7 +34,6 @@ def to_json(self) -> str: "user_email": self.user_email, "domain": self.domain, "mqtt_domain": self.mqtt_domain, - "mfa_lock_expire": self.mfa_lock_expire, "issued_on": self.issued_on.isoformat() })