NextDom / plugin-Meross

Plugin NextDom pour piloter des Meross Smartplug
https://nextdom.github.io/plugin-Meross/
GNU General Public License v2.0
3 stars 11 forks source link

Adding support of merossIot 0.3.2.5 and device mss710 #21

Closed Censseo closed 4 years ago

Censseo commented 4 years ago

What I did:

I could only test with the mss710, because it's the only one I got, but it's working.

Astral0 commented 4 years ago

J'ai enfin pu tester mais j'ai un problème :

+ timeout --signal=SIGINT 30 python3 /usr/share/nextdom/plugins/plugin-Meross/3rdparty/meross.py --email xxx --password xxx--refresh --show
Traceback (most recent call last):
  File "/usr/share/nextdom/plugins/plugin-Meross/3rdparty/meross.py", line 373, in <module>
    d_devices = ConnectAndRefreshAll(email, password)
  File "/usr/share/nextdom/plugins/plugin-Meross/3rdparty/meross.py", line 208, in ConnectAndRefreshAll
    d = RefreshOneDevice(device=device)
  File "/usr/share/nextdom/plugins/plugin-Meross/3rdparty/meross.py", line 87, in RefreshOneDevice
    data = device.get_sys_data()
  File "/usr/share/nextdom/plugins/plugin-Meross/3rdparty/meross_iot/meross_iot/cloud/device.py", line 129, in get_sys_data
    return self.execute_command("GET", ALL, {})
  File "/usr/share/nextdom/plugins/plugin-Meross/3rdparty/meross_iot/meross_iot/cloud/device.py", line 124, in execute_command
    (self.name, self.uuid))
meross_iot.cloud.exceptions.OfflineDeviceException.OfflineDeviceException: The device Synology (18071976463532251a0534298f1371f3) is offline. The command cannot be executed

Cette prise est inaccessible pour une raison que j'ignore (mais cela arrive assez souvent avec les prises Meross qu'elles passent inaccessible depuis l'appli). Le seul moyen de la réactiver est de l'éteindre/rallumer, ce que je ne fais pas souvent si y aun serveur dessus :)

Je vais essayer de faire un try/except pour passer dessus (je crois que je l'avais fais dans l'ancienne version).

AA

Astral0 commented 4 years ago

OK j'ai corrigé mais je ne peux pas pousser son ton dépôt. Je vais faire en 2x : accepter ta PR et corriger dans la foulée.