albertogeniola / MerossIot

Async Python library for controlling Meross devices
https://albertogeniola.github.io/MerossIot/
MIT License
484 stars 88 forks source link

MSS310R support #71

Open mfabiani53 opened 4 years ago

mfabiani53 commented 4 years ago

Is this plug supported by the library? If not could it be possible to add ?

albertogeniola commented 4 years ago

HI @mfabiani53 ,

it should be. Are you having troubles?

albertogeniola commented 4 years ago

Hi @mfabiani53 ,

Unfortunately I don't own the MSS310R. However, I've created a debug utility that might help me gather enough data to implement support for your device. You should upgrade to the latest version of the library

pip3 install meross-iot==0.3.1.11 --upgrade and run it as

$ meross_info_gather then upload the data.zip file to this thread. Such data would help me understand weather any change is required to the library to support the MSS310R.

albertogeniola commented 4 years ago

Closing for inactivity

Korhyu commented 2 months ago

Hi! First of all, NICE WORK!!! Its quite documented and works great!

I am trying to read the instant (last) values of a MSS310r (voltage, current and power) or even the historic data. I am using your example on the git https://albertogeniola.github.io/MerossIot/quick-start.html#power-consumption

But this error ocurrs

devs = manager.find_devices(device_class=ElectricityMixin)
                                         ^^^^^^^^^^^^^^^^
NameError: name 'ElectricityMixin' is not defined

I have run another example, the one that list the devices en the account, and worked fine. Is this a device problem? Is there a way to read the avaiable fields on the device?

Thanks!!!

Edit: here i leave some of the LOG in the terminal. Thanks!

INFO:

------- Triggering Manager Discovery, filter_device: [None] -------
INFO:Allocating new mqtt client for mqtt-eu-4.meross.com:443...
INFO:Subscribed to topics, scheduling state update for already known devices.
INFO:

------- Triggering Manager Discovery, filter_device: [None] -------
INFO:Fetch and update done
INFO:
------- Manager Discovery ended -------

After this comes the error described

albertogeniola commented 2 months ago

Hi!

The error you mention is caused by the lack of the necessary import statement at the beginning of the script:

from meross_iot.controller.mixins.electricity import ElectricityMixin

That should fix the issue. In case it doesn't, can you please post the entire script so we can have a look at that?

Korhyu commented 2 months ago

That work like a charm.... I dont know how i miss that import....

Thanks a LOT!!!

stale[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.