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:
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.
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)
... 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:
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.
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
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).
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).
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.