homebridge-meross-plug icon indicating copy to clipboard operation
homebridge-meross-plug copied to clipboard

Add configuration options for messageId/timestamp/sign

Open kalleboo opened this issue 6 years ago • 4 comments

Trying this plugin out-of-the-box, it wouldn't work. I added some logging and the plug was returning a "sign error". By copying the messageId/timestamp/sign from a sample captured from the official app with Charles Proxy, the error disappeared.

So it looks to me like the auth token is used in the signature algorithm, and all of these need to be configured separately for each plug/user? I only have one plug so far, and just hacked the values into the code by hand for now.

kalleboo avatar Dec 25 '18 07:12 kalleboo

Where did you made the change? I am struggling with this also.

Thanks

aralam avatar Dec 26 '18 08:12 aralam

@aralam

In my ubuntu install, the source file is at /usr/local/lib/node_modules/homebridge-meross-plug/src/index.js

I put the values in the following lines

        "messageId": "c3222c7d2b9163fe2968f06c45338a9f",
        "timestamp": 1543987687,
        "sign": "9cb8004faf1ea39e94256227c9fb0b19",

I got the values by running Charles Proxy on the official app when switching my outlet off and on.

kalleboo avatar Dec 26 '18 11:12 kalleboo

Thanks for the tip ... have been tinkering with it all day .... but no luck so far ... Also, i can't seem to POST any data to the mss110 switch even using curl directly from my machine running homebridge ... wondering if firmwrae restricts access directly to the switches.

aralam avatar Dec 27 '18 07:12 aralam

I guess version 2 hardware (which I have) doesn’t support direct API access. I do have version 1 API if interested.

aralam avatar Jan 05 '19 01:01 aralam