A simple library to deal with Meross devices. At the moment MSS110, MSS310 smart plugs and the MSS425E power stirp
Meross IoT library
A pure-python based library providing API for controlling Meross IoT devices over the internet.
To see what devices are currently supported, checkout the Currently supported devices section. Hopefully, more Meross hardware will be supported in the future.
This library is still work in progress, therefore use it with caution.
Due to the popularity of the library, I've decided to list it publicly on the Pipy index. So, the installation is as simple as typing the following command:
pip install meross_iot --upgrade
The following script demonstrates how to use this library.
import time import sys from meross_iot.api import MerossHttpClient if __name__=='__main__': httpHandler = MerossHttpClient(email="YOUR_MEROSS_CLOUD_EMAIL", password="YOUR_PASSWORD") # Retrieves the list of supported devices devices = httpHandler.list_supported_devices() # Returns most of the info about the power plug data = devices.get_sys_data() # Turns the power-plug on devices.turn_off() # Turns the power-plug off devices.turn_on() # Reads the historical device consumption consumption = devices.get_power_consumptionX() # Returns the list of WIFI Network available for the plug # (Note. this takes some time to complete) wifi_list = devices.get_wifi_list() # Info about the device trace = devices.get_trace() debug = devices.get_debug() # Returns the capabilities of this device abilities = devices.get_abilities() # I still have to figure this out :S report = devices.get_report() # Returns the current power consumption and voltage from the plug # (Note: this is not really realtime, but close enough) electricity = devices.get_electricity() current_status = devices.get_electricity() print(current_status)
Currently supported devices
Even though this library was firstly meant to drive only the Meross MSS310, other nice developers contributed to its realization. The following is the currently supported list of devices:
This library was implemented by reverse-engineering the network communications between the plug and the meross network. Anyone can do the same by simply installing a Man-In-The-Middle proxy and routing the ssl traffic of an Android emulator through the sniffer.
If you want to understand how the Meross protocol works, have a look at the Wiki. Be aware: this is still work in progress, so some pages of the wiki might still be blank/under construction.
I like reverse engineering and protocol inspection, I think it keeps your mind trained and healthy. However, if you liked or appreciated by work, why don't you buy me a beer? It would really motivate me to continue working on this repository to improve documentation, code and extend the supported meross devices.
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size meross_iot-0.1.3.0-py3-none-any.whl (10.1 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size meross_iot-0.1.3.0.tar.gz (9.0 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for meross_iot-0.1.3.0-py3-none-any.whl