arthurkrupa / gree-hvac-mqtt-bridge

MQTT Bridge for controlling Gree smart air conditioners, e.g. with Home Assistant or OpenHAB
GNU General Public License v3.0
134 stars 63 forks source link

Gree VRF Support #72

Open vellad1 opened 3 years ago

vellad1 commented 3 years ago

Hi,

Tried the project but did not work for me and I am assuming it's because I have a Gree VRF system with 1 compressor and 4 internal units. They are exposed by a single IP.

I wiresharked the commans and what i foudn was that after the scan request {"t": "scan"} the JSON response has an extra field that seems to report how many internal units the unit has - the pack of the JSON return below:

{

            "t": "dev",
            "cid": "",
            "bc": "",
            "brand": "",
            "catalog": "",
            "mac": "b4430dd50fd2",
            "mid": "60",
            "model": "",
            "name": "格力空调",
            "lock": 0,
            "series": "",
            "vender": "",
            "ver": "",
            "subCnt": 4  (does this mean  it has 4 internal units)? seems to imply 
        }

The Gree Mobile App will then send the bind request as per the pack below:

{ "mac": "b4430dd50fd2", "t": "bind", "uid": 0 }

and return the unique key as per the below pack:

**{
            "r": 200,
            "t": "bindOk",
            "mac": "b4430dd50fd2",
            "key": "<UNIQUE KEY>"
        }**

The app then sends the JSON request below:

{"cid":"app","i":0,"pack":"huCTfZr+tmfrmjj5cppWoTuRTSHPH07rvUULx9II4CbtaD8c5Kb1s8De+taRtAFLGRthyav6ml/pLwGix91Arw==","t":"pack","tcid":"b4430dd50fd2","uid":1677840}

and the A/C responds with a JSON request with the pack below that clearly shows the 4 internal units that form part of the VRF.

**{
            "t": "subList",
            "c": 4,
            "i": 0,
            "list": [
                {
                    "mac": "5259911b000000", 
                    "name": "格力空调",
                    "mid": "604b",
                    "model": "",
                    "lock": 0
                },
                {
                    "mac": "fa7ad91a000000",
                    "name": "格力空调",
                    "mid": "604b",
                    "model": "",
                    "lock": 0
                },
                {
                    "mac": "61fed31a000000",
                    "name": "格力空调",
                    "mid": "604b",
                    "model": "",
                    "lock": 0
                },
                { 
                    "mac": "dcecd31a000000", 
                    "name": "格力空调",
                    "mid": "604b",
                    "model": "",
                    "lock": 0
                }
            ],
            "r": 200
        }**

From them on to get set command I will need to use the relevant mac of the sub ac for the A/C to work.

By any chance; are there any plans to support VRF systems? I would be happy to help with debugging etc. I don't use Home Assistant but can test via MQTT.

Thank you.