I recently got the Meross MSG100 garage door opener working with HS4 and Node-RED- full Local control, no cloud.
This also works for Meross plugs
I created a fork of https://flows.nodered.org/node/node-red-contrib-meross . The owner dehsgr has now merged my changes in so they will be part of the node red flow library soon (https://github.com/dehsgr/node-red-c...-meross/pull/4). If not you can manually update files from github
There are a few different projects related to node-red and Meross. Great work from all of them
Meross can be connected to HS4 in 5 different ways
1) If the Meross device supports it, you can use TUYA/Tasmota plugin
2) using smartthings and link to hs4. Does not require a smartthings hub. I did this for a bit. I also unplugged my smartthings hub and unlinked it from account
3) Using full MQTT.
4) Simulating the app MQTT api calls made by the Meross app and sending/receiving them via Meross cloud
5) Simulating the app MQTT api calls locally (only needs internet for initial setup)
The instructions will focus on #5 Simulating the app MQTT api calls locally
I wanted to still be able to use a pin number when asking google to open the garage door. This allows the Meross app to continue to work, and Meross<->google link, but also local control through HS4 Node-RED
Instructions
1) install hs4 node red
2) install https://flows.nodered.org/node/node-red-contrib-meross
3) use the meross-iot project to inspect the api calls made from Android/iOS
4) using meross_sniffer you will need to determine the following values sent from the app.
5) create a Meross node (plug or garage) in node-red and add the configurations from step 4(8)
6) inject the Meross node with msg.payload =
- true for ON or Open
- false for OFF or Close
- non-boolean payload returns state
7) test it out
8) change your Meross password back

This also works for Meross plugs
I created a fork of https://flows.nodered.org/node/node-red-contrib-meross . The owner dehsgr has now merged my changes in so they will be part of the node red flow library soon (https://github.com/dehsgr/node-red-c...-meross/pull/4). If not you can manually update files from github
There are a few different projects related to node-red and Meross. Great work from all of them
Meross can be connected to HS4 in 5 different ways
1) If the Meross device supports it, you can use TUYA/Tasmota plugin
**Garage door doesn't support this
2) using smartthings and link to hs4. Does not require a smartthings hub. I did this for a bit. I also unplugged my smartthings hub and unlinked it from account
3) Using full MQTT.
This requires faking the Meross MQTT server with your own (examples use Mosquito)
Instructions to do it this way can be found here https://github.com/shodge12/Meross-Node-Red-Comm
4) Simulating the app MQTT api calls made by the Meross app and sending/receiving them via Meross cloud
Instructions to do it this way can be found here https://www.npmjs.com/package/meross-cloud
5) Simulating the app MQTT api calls locally (only needs internet for initial setup)
The instructions will focus on #5 Simulating the app MQTT api calls locally
I wanted to still be able to use a pin number when asking google to open the garage door. This allows the Meross app to continue to work, and Meross<->google link, but also local control through HS4 Node-RED
Instructions
1) install hs4 node red
2) install https://flows.nodered.org/node/node-red-contrib-meross
**Note if garage door change aren't there yet, copy manually from github
You want version >= 1.1.0
https://www.npmjs.com/package/node-red-contrib-meross
https://github.com/dehsgr/node-red-contrib-meross
You want version >= 1.1.0
https://www.npmjs.com/package/node-red-contrib-meross
https://github.com/dehsgr/node-red-contrib-meross
3) use the meross-iot project to inspect the api calls made from Android/iOS
https://albertogeniola.github.io/Mer...tallation.html
(install steps in step 4)
(install steps in step 4)
4) using meross_sniffer you will need to determine the following values sent from the app.
Steps
- change your Meross password to something temporary
- install python3 (if you don't have it already)
- install pip run: sudo apt install python3-pip
- install meross-iot run: pip install meross-iot --upgrade OR run: pip install meross_iot==0.4.1.1rc1
- go to the path mentioned in the message "WARNING: The scripts meross_api_cli and meross_sniffer are installed in 'XXXXXXXX' which is not on PATH.
- run: python3 meross_sniffer
- login with meross_sniffer using your temporary Meross credentials
- Open the Meross app on Android/iOS
- Press some buttons in the app. ON or OFF, open or close
- In meross_sniffer you with see the JSON payloads
- Grab the following values from the JSON payloads
- messageId
- token (sign)
- timestamp
- token (sign)
- timestamp
5) create a Meross node (plug or garage) in node-red and add the configurations from step 4(8)
6) inject the Meross node with msg.payload =
- true for ON or Open
- false for OFF or Close
- non-boolean payload returns state
7) test it out
8) change your Meross password back
Code:
[{"id":"2217c56c.71908a","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"906541a5.1ef6","type":"inject","z":"2217c56c.71908a","name":"Close","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":430,"y":60,"wires":[["65270999.550b88"]]},{"id":"cda4f8ff.dea558","type":"debug","z":"2217c56c.71908a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":910,"y":160,"wires":[]},{"id":"440fe234.58db8c","type":"inject","z":"2217c56c.71908a","name":"Open","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":410,"y":280,"wires":[["bf06a588.a50178"]]},{"id":"f63a30ff.2ca3b","type":"inject","z":"2217c56c.71908a","name":"Get State","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"'state'","payloadType":"str","x":640,"y":60,"wires":[["90d52c46.307a2"]]},{"id":"90d52c46.307a2","type":"smartgarage-control","z":"2217c56c.71908a","confignode":"27eb8008.a260e","name":"Meross Garage Door","ip":"192.168.1.XXX","x":700,"y":160,"wires":[["cda4f8ff.dea558"]]},{"id":"2d28b913.419606","type":"hs-device","z":"2217c56c.71908a","name":"HS4 Virtual Device","device":0,"server":"","feature":0,"reportonstartup":false,"x":130,"y":80,"wires":[["8629368a.0e3738"]]},{"id":"8629368a.0e3738","type":"switch","z":"2217c56c.71908a","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"100","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":210,"y":160,"wires":[["65270999.550b88"],["bf06a588.a50178"]]},{"id":"65270999.550b88","type":"change","z":"2217c56c.71908a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":140,"wires":[["90d52c46.307a2"]]},{"id":"bf06a588.a50178","type":"change","z":"2217c56c.71908a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":200,"wires":[["90d52c46.307a2"]]},{"id":"27eb8008.a260e","type":"meross-config","name":"Meross","timestamp":"","token":"","messageid":""}]
Comment