mac-zhou / midea-msmart

This is a library to allow communicating to a Midea AC via the Local area network.
MIT License
147 stars 39 forks source link

Add support for serialbridge communications #84

Open bfranske opened 2 years ago

bfranske commented 2 years ago

I would very much like to see support for direct serial communications to the Midea AC through a serial bridge which does not require any connection to the Internet from the AC ever, @reneklootwijk supports this in their NodeJS library: https://github.com/reneklootwijk/node-mideahvac and with this method no id/key/token is required. You only need to replace or re-flash the wifi dongle to be a serial bridge device instead and communicate directly with the AC unit with a slightly modified packet.

See the difference between https://github.com/reneklootwijk/node-mideahvac/blob/master/lib/serialbridge.js and https://github.com/reneklootwijk/node-mideahvac/blob/master/lib/sk103.js

It looks like you essentially can take the received data with no decoding or deciphering and when sending can skip the 0x5A5A header, MD5, key, and encoding when sending.