Skip to content

meross4j is a Java library providing API for controlling Meross IoT devices over the internet

Notifications You must be signed in to change notification settings

fabgio/meross4j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

meross4j

meross4j is a Java library providing API for controlling Meross IoT devices over the internet.

To utilize the library you should first create an account via The Meross android app. Moreover, the devices should be in an online status.

Supported capabilities:

  • Togglex Power bulb/plug capability

TODO

  • add Consumptionx capability

Dependency Management

Maven

This library is available via Maven Central repository by adding the dependency in your POM.xml:

    <dependency>
      <groupId>org.meross4j</groupId>
      <artifactId>meross4j</artifactId>
      <version>0.2.6</version>
    </dependency>

Usage example

// Creates  HttpConnection with EU URL = https://iotx-eu.meross.com"; email = myemail@email.com  and password = mypassword
MerossHttpConnector merossHttpConnector = new MerossHttpConnector("https://iotx-eu.meross.com", "myemail@email.com" , "mypassword");
var manager = MerossManager.createMerossManager(merossHttpConnector);
// Turns smart plug named "Desk" ON
var response = manager.executeCommand("Desk",
        MerossEnum.Namespace.CONTROL_TOGGLEX.name(),"ON");

// Turns smart plug named "Desk" OFF
var response =  manager.executeCommand("Desk",
        MerossEnum.Namespace.CONTROL_TOGGLEX.name(),"OFF");

// Get info about  "Desk" e.g. current ON/OFF state ...  
var response =  manager.executeCommand("Desk",
        MerossEnum.Namespace.CONTROL_TOGGLEX.name());

Currently supported devices

Tested devices so far:

  • MSS210 (Smart plug)

Anyway the library may support the togglex capability, i.e. ON/OFF for the majority of plugs/bulbs

Building from Source

With Maven:

mvn clean install

Contributions

Pull requests are really welcomed

Disclaimer

This library is not associated by any means with Meross or other subsidiaries

About

meross4j is a Java library providing API for controlling Meross IoT devices over the internet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages