Meross contribution

Me : Electrician using iHost by SonOff
Question : how do I read these pages ?

node-red-contrib-meross (node) - Node-RED (nodered.org)

node-red-contrib-meross 2.3.1

This provides nodes for controlling Meross devices.

npm install 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:

Cool but how does one know how to use these pallets ?

What does NPM stand for ?

NPM install ?

Meross Config (so is this one of the modes)

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

or are these the two modes ?

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:

{ "namespace": "Appliance.Control.Electricity" }

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.

I have 4 mss110r, I have a garage door opener, and 4 switches, now what ?
I have not been able to get Flic to work what so ever.

Currently supported devices

Meross Garage Door - MSG100

  • MSG200
    Meross Smart Plug - MSS110
  • MSS210
  • MSS310
  • MSS425
    Meross Smart Switch - MSS710 (via Smart plug node)

Oh and 3 outdoor plugs not listed here !

Yes , where do I find my key ?

Getting your Meross key

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

I don't know how to do any of this !

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
You might download Fiddler.
Configure it to capture HTTPS traffic.
Transfer Fiddlers HTTPS certificate to your phone and trust it there.
Configure your phone to use Fiddler as proxy according to your configuration.
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".

Select that request and switch over to response body tab.
Change format for the response body to "JSON".
This should look like:

{
"apiStatus": 0,
"sysStatus": 0,
"data": {
"token": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"key": "abcdef01234567890abcdef01234567890",
"userid": "123456",
"email": "yourmail@domain.tld",
"domain": "https://[canvary].meross.com",
"mqttDomain": "mqtt-[canvary].meross.com"
},
"info": "Success",
"timeStamp": 1632308678
}
The key is the value from „key“.

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

I know you are a new user, so please take this as friendly advice and not a telling off :wink:

Is this a rhetorical question ? If not then what answer would you expect ?

A few tips that may help you to get help -

Peoples time is limited, so it would be easier to read your posts if you keep the content concise and to the point e.g.

  1. Don't quote yourself immediately after the original text.

  2. Don't copy and paste lots of content from the page you linked to, if people are interested to read it, they will follow the link.

  3. Number your questions in one post, if you need to add something then you can edit the original post.

Seriously what is NPM ?

NPM install ?

I can't even get passed this stage , trying to learn these short forms ??

I am just trying to read how to use the pallet instructions for meros node red contribution. I open the link.

node-red-contrib-meross (node) - Node-RED (nodered.org)

... and the first thing I read is NPM , NPM install to be exact !

This provides nodes for controlling Meross devices.

npm install 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:

Cool, so how do I do it ?

It's requiring your Merross key to be provided by you.

Great, how do I ping it ?

  • I have a ip address,

  • I have a MAC address

  • I have a homekit code

  • a model number.

  • but what is a key ???

NPM stands for Node Packet Manager.

To install a contrib node, the traditional procedure is in a terminal to navigate to your .node-red folder (On linux it's generally ~/.node-red, not sure for other operating systems) and run the given command, in this case

npm install node-red-contrib-meross

An alternative is to use the Manage Palette menu option in the Node-red editor.

I think there is only one palette. Like an artist's palette it holds the tools ("nodes") which are available to use in your flows.
It looks like this particular contrib node includes an example flow. You should find it in the menu at Import, Examples.

There is a write-up at https://tech.scargill.net/meross-smart-plugs-in-2022/ which might be helpful. I found it by searching the internet for "getting your meross key", so I expect you have already seen it.

Yes this is just a rabbit hole for me , I thought download a pallet to iHost Hub and start automation .

I thought I could just ping this , I have on my iPhone network analyzer , that's not showing me anything.

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

Ok so this is the format on how users read these forums ?

  • Rhetorical question : I really did not know what NPM short form meant
  • Now that I know what the three letters stand for "NPM stands for Node Packet Manager."
  • I can only assume it means a pallet item.

So I installed one, then another.

If you google NPM it is the first result - npm is the world's largest software registry. Open source developers from every continent use npm to share and borrow packages

NPM actually stands for Node Package Manager. Probably an auto correct error :wink:

As @jbudd says the pallet items are called nodes.

It's generally a bad Idea to install multiple nodes that do the same task, as there may be conflicts.

Ah yes, I learned that with Flic. But I can’t seem to get those nodes for Flic Buttons to work either.

Installing nodes via the node-red interface (manage palette > install) uses the npm install xxx command in the background. So when installing nodes, there are 2 ways of doing it, via the interface or via the commandline.

Your iHost does not have an accessible commandline, so you can ignore this part and just use the interface.
Now, in certain cases, the nodes cannot be (fully) installed via the interface, and commands via commandline are required. This is usually the case when dealing with additional hardware (like a usb) for example - these nodes will not work on iHost.

In the case of these meross devices - the key it is referring to, is a specific key that belongs to your meross account, apperently this key is stored locally on all your devices, which in turn makes it possible to control them locally - but only if you have the key.

Getting that key is another story and cannot be done using your ihost.

But as you found out, there are 2 types of nodes, one that can handle/control your devices locally (using the device key) and one that uses your cloud account. As getting the key will become a challenge, I would recommend to uninstall that node and only use the meross-cloud node - as there you can fill in your account details and control your devices (albeit not locally).

2 Likes

Ah yes Node Package Manager.

Sometimes my phone thinks it knows better than me. Sorry about that.

Okay I think some of it is sinking in now, Watching too many youtube videos giving me ideas that are really not available.

Ah okay !
I am starting to give in !

The point of using iHost is to get away from the dependency on the cloud support, as my devices keep going offline and disconnect from HomeKit. Our internet is not reliable.

I believe I will truly never get away from HomePod controlling my HomeKit devices, as the iPad home control was reverted to a HomePod, Apparently we can no longer use an iPad as a home hub.

I would recommend to uninstall that node and only use the meross-cloud node - as there you can fill in your account details and control your devices (albeit not locally).

:thinking: - kinda what I was not going for !

Cant get this to work either !

I get the login in but it does not specify devices do I use the names I gave it or is there a specific ID I am missing ? Should I use the MAC address or the IP address ?

I am using reserved IP addresses now for all my devices in the past they use to change every time we lost power or internet.

Can someone show me how to do this ?