Skip to main content

A simple library to deal with Meross MSS310 smart plug

Project description

Meross IoT library

A pure-python based library providing API for controlling Meross IoT devices over the internet. At the moment there is only support for the Meross Mss310 smart plug. Hopefully, more Meross hardware will be supported in the future.

This library is still work in progress, therefore use it with caution.

Usage

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[0].get_sys_data()

    # Turns the power-plug on
    devices[0].turn_off()

    # Turns the power-plug off
    devices[0].turn_on()

    # Reads the historical device consumption
    consumption = devices[0].get_power_consumptionX()

    # Returns the list of WIFI Network available for the plug
    # (Note. this takes some time to complete)
    wifi_list = devices[0].get_wifi_list()

    # Info about the device
    trace = devices[0].get_trace()
    debug = devices[0].get_debug()

    # Returns the capabilities of this device
    abilities = devices[0].get_abilities()

    # I still have to figure this out :S
    report = devices[0].get_report()

    # Returns the current power consumption and voltage from the plug
    # (Note: this is not really realtime, but close enough)
    electricity = devices[0].get_electricity()

    current_status = devices[0].get_electricity()
    print(current_status)

Protocol details

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.

Donate!

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.

Buy me a beer

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meross_iot-0.1.1.2.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

meross_iot-0.1.1.2-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file meross_iot-0.1.1.2.tar.gz.

File metadata

  • Download URL: meross_iot-0.1.1.2.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for meross_iot-0.1.1.2.tar.gz
Algorithm Hash digest
SHA256 5ca85cda7d85d696b4197e78a67a65882aeddab9b0f216a9dd6d43d2c481c7a8
MD5 5f93437a06b8c0528c56829084fa9f7d
BLAKE2b-256 fbe2c8e5f145d9504e6bb27ae74fe283c574b78cb5b591355a02f6d23c0b28bf

See more details on using hashes here.

File details

Details for the file meross_iot-0.1.1.2-py3-none-any.whl.

File metadata

  • Download URL: meross_iot-0.1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for meross_iot-0.1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aca47cb8a853e2bd86caeeb1ce4257eccdf2f4cd46347a3643d8d8e4054edc4a
MD5 9a81646a581c18de3498989c81fd2ffe
BLAKE2b-256 d5eaf34c332a34a0088a5c8cccd86b3fabe6a302fa6703a1ac8486f445f6a961

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page