Are Meross switches compatible with any existing components?

I was not able to capture packets.
My 2 cents about Meross are these two links I’ve found:
https://github.com/albertogeniola/MerossIot and https://github.com/Apollon77/ioBroker.meross.
I hope someone could implement the Meross switches in HA…:crossed_fingers:

1 Like

I have never understood what they gain with thislock to the cloud. Iam sure they would sell more if tjey had an open api.

That’s good news! The first project supports exactly the plugs I’ve bought. I will try it out over the holidays.

I’ve wrote to Meross in order to have news about API support. This is the answer:
" Thanks for your support.
Currently we only have one model MSS110 with API. We will develop API for more models, but it takes sometime, maybe a couple of weeks or even months. Sorry for the inconvenience.
Regards
Eric on behalf of meross
"

Hi all I just got one of this WiFi surge protector MSS425E.

Do you think someone is developing compatibility with Home Assistant?

So, I’ve made some progress in figuring out the challenge & auth scheme for this Note: Please see the two updates below for my progress.

I have the smart strip (mss425) for the record.

If you are able to capture a REST request in flight, you can keep using their signature scheme to send new requests and they will continue to work.

All Meross devices have a REST API that is located at

http://<IP>/config

You can only send POST requests to this path.

The payload for the request is in the form:

{
  "header": {
    "messageId": "<messageid>",
    "method": "GET",
    "namespace": "Appliance.System.All",
    "payloadVersion": 1,
    "sign": "<signature>",
    "timestamp": <unixtimestamp>
  },
  "payload": {}
}

Both the sign field and the messageid field are 32 characters long.

I’m currently working on reversing the implementation of the signing scheme.

P.S. If anyone wants to assist me in implementing this into home assistant, I could use the help :slight_smile:

Update: messageid seems to be the the MD5 of the concatenation of a 16 random set of characters in the set: “abcdefghijklmnopqrstuvwxyz0123456789” and the current unix time stamp.

Update 2: the sign field seems to be the md5(messageid+key+unixtimestamp)

Trying to figure out how to retrieve key easily. (I have managed to retrieve mine but in a very obscure way).

4 Likes

Hi, I have a smart strip (mss425) and I solved this way, via IFTTT:

   input_boolean:
      switch1:
        name: Switch1
        initial: off      
      switch2:
        name: Switch2
        initial: off
      switch3:
        name: Switch3
        initial: off   
      usb:
        name: USB
        initial: off   

automations:

- id: '1543954481217'
  alias: Switch1 ON
  trigger:
  - entity_id: input_boolean.switch1
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      event: switch1_on
    service: ifttt.trigger
- id: '1543954513639'
  alias: Switch1 OFF
  trigger:
  - entity_id: input_boolean.switch1
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      event: switch1_off
    service: ifttt.trigger
- id: '1543955359803'
  alias: Switch2 OFF
  trigger:
  - entity_id: input_boolean.switch2
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      event: switch2_off
    service: ifttt.trigger
- id: '1543955433401'
  alias: Switch2 ON
  trigger:
  - entity_id: input_boolean.switch2
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      event: switch2_on
    service: ifttt.trigger
- id: '1543955465192'
  alias: Switch3 OFF
  trigger:
  - entity_id: input_boolean.switch3
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      event: switch3_off
    service: ifttt.trigger
- id: '1543955504048'
  alias: Switch3 ON
  trigger:
  - entity_id: input_boolean.switch3
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      event: switch3_on
    service: ifttt.trigger
- id: '1543955532383'
  alias: USB OFF
  trigger:
  - entity_id: input_boolean.usb
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      event: usb_off
    service: ifttt.trigger
- id: '1543955560430'
  alias: USB ON
  trigger:
  - entity_id: input_boolean.usb
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      event: usb_on
    service: ifttt.trigger

Cattura

2 Likes

Where and how can I find device ‘ID’?

I created the automations using HASS.IO, so the id was automatically assigned to me by HASS.IO

@Miki_Mercuri that’s a rather clever way to get around this limitation!

I’m a bit swamped with work right now, but I should have some time in the next few weeks to cleanup my work so that it can be integrated with home assistant.

That way, you don’t have to go through an intermediary like IFTTT.

1 Like

Is it possible to monitor the consumption for smart plug ? (mss310 )

I don’t have your device but if you look at the post above and replace

"namespace": "Appliance.System.All",

with:

"namespace": "Appliance.Control.Consumption",

it should work.

Thanks @deus
To gather the messageid for my mss310, there is a interesting way to do it here : https://github.com/albertogeniola/MerossIot/wiki/Device-pairing
I’ll test it

Glad to help @bonilla :slight_smile:

I found some time to cludge together a rough script.

Use this to retrieve your messageid, sign and timestamp to be used for the REST request.

1 Like

It worked , thanks @deus
Do you have found a way to have a tile with consumption and status on lovelace?

I haven’t taken a look yet @bonilla . I’ll take a look in about a week :slightly_smiling_face:

I have actually taken apart a Meros MSS410F Power Strip (4 AC Outlet) thinking it would use a ESP8266 like everything else…

But this particular one actually uses a MediaTek chipset called the MT7682S.

Specs:
192MHz ARM® Cortex®-M4 with FPU

RAM
Up to 384KB SRAM, with zero-wait state and 96MHz maximum frequency
Up to 32KB L1 cache, with high hit rate, zero- wait state and 192MHz maximum frequency
Embedded 8Mbits flash, with less than 0.1μA (typical) and 80MHz maximum frequency deep power-down current

I/O
1 SDIO 2.0 master and 1 SDIO 2.0 slave
1 I2C (3.4Mbps) interface
3 UARTs (3Mbps and with hardware flow control)
1 SPI master and 1 SPI slave (both SCKs are up to 48MHz, quad mode)
2 I2S interfaces
5 PWM channels
14 GPIOs (fast IOs, 5V-tolerant)
1 channel 12-bit AUXADC


If anyone is interested, I used https://github.com/albertogeniola/MerossIot to make a custom component: https://github.com/soberstadt/homeassistant-config/blob/master/custom_components/meross.py & https://github.com/soberstadt/homeassistant-config/blob/master/custom_components/switch/meross.py
I have been running this stably for two weeks now with my 110 models, so I can vouch for it.

https://github.com/ping-localhost/meross-custom-component is also out there that was based off my work, but I have not used it, so have fun :slight_smile:

2 Likes

Can you share how I can use this and the rest api to setup this switch in HA?
I was able to login.py to get my details and I think I’ve added it correctly in HA config but any help you could give would be awesome?

Hey Craig,

The login.py is a POC script to retrieve your credentials etc.

I’ll spend a little bit of time over the next few days to integrate it into HA properly. Watch this thread for updates over the next week or two :blush: