krahabb / meross_lan

Home Assistant integration for Meross devices
MIT License
443 stars 47 forks source link

MSH300 support #35

Closed almico closed 3 years ago

almico commented 3 years ago

This is a sort of "documentation" issue. If I missed something, please forgive me 😃 I have an MSH300 with 4 MTS100v3 that are connected to the Meross cloud and app. I just pulled the trigger and accepted your "Meross Lan" suggestion to add that newly discovered device. It then asked for an IP (that it automatically suggested, and I didn't touch it) and a "Device key". I left the "Device key" field empty. If this is the expected thing to do, I think that field should be hidden.

The question is: what can I do with the 4 MTS100v3 devices? Can I turn things on and off? Set target temperatures? Or is just for monitoring?

And how do things work? Since I didn't give your component any credential, I guess you can talk to the device, forcing it to do whatever you want. But... Will your commands force the MSH300 to access the cloud to execute your commands, or would everything work even if I disconnected the internet router?

Thank you 😃

krahabb commented 3 years ago

Hey @almico, Thank you for reporting this: it gives me the option to explain a bit.

I guess I will sometime resort this info in a proper wiki but as you said this is the option to start some documentation on how this works. Thank you

almico commented 3 years ago

Thank you so much for the detailed explanation, @krahabb ❤️ Two questions: how do I retrieve the device key for devices that are currently paired to Meross Cloud? And, is it correct if I say that your "trick" might be made unusable by a future firmware update?

krahabb commented 3 years ago

Hey @almico,

Here the 'tutorial' I've used in my initial testing and learning so I'm sure it works (at least a couple months ago!) https://github.com/albertogeniola/MerossIot/wiki/HTTP-APIs. This describes the official Meross HTTP endpoint used to login and retrieve essential information about your own account (or any account you know;) By using the login API (with your account name and password) you'll be able to recover the device key used to sign communication with your devices

And yes, any firmware update could break the trick but also break any other feature if the update is 'incompatible' with any previous API. Of course the latter is unlikely to happen while a 'fix' for the protocol signing weakness might be reasonable and logical. I don't think that would really happen anyway though since that weakness (to my knowledge) is only exploitable over HTTP and that means local network access to the device which is generally not a real threat. But this is just an opinion and maybe I'm too optimistic