Updating MEROSS garage door opener to work locally only skipping cloud using my own HOME ASSISTANT MQTT broker

So after failing to use a simple Shelly 1 (v3) for my garage door automation I finally opted for a Meross smart device that is designed to do just that. At 30 EUR it was double the price of a Shelly but if it works I won’t complain.

Note that you can skip this installation if you don’t mind having the smart device connected to the internet and using the Meross provided cloud services instead. For that you should only register in the app and add the device there. Then in HA you can install the meross integration from HACS and after providing your credentials there you should already see the added device.

Update Meross smart device config

First thing to do is to disable the cloud integration and instead make it talk to my own MQTT broker on my local network setup. Luckily for me this is something already resolved by others. So all I have to do is use their tools and reproduce their steps.

Since there is no more Meross/bin/src folder in that project I had to adapt the initial steps to execute that tool. It does talk about node and npm (node package manager) so instead of checking out the git repo I just used npm to retrieve the meross package directly.

# the easy way using npm

npm install meross

# then execute with

npx meross info

If that also fails for you I found this French writeup showing the use of these alternative files in bin directory. You’ll still need to install a dependency using npm.

# running directly from Meross/bin folder I got an error 
# Error: Cannot find module 'commander'
# so install that dependency first

npm install commander

# no more src directory, scripts in latest version are in bin

git clone https://github.com/bytespider/Meross
cd Meross/bin/

# execute like this to get meross device info if you work from bin directory in repo


Next reset your meross device if needed and connect your computer to the WiFi Access Point it starts when you power it back on. At this point you’re ready to execute the meross tool to update the config of this smart device. This updates the wifi it will connect to and the MQTT broker server it will push to.

npx meross setup --gateway --wifi-ssid <your-ssid> --wifi-pass <your-pass> --mqtt <mqtt-host-ip>:8883

And that’s about it for what’s needed on the device. Below is a picture of what it looks like installed on my garage doors. The signal and ground wire location depend on pinout of your garage, you can use reverse image search to find branding and type of yours if it’s not label (like mine was).

Update Home Assistant MQTT config

Next you can open your Home Assistant and go to the MQTT broker integration where you can hit the configure option to display received messages. If everything worked in the previous steps you’ll see MQTT messages coming in. You can also find that deviceId from the command line tools.

/appliance/1712281825467829030134298f151c4a/publish {"header":{"messageId":"7c2834f83f9cc5b1c7ae1049280a9f3f","namespace":"Appliance.Control.ToggleX","method":"PUSH","payloadVersion":1,"from":"/appliance/1712281825467829030134298f151c4a/publish","timestamp":1557534775,"timestampMs":955,"sign":"f07e2a7ab622997508d359cb89c74038"},"payload":{"togglex":{"channel":1,"onoff":1,"lmTime":1557534775}}}

That information can be used to add sensors to your MQTT configuration, something that can be done in the config/configuration.yaml file and should look something like the YAML below. Remember to change the UID and refresh these MQTT entities part from your HA development tools.

UID: mqtt:topic:f1927b217c:73636c37a8
label: MQTT Meross
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:f1927b217c
  - id: office_socket
    channelTypeUID: mqtt:switch
    label: office
    description: ""
      commandTopic: /appliance/<appliance_ID>/subscribe
      transformationPatternOut: JS:setMerossAll.js
      stateTopic: /appliance/<appliance_ID>/publish
      transformationPattern: JSONPATH:$.payload.togglex..[?(@.channel == 0)].onoff
      off: "0"
      on: "1"

Hardware installation

For my marantec comfort 220 garage door opener I don’t need the sensor installation. Instead I just looked up the pinout to find out I can just wire ground (pin2) to impuls (pin3) and everything (except for the port opened/closed indication) will work.

Leave a Reply

Your email address will not be published. Required fields are marked *

Please reload

Please Wait