A complete meross integration guide #63
Replies: 37 comments 151 replies
-
Hi @krahabb ! |
Beta Was this translation helpful? Give feedback.
-
That guide is amazing
any help would be more than appreciated ;-) |
Beta Was this translation helpful? Give feedback.
-
all right - my Meross sockets are now ok - PERFECT guide! thank you however there is quite a big issue and maybe you can help with that |
Beta Was this translation helpful? Give feedback.
-
Hello, Question : How can I follow this guide or adapt it when Home Assistant (core-2021.8.8) installed in Docker container in Synology Diskstation, and also, with eclipse-mosquitto:openssl image in Docker container ? |
Beta Was this translation helpful? Give feedback.
-
I share my experience. I have Hass.io (Home Assistant OS 6.2) installed on my Raspberry-pi. The MQTT broker has the MQTT broker installed by Supervisor. Some (older) Meross devices will fail to authenticate with a certificate created with the Let's Encrypt or DuckDNS add-on, so you will need to create and use a self-signed certificate using the method described here. If you feel that the "-days 360" option is too short, you can make it as long as you like. Currently, the official MQTT broker add-on is 6.0.1. If you want to use this official add-on, you need to create an HA user for each Meross device. The username is the MAC address of the Meross device. The password can be obtained with the bytespider/Meloss setup command. I have multiple Meross devices connected and I don't like to add them to HA users. So I configure it using the "logins:" option of the MQTT broker add-on, which is not available with the official MQTT broker add-on 6.0.0 and above. There are currently two options for using it.
If you have a backup using the official MQTT broker add-on than before, I think it's better to use it. If you choose 2., you can install it by adding the custom repository "https://github.com/kr0ner/mosquitto" to your supervisor's add-on store. Or you have the option of waiting for the PR to be accepted. If you are already using the official MQTT broker add-on, you will need to perform the following steps to enable the MQTT broker add-on for your custom repository.
|
Beta Was this translation helpful? Give feedback.
-
hi ca.crt – The Certificate authority certificate Can I start over again? Is there something else I can do? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Finally got this working! Thanks to everyone who had a hand in this. Wow, hurdle after hurdle and it took about 20 hours but it was all worth it. My MSG100 is now completely under my control with MQTT only. Hopefully these tips help someone else:
Good luck everyone! |
Beta Was this translation helpful? Give feedback.
-
Hi. I haven’t still tried to follow your guide @Ostepanov, but I’ve followed the @bytespider ‘s one without success: I’ve tried its “minimum unauthenticated” mosquitto configuration but once configured my plug (mss310) didn’t connect to my local MQTT. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone. Surprisingly everything still works fine with the new setup. :) |
Beta Was this translation helpful? Give feedback.
-
Hi, I am completely lost... I have been trying to connect my garage opener (MSG100) to MQTT for 2 days. Unfortunately, I will soon have no more hair ..... 😀 I followed this guide, but no success … EnvironmentHomeAssistant is installed on a Synology NAS in docker, accessible via the address MQTT is also in docker, with the eclipse-mosquitto:openssl The docker was created with the command
The MQTT server has the address This is my mosquito.config file
Certificates generationThis is what I did in terminal
Then, I put these files in the ssl folder of the mqtt docker. I started the mqtt server and here is the log
(The 2nd client 172.17.0.3 is a vacuum robot and the 3rd 192.168.1.39 client is the latter's card.) The home-assistant and zigbee2mqtt clients are well connected to the MQTT server. Garage door connectingI downloaded Then I put the device into pairing mode (Yellow/Green alternating) and connect to it's AP (Meross_MG_F72D Wifi network). I execute the command
I get
I create a new user with the same username and password in home assistant, and restart the home assistant server. Then I run the command:
I get
The device reboot. So I'm here. My Meross device is visible on my local network (ip address of the type 192.168.1.196) but not in mqtt. And so I still tried to add the device in the Meross Lan integration of home assistant, I can add it but it works only in http and not in mqtt, and the led of the device always flashes in green. I am at your disposal to solve my problem Thank you in any case |
Beta Was this translation helpful? Give feedback.
-
I noticed that despite my MSG100 being connected to Meross LAN via MQTT only, my router was being spammed with outbound requests by the device (I block the WAN Outbound at the router level). I figured this likely had to be NTP, so I went back into the Meross LAN config and took off the "Device Time Zone" I had set so that it's now left blank. After doing so, the device is no longer spamming packets trying to reach outside of my network and is restricted only LAN the way I want. So if you want to use your Local NTP such as Chrony, it seems that "Device Time Zone" area should be left blank. |
Beta Was this translation helpful? Give feedback.
-
ERROR: Can't setup Home Assistant service mqtt is killing me [s6-init] making user provided files available at /var/run/s6/etc...exited 0. |
Beta Was this translation helpful? Give feedback.
-
@ggggh I haven't purchased a test only HomeKit device yet so I haven't been able to do any testing. Basically, I've resorted to setting up my 3 HomeKit devices with both MerossLAN and HomeKit in Home Assistant. I end up having to choose which version of the device in HA I'm going to build an automation on, which I've chosen HomeKit for now. To be clear you can pair HomeKit devices with HA without Apple. I have no Apple devices to configure HomeKit so I'm just relying on the local HomeKit support in HA. |
Beta Was this translation helpful? Give feedback.
-
At the end of the guide, way back at the beginning of this thread, @krahabb states:
I have been messing with this for a couple days now and cannot figure out how to do both of those, specifically set a static IP in the Meross device (MSS110). I can get everything else to work. Thank you. |
Beta Was this translation helpful? Give feedback.
-
Hello, I just managed to connect to my mosquitto broker my three MSS310, they work perfectly, but they are still blinking "green". I think it's some sort of setup that couldn't be"finished" on the plug side ? Thanks alot . |
Beta Was this translation helpful? Give feedback.
-
I believe it can also happen if the broker doesn't send a response message when first paired bytespider/Meross#57 (comment) |
Beta Was this translation helpful? Give feedback.
-
@Write, You should be able to see the To be honest, there's another part of the transaction which is not managed at all and it is about the |
Beta Was this translation helpful? Give feedback.
-
Whist looking for LAN only Meross integration I stumbled on this solution. However, running MQTT 5.1.1 without getting massive problems with other MQTT integrations is something that worries me. Just wondering if 2 years later one is still expected to install this very old version? Don't want to sound like a total bitch, but shouldn't this integration be made 6.2 compatible by now? |
Beta Was this translation helpful? Give feedback.
-
excuse my question if this has been previously asked.... (was hoping to find the answer in the original post). I've been pulling my hair out with which path to take. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
had a slight change of plans... ended up returning the meross devices for now. |
Beta Was this translation helpful? Give feedback.
-
I found this repo while searching for a how I would get power usage monitoring in HA for my just purchased MSS315 plugs. My HA is running in a Raspberry PI and I only have Mac computers. |
Beta Was this translation helpful? Give feedback.
-
Hi all, I'm having an issue with local MQTT brokers on Meross LAN v4.4.1. Up until I set the mqtt address, everything works as expected (both over meross' mqtt and over HTTP), but when I switch it to use a local mqtt broker, the device reboots, HA picks it up and starts talking over MQTT, but then after 10-15 seconds the device resets itself (flashing green and amber). I am using the non-HomeKit Smart Plug Mini. (MSS305, MSS305KITUK v8.0) Interestingly this device does not broadcast an AP and instead uses Bluetooth and the Meross app for setting up the wifi network. I am using the following command to set the MQTT broker:
If I don't use the WiFi-X parameter the debug logs show the password encoded in base64 but with an extra '%' on the end of the password after decoding, so the device does not connect to the network upon a reboot. I also tried updating to firmware 8.3.10 (the latest at the time of writing), but this did not help. Many thanks and thank you for this project, |
Beta Was this translation helpful? Give feedback.
-
Am I the only one whose mss310 units dont open a wifi hotspot at all? I had to connect them to my home network through the meross app to be able to communicate with them. I then ran the setup without wifi config and its working now. |
Beta Was this translation helpful? Give feedback.
-
I'm late here in the battle.
There is no way to even pass the CA to the Meross device so what is the point, did I miss something ? |
Beta Was this translation helpful? Give feedback.
-
How to configure MQTT and enroll Meross devices in your Home Assistant
Preamble
The main idea of this guide is gather and simplify all steps to enroll meross devices, because all existent manuals don't give all information about it, and simply doesn't work because of bugs in MQTT 6. That's why I'll explain all installation process and show how to do it. From 0 to hero.
Steps in configuration process:
What do you need before start
Installing and configuring Ubuntu on laptop with WiFi
https://ubuntu.com/wsl
the last ones we need to make work meross scripts correctly
Create SSL Certificates using previously installed Ubuntu
First, create a key for the CA
openssl genrsa -des3 -out ca.key 2048
Create a certificate for the CA using the CA key that we created
openssl req -new -x509 -days 1826 -key ca.key -out ca.crt
Now we create a server key pair that will be used by the broker
common name is important and should be IP address of HA.
Create a client private key.
openssl genrsa -out client.key 2048
Create a certificate request and use the client private key to sign it.
Use the same common name which you used when creating a server key pair
openssl req -new -out client.csr -key client.key
Create a client certificate
openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out client.crt -days 360
Now you can open windows explorer accesing to your Ubuntu virtual disk writing:
\\wsl$\your_installed_Ubuntu\home\your_username
Copy these certificates to a folder in your desktop:
Preparing Home Assistant and installing MQTT 5 broker
Before you copy anything to your HA - remove the existing add-on and restart HA (hard reboot (Reboot Host) from Supervisor/System)!
Fetch an older version of the component
Direct link:
https://github.com/home-assistant/addons/archive/14cbbc63fcc33ae698c00c136421729694b964a3.zip
You should end up with a zip archive with the repo name and commit.
Extract the folder and fetch only the files you need - mosquitto folder in addons for MQTT Broker.
Install Samba Share addon and create username and password for it
Now you can copy previosly downloaded mosquitto folder to your HA using file explorer:
\ip of your HA\addons
After that, its necesary to open config.json in folder and change name parameter to Mosquitto broker 5
IMPORTANT! You need to copy your SSL certificates created earlier, in a folder:
\ip of your HA\share\SSL
Now you need to create a folder mosquitto in \ip of your HA\share
It should be like that: \ip of your HA\share\mosquitto
Inside of it, create two files:
accesscontrollist (no extention) and mosquitto acl.conf
After that, open both of them with text editor like notepad or notepad++ and put
In accesscontrollist:
In mosquitto acl.conf:
acl_file /share/mosquitto/accesscontrollist
Installing MQTT 5 in HA
After copying all necessary files, you should reboot your HA.
After reboot, in supervisor/addons-store will appear Mosquitto broker 5 as local add-on.
Now you can install it, and use this configuration:
Now you have a full functional MQTT broker. Don't forget to disable auto updates.
Enrolling Meross devices
At this point, we should have mqtt5 already installed and working with ssl certificates.
For this step, we need to use our Ubuntu, as we did for generate SSL certs.
https://github.com/bytespider/Meross
Direct link:
https://github.com/bytespider/Meross/archive/refs/heads/master.zip
sudo ./meross-info
You will see all info about your device. save it to any txt file. Just in case.
IMPORTANT! create user with same username and password (which you get from device using ./meross-info) in your HA and reboot HA
If necessary, you can disconnect from device's WiFi and connect to it on next step
sudo ./meross-setup --gateway 10.10.10.1 --wifi-ssid your ssid name --wifi-pass your wifi pass --mqtt mqtt://yourhaip:8883
Now your device should connect to your WiFi and mqtt broker.
UPDATE:
After seeing that device is connected to mqtt broker you need to:
Now you are done
Special thanks to:
@bytespider, @dyordan1, @krahabb
You've made the best tools and helped a lot to all home assistant community, making our lives easier
Links:
bytespider/Meross#28
http://www.steves-internet-guide.com/creating-and-using-client-certificates-with-mqtt-and-mosquitto/
Beta Was this translation helpful? Give feedback.
All reactions