npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-meross

v2.3.1

Published

This provides nodes for controlling Meross devices.

Downloads

81

Readme

node-red-contrib-meross

This provides nodes for locally controlling e.g. Meross Smart Plug (without cloud!). It's requiring your Merross key to be provided by you. You should get this data via network sniffer or traffic interception between your Meross app and your Smart Plug or via user info fetch tool (see below). node-red-contrib-meross delivers 2 nodes:

Meross Config

Meross Config is a config node to set the token, message id and timestamp for being able to locally communicate with your devices.

Meross Smart Plug

Meross Smart Plug can be used to set smart plugs state and/or poll its current state. For setting smart plugs state to on|off you simply provide a boolean value (true|false). To request its current state you send any non-boolean payload. If your smart plug has multiple channels, all channels are triggered by default. You might control specific channels by passing the desired channel index via msg.channel attribute (1...n, 0=all channels). You might override node's ip address (e.g. '192.168.0.10') via its msg.ip attribute.

You might query Electricity Information from your Smart Plug (if supported) with the following payload:

Meross Garage Door

Meross Garage Door can be used to set garage doors state and/or poll its current state. For setting garage doors state to open|closed you simply provide a boolean value (true|false). To request its current state you send any non-boolean payload.

Currently supported devices

Getting your Meross key

To be able to use these nodes you must provide your Meross key to your node config.

How to sniff the key

  1. You might download Fiddler.
  2. Configure it to capture HTTPS traffic.
  3. Transfer Fiddlers HTTPS certificate to your phone and trust it there.
  4. Configure your phone to use Fiddler as proxy according to your configuration.
  5. Capture traffic while logging in with Meross app into your account.

Now you should see a request in Fiddler like "https://[canvary].meross.com/v1/Auth/signin" with type "POST".

  1. Select that request and switch over to response body tab.
  2. Change format for the response body to "JSON".

This should look like:

The key is the value from „key“.

Howto fetch the key via fetch tool (requires Node.js >= v14)

  • Take a look at https://github.com/jixunmoe/meross-login :-)

Requesting additional devices

To be able to implement additional devices feel free to provide sniffed communication between your app and devices. You might also feel free to directly contribute in this project.

How to sniff required data for additional devices

  1. You might download Fiddler.
  2. Configure it to capture HTTPS traffic.
  3. Transfer Fiddlers HTTPS certificate to your phone and trust it there.
  4. Configure your phone to use Fiddler as proxy according to your configuration.
  5. Capture traffic while changing your smart plug state with Meross app.

Now you should see a request in Fiddle like "http://yourip/config" with type "POST".

  1. Select that request and switch over to "request" body tab.
  2. Change format for the request body to "JSON".

This should look like:

The token is the value from „sign“. The corresponding timestamp is the value from „timestamp“. The message id is the value from „messageid“.

Sample Flow

[{"id":"88f87bae.10d938","type":"inject","z":"ec2c2ba0.1671a8","name":"Get State","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":160,"wires":[["f7696f8c.ae16c"]]},{"id":"f7696f8c.ae16c","type":"smartplug-control","z":"ec2c2ba0.1671a8","confignode":"d9dc372f.d15f08","name":"Smart Plug","ip":"10.10.10.10","x":370,"y":120,"wires":[["759b6fbe.d2d68"]]},{"id":"5b5e94ca.a0c614","type":"inject","z":"ec2c2ba0.1671a8","name":"Turn On","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":180,"y":80,"wires":[["f7696f8c.ae16c"]]},{"id":"60c5c941.c24568","type":"inject","z":"ec2c2ba0.1671a8","name":"Turn Off","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":180,"y":120,"wires":[["f7696f8c.ae16c"]]},{"id":"759b6fbe.d2d68","type":"debug","z":"ec2c2ba0.1671a8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":120,"wires":[]},{"id":"d9dc372f.d15f08","type":"meross-config","name":"Meross Config","key":"abcdef01234567890abcdef01234567890"}]