This provides nodes for controlling Meross devices.
npm install node-red-contrib-merossYou might query Electricity Information from your Smart Plug (if supported) with the following payload:
{
"namespace": "Appliance.Control.Electricity"
}
| Meross Garage Door | - MSG100 - MSG200 |
| Meross Smart Plug | - MSS110 - MSS210 - MSS310 - MSS425 |
| Meross Smart Switch | - MSS710 (via Smart plug node) |
Now you should see a request in Fiddler like "https://[canvary].meross.com/v1/Auth/signin" with type "POST".
6. Select that request and switch over to response body tab.
7. 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“.
Now you should see a request in Fiddle like "http://yourip/config" with type "POST".
6. Select that request and switch over to "request" body tab.
7. Change format for the request body to "JSON".
This should look like:
{
"payload": {},
"header": {
"messageId": "1234567890abcdef1234567890abcdef",
"method": "GET",
"from": "http://yourip/config",
"sign": "567890abcdef1234567890abcdef12345678",
"namespace": "Appliance.System.Ability",
"triggerSrc": "iOSLocal",
"timestamp": 1609232320,
"payloadVersion": 1
}
}
The token is the value from „sign“. The corresponding timestamp is the value from „timestamp“. The message id is the value from „messageid“.
[{"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"}]