To list common device information there is a command named info. It will
return the following information:
userId: currently specified User-IdfwVersion,hwVersion: firmware and hardware versionUUID: currenctly active UUIDMAC: mac addressmqttClientId: device's MQTT client idmqttUsername,mqttPassword: device's MQTT credentialscloudServer: currently specified cloud server
To interact with the HTTP API on the local device, the query too can be
utilized similar to curl.
Example:
$ mrs device query System.Appliance.All
{
# ...
}The request method can be changed with -X:
$ mrs device query -X PUSH System.Control.Unbind [--key $SHARED_KEY] [--payload '{}']There's a special command with similar functionality to the setup tool provided in Meross (Bytespider). It can be used to configure the shared key, MQTT server and the Wifi network.
Example:
# set MQTT server
$ mrs device bind --host 10.10.10.1 --mqtt-host 127.0.0.1:8883 --user-id 1234
# set Wifi network
$ mrs device bind --host 10.10.10.1 --wifi-ssid $SSID --wifi-pass $PASSTip
You can use the configuration JSON file to store the Wifi Ssid and password instead of providing them as arguments.
As simple as binding a device, removing the device from the local network
can be done wirh ease using unbind:
$ mrs device unbind --host $DEVICE_IPTo register a new meross account one can simply use the API without any extra kind of verification (as of end 2024). Thus, a simple APi request registers a functionable account:
$ mrs cloud auth signup --host 'iot.meross.com' -U 'email' -p '' --use-encryptionTip
All attributes can be placed in the configuration file so that mrs cloud signup is enough to create a new account.
The retrieved token, user-id and shared key are updated in the local configuration file if enabled.
Login is as easy as signup - using the stored credentials only the command itself must be typed.
$ mrs cloud auth login --host $SERVERTo invalidate an authentication token use the logout command:
$ mrs cloud auth logout --host $SERVERTo get an overview of devices that can be upgraded, the firmware listing tool will give you the update URL mapped to the device Uuid. The output will contain so-called common firmwares and subfirmwares.
$ mrs cloud firmware --host $SERVER --token $TOKEN
Common Firmwares
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Uuid ┃ Type-SubType ┃ Version ┃ Url ┃ MD5 ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx │ MSS210-US │ 6.2.3 │ http://static-file.meross.com/staticfile/1635133372731/7078520.bin │ 5c3640981ae2a00b569467bb1b5d0b66 │
└──────────────────────────────────┴──────────────┴─────────┴────────────────────────────────────────────────────────────────────┴──────────────────────────────────┘
I : No sub firmwares foundTo list all devices that are bound to the current cloud account, use cloud devices list.
$ mrs cloud devices list --host $SERVER --token $TOKEN
Devices
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ UUID ┃ Name ┃ Type ┃ Firmware/Hardware ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx │ Smart Plug │ MSS210-US │ 6.1.8/6.0.0 │
└──────────────────────────────────┴────────────┴───────────┴───────────────────┘Instead of using the app to bind a device to your cloud account, it is possible to use the add module to register a device without having to
use the app.
As of now, this command can only be used if a connection to the local device is stable.
$ mrs cloud devices add --device-ip $IP --host $SERVER --mqtt-domain $MQTT_SERVER --user-id $USER_ID --uuidThis command will first
- Query the device for hardware and firmware requirements
- Connect to the MQTT broker and publish a
Appliance.Control.Bindrequest - Registers the device into the cloud account by sending its Uuid
Tip
All command arguments can be specified in the configuration file.
Using the fallback mode of the RTL7820 chip, we can read all memory regions of the chip.
mrs -v chip read --timeout 0.1 0x0000 0x1000 -o data.rom.bin
Reading... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00Warning
Don't use this tool to dump the complete flash or large regions of memory. Use the more stable and professional ltchiptool:
$ ltchiptool flash read realtek-ambz2 $TARGETIn order to get a fallback console, you need to either brick the device or enter the download mode using the steps described by ltchiptool.
$ mrs chip console
$8710c>DB 0x100004F0 32
[Addr] .0 .1 .2 .3 .4 .5 .6 .7 .8 .9 .A .B .C .D .E .F
100004F0: bf 87 cc dd 2f d9 b2 24 d3 b7 97 5a b0 d1 63 21 ..../..$...Z..c!
10000500: 85 f4 51 fd 23 a5 53 81 5d f8 ef cb ff 6c 05 7b ..Q.#.S.]....l.{