Skip to content

Commit

Permalink
Fix 385
Browse files Browse the repository at this point in the history
  • Loading branch information
albertogeniola committed Jul 10, 2024
1 parent 3752f3c commit 58de4e0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.7.2b3
0.4.7.3
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -193,11 +198,15 @@ Anyway, feel free to contribute via donations!
</p>

## 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


<details>
<summary>Older</summary>
#### 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
Expand Down
1 change: 0 additions & 1 deletion meross_iot/http_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions meross_iot/model/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
})

Expand Down

0 comments on commit 58de4e0

Please sign in to comment.