theriom.com
This blog is mainly for me, a way of remembering things I've done; when I couldn't find an answer on Google, I wrote about it here. Hopefully, other people may find it helpful too.
Meross MSS210 with a custom MQTT Server

The aim of this article to set up a custom MQTT server for a Meross MSS210.

You’ll need something to send http requests (I’m using postman).

Set the MQTT Server with the following request:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
POST http://10.10.10.1/config

{
	"header": {
	"method": "SET",
	"namespace": "Appliance.Config.Key",
	"messageId": "{{messageId}}",
	"timestamp": {{timestamp}},
	"sign": "{{sign}}"
},
"payload":
{
	"key": {
        "gateway": {
        "host": "{{MQTT_HOST}}",
        "port": "{{MQTT_PORT}}"
	},
	"key": "",
	"userId": ""
}
}

Where {{MQTT_HOST}} and {{MQTT_PORT}} are the MQTT settings required.

The signature is created by base64 encoding the concatenation of messageId and timestamp.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
random = Math.random()*165343|0;
messageId = random.toString();
console.log(messageId);
pm.variables.set("messageId",messageId);

timestamp = Math.floor(Date.now() / 1000).toString();
console.log(timestamp);
pm.variables.set("timestamp",timestamp);

sign = CryptoJS.MD5(messageId+timestamp).toString();
pm.variables.set("sign",sign);

Next, set the Wi-Fi Settings.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
POST http://10.10.10.1/config

{
	"header": {
	"method": "SET",
	"namespace": "Appliance.Config.Wifi",
	"messageId": "{{messageId}}",
	"timestamp": {{timestamp}},
	"sign": "{{sign}}",
	"from": "http:/10.10.10.1/config",
	"payloadVersion": 1
},
"payload": {
	"wifi": {
        "ssid": "{{SSID_B64}}",
        "password": "{{PASSWORD_B64}}",
        "cipher": 3,
        "encryption": 6
	}
}

Where SSID_B64 and PASSWORD_B64 are BASE64 encoded.

You can download the postman collection here: Meross.postman_collection.json

Edit 2021-04-06 - the postman collection is now in GitHub - https://github.com/colinfitzpatrick/meross_postman


Last modified on 2021-04-06