Git Product home page Git Product logo

homebridge-meross-plug's Introduction

Homebridge Meross MSS110 Plug

This is a probably fragile homebridge implementation of the Meross MSS110 mini-plug.

This is a pet project. I can't promise it'll work for you. If it does, that's awesome! It may also break. I am using this in "production" at my house, so any fixes I make for my setup will be published.

PRs welcome!

Setup

Assuming you have a working homebridge setup, this is how you add the meross plugin:

  • npm i -g homebridge-meross-plug (You may need sudo depending on your homebridge setup)
  • Edit your config.json to include the plug name, channel, & deviceUrl.

If you're setting this plug up fresh, make sure you go through the typical meross app for initial setup. You will need to know what the plugs IP address is on your network & the channel that plug is running on.

{
  "accessories": [
    {
      "accessory": "Meross",
      "name": "Bedroom lamp",
      "channel": 0,
      "deviceUrl": "http://192.168.11.11"
    },
    {
      "accessory": "Meross",
      "name": "Entertainment center lights",
      "channel": 0,
      "deviceUrl": "http://192.168.11.12"
    }
  ]
}

homebridge-meross-plug's People

Contributors

cfgcarl avatar robdel12 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-meross-plug's Issues

How to sniff out your token?

Could you detail just how you used Charles proxy to sniff out your auth token? I'm not familiar with how to use it.

I've attempted to use https://github.com/albertogeniola/MerossIot to figure it out at well, but I keep coming up short. I can get the API to control the plug, but when I try to 'guess' my auth token to plug into homebridge it doesn't work.

UPDATE: I sniffed it out with this method https://dennisdel.com/blog/intercepting-iphone-traffic-on-a-mac-a-how-to-guide/, but I still cannot get it to respond.

Question on API calls to Meross plug

Hi,
I am trying to understand how to control the Meross plug from local network instead of making API calls to cloud server. Looking at your code, I quickly tried sending a REST API (POST http://deviceIP/config using postman and I am getting 404 not found. Do you have packet captures between home bridge and meross plugs that you can share with me?

Thanks in advance.

functionality for the Meross MSG 100 garage door opener.

Hi,

can you please include the functionality for the MSG 100 garage door opener. That would be really great.
The Homebridge plugin can be installed and he also displays the device as a "switch" in the home app. In the home app, it can also be "switch" (icon lights up and darkens) but the switch, or the relay in the switch does not respond/ click.

many thanks Vati

MS320 not listed

When configuring the config file for my Meross MSL-320 light strip it wasn't listed but the MSL-120 was listed so I selected that and am able to turn it on/off, change the color, brightness. I receive the following in the homebridge logs and it shuts off.

[12/31/2020, 4:34:22 PM] [Bunk Light] Failed to POST to the Meross Device MSL-120 at 192.168.x.x: { Error: socket hang up
at createHangUpError (_http_client.js:330:17)
at Socket.socketOnEnd (_http_client.js:431:23)
at Socket.emit (events.js:198:15)
at endReadableNT (_stream_readable.js:1139:12)

Does this have something to do about the config file or the fact that I chose a product other than the one that I'm using.

Regards,

Forrest

Add configuration options for messageId/timestamp/sign

Trying this plugin out-of-the-box, it wouldn't work. I added some logging and the plug was returning a "sign error". By copying the messageId/timestamp/sign from a sample captured from the official app with Charles Proxy, the error disappeared.

So it looks to me like the auth token is used in the signature algorithm, and all of these need to be configured separately for each plug/user? I only have one plug so far, and just hacked the values into the code by hand for now.

Some MSS110s don't understand "ToggleX"

When trying this plugin, the device would respond with a 200 with an empty body, but the switch wouldn't toggle.

Looking at a capture from the official app, it uses a toggle payload and a Appliance.Control.Toggle namespace. Changing the code to use these made the plug work for me.

Not sure if this is a firmware difference. My plug is running the latest firmware as of writing, 1.1.26

(btw thanks for this plugin. there's a dearth of HomeKit-compatible gear in my country so unofficial support like this is a lifesaver)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.