Robdel12 / homebridge-meross-plug

Homebridge plugin for the meross MSS110 plug
15 stars 6 forks source link

Support for 1.x and 2.x+ MSS110 hardware versions #7

Closed dylanfrankcom closed 4 years ago

dylanfrankcom commented 5 years ago

Hey!

Let's try this again. 😀

I implemented some changes in order to support 1.x and 2.x hardware versions. This is due to the differences in JSON payloads brought up by @chippoman here and @kalleboo here.

I added messageId, timestamp, & sign to config.json so that the user does not have to directly edit the index.js file. This is because these attributes are unique to each user possibly based on the AuthToken being used to form some sort of signature reflected in these 3 attributes as detailed by @kalleboo.

I also updated the documentation to reflect the changes needed in the user's config file as well as some more detailed information regarding setting up Charles and differences in hardware versions of the MSS110 plug.

This fixes the problems I was having with both hardware versions in my house and should also close issues 1, 2, 3, and 4.

This PR includes the latest merged PR from @cfgCarl. I do not have the MSS425 surge protector that he does but it shouldn't break anything unless the MSS425 reports itself as having hardware version 1.x in the HTTP request and the user inputs this in their config.json file. I will actually update the README.md to reflect this.

I think developing a "Meross Platform" for Homebridge is the next step so that the messageId, timestamp, & sign can be removed from each individual device in config.json. I will probably attempt that later this summer and then this project can evolve to cover all other Meross devices! 🙂

MaurizioB84 commented 4 years ago

Hello, I tested it with MSS425e and works. can you please @Robdel12 approve this pull request?

origami-z commented 4 years ago

Tested with MSS550L 2 way switch with v2 hardwareVersion.

donavanbecker commented 4 years ago

I have forked this and published it to npm at homebridge-meross. if you are interested in pushing more pull request. i will continue to maintain my plugin.