homebridge-mi-aqara icon indicating copy to clipboard operation
homebridge-mi-aqara copied to clipboard

[MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":"","short_id":0,"data":"{\"rgb\":0,\"illumination\":352,\"proto_version\":\"1.1.2\"}"}

Open radek01 opened this issue 5 years ago • 10 comments

Hello

I added new xiaomi gateway v2 to homebridge configuration:

"platform": "MiAqaraPlatform", "manage": { "port": xxx, "password": "xxx" }, "gateways": { "xxx": { "password": "xxx", "ip": "10.20.30.6" } }, "defaultValue": { "158d000xxx": { "ContactSensor2_ContactSensor": { "name": "Entrance" } Homebridge started ok i can see other accessories but not the one connected to the Xiaomi Gateway. I got the following WARN:

[MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":"xxx","short_id":0,"data":"{"rgb":0,"illumination":352,"proto_version":"1.1.2"}"}

I installed homebridge-mi-aqara 0.8.0

radek01 avatar Dec 21 '18 02:12 radek01

Similarly. One of my ACpartner fail to join, but two of other ACpartner had successfully bridged to Homebridge. Have you got any solution?

log: [WARN][Revc]{"cmd":"read_rsp","model":"acpartner.v3","sid":"xxx","params":[{"on_off_cfg":"off"},{"mode_cfg":"cool"},{"ws_cfg":"middle"},{"swing_cfg":"unswing"},{"temp_cfg":25},{"ac_power":1},{"proto_version":"2.0.2"},{"fw_ver":"1.4.1_115.0149"},{"relay_status":"on"}]}

linjiejim avatar Dec 22 '18 11:12 linjiejim

I have the same issue, the gateway firmware version is up to date 1.4.1_141.0143 [2019-1-1 16:40:19] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":""mac addr of actual gateway"","short_id":0,"data":"{"rgb":0,"illumination":1292,"proto_version":"1.1.2"}"} [2019-1-1 16:40:49] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":""mac addr of actual gateway"","short_id":0,"data":"{"rgb":0,"illumination":1292,"proto_version":"1.1.2"}"} [2019-1-1 16:41:19] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":""mac addr of actual gateway"","short_id":0,"data":"{"rgb":0,"illumination":1292,"proto_version":"1.1.2"}"} [2019-1-1 16:41:49] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":""mac addr of actual gateway"","short_id":0,"data":"{"rgb":0,"illumination":1292,"proto_version":"1.1.2"}"} [2019-1-1 16:42:19] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":""mac addr of actual gateway"","short_id":0,"data":"{"rgb":0,"illumination":1261,"proto_version":"1.1.2"}"} [2019-1-1 16:42:49] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":""mac addr of actual gateway"","short_id":0,"data":"{"rgb":0,"illumination":1256,"proto_version":"1.1.2"}"} [2019-1-1 16:43:19] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":""mac addr of actual gateway"","short_id":0,"data":"{"rgb":0,"illumination":1252,"proto_version":"1.1.2"}"} [2019-1-1 16:43:49] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":""mac addr of actual gateway"","short_id":0,"data":"{"rgb":0,"illumination":1243,"proto_version":"1.1.2"}"} [2019-1-1 16:44:19] [MiAqaraPlatform] [ERROR]Error: timeout: {"cmd":"read", "sid":""mac addr of actual gateway""}

sky2133 avatar Jan 01 '19 09:01 sky2133

Same

andreyoshev avatar Jan 07 '19 02:01 andreyoshev

Hello,

I also have the same problem. My first gateway works great. With the 2nd gateway I do not get a device in Homekit displayed. Also, the gateway light is not displayed. I get the error message in the log:

[2019-1-20 20:54:47] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":"4cf8c8fa58b","short_id":0,"data":"{"rgb":67108863,"illumination":305,"proto_version":"1.1.2"}"} [2019-1-20 20:55:17] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":"4cf8c8fa58b","short_id":0,"data":"{"rgb":67108863,"illumination":310,"proto_version":"1.1.2"}"} [2019-1-20 20:55:47] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":"4cf8c8fa58b","short_id":0,"data":"{"rgb":67108863,"illumination":311,"proto_version":"1.1.2"}"} [2019-1-20 20:56:17] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":"4cf8c8fa58b","short_id":0,"data":"{"rgb":67108863,"illumination":305,"proto_version":"1.1.2"}"} [2019-1-20 20:56:47] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":"4cf8c8fa58b","short_id":0,"data":"{"rgb":67108863,"illumination":308,"proto_version":"1.1.2"}"} [2019-1-20 20:57:17] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":"4cf8c8fa58b","short_id":0,"data":"{"rgb":67108863,"illumination":311,"proto_version":"1.1.2"}"} [2019-1-20 20:57:47] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":"4cf8c8fa58b","short_id":0,"data":"{"rgb":67108863,"illumination":311,"proto_version":"1.1.2"}"} [2019-1-20 20:58:17] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":"4cf8c8fa58b","short_id":0,"data":"{"rgb":67108863,"illumination":311,"proto_version":"1.1.2"}"} [2019-1-20 20:58:47] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":"4cf8c8fa58b","short_id":0,"data":"{"rgb":67108863,"illumination":310,"proto_version":"1.1.2"}"} [2019-1-20 20:59:17] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":"4cf8c8fa58b","short_id":0,"data":"{"rgb":67108863,"illumination":311,"proto_version":"1.1.2"}"} [2019-1-20 20:59:47] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":"4cf8c8fa58b","short_id":0,"data":"{"rgb":67108863,"illumination":311,"proto_version":"1.1.2"}"}

I have a idea, is this a new version of v3-gateway?

marcoschmidt79 avatar Jan 20 '19 20:01 marcoschmidt79

The structure of the information in the app is also different.

old gateway, he work work

new gateway, dont work dont_work

marcoschmidt79 avatar Jan 20 '19 20:01 marcoschmidt79

i have open the port 9898 with psm-set and uart. the plugin dont work. :-(

Jan 22 22:23:08 homebridge homebridge[11763]: [2019-1-22 22:23:08] [MiAqaraPlatform] [WARN][Revc]{"cmd":"read_ack","model":"gateway","sid":"4cf8c8fa58b","short_id":0,"data":"{"rgb":0,"illumination":417,"proto_version":"1.1.2"}"} Jan 22 22:23:38 homebridge homebridge[11763]: [2019-1-22 22:23:38] [MiAqaraPlatform] [ERROR]Error: timeout: {"cmd":"read", "sid":"04cf8c8fa58b"}

marcoschmidt79 avatar Jan 22 '19 21:01 marcoschmidt79

Same

[WARN][Revc]{"cmd":"read_rsp","model":"acpartner.v3","sid":"XXXXXX","params":[{"ac_state":XXXX},{"ac_power":2},{"proto_version":"2.0.1"},{"fw_ver":"1.4.1_155.0149"}]}

johnnyxuxu avatar Mar 15 '19 08:03 johnnyxuxu

Hi, I had the same problem with the second gateway, and I have solved it. The point is the MAC Address, in the new GW it starts by 0, 04:CF:8C,... and I don't know why, the GW sends the messages sometimes with "sid=04cf8c.." and others with "sid=4cf8c...". To solve this, I have done the following:

a) at config.json file, the sid goes WITHOUT 0, "4cf8c,...": "<PASSWORD>" b) I have patched the index.js file of the library, adding two new lines in the parseMessage function. The issue affects during discovery and hearbeat. The two changes are:

else if (cmd === 'get_id_list_ack' || cmd === 'discovery_rsp') { that.log.debug("[Revc]" + msg); var gatewaySid = jsonObj['sid'];

    // JAVIER TEMP PATCH
    if (gatewaySid.substring(0,1) == 0) gatewaySid = gatewaySid.substring(1);
    // ------------

and the other is:

} else if (cmd === 'heartbeat') { // that.log.debug("[Revc]" + msg); var model = jsonObj['model']; var sid = jsonObj['sid'];

    // JAVIER TEMP PATCH
    if (sid.substring(0,1) == 0) sid = sid.substring(1);
    // -----------------

    if (that.ParseUtil.isGatewayModel(model)) {

just add this lines in /usr/lib/node_modules/homebridge-mi-aqara/index.js

And then wait to the next release of YinHangCode...

fjaraujo avatar Jul 13 '19 14:07 fjaraujo

@fjaraujo, Thank you!

just add this lines in /usr/lib/node_modules/homebridge-mi-aqara/index.js And then wait to the next release of YinHangCode...

It worked! @YinHangCode

romanenko avatar Jan 02 '20 21:01 romanenko

just add this lines in /usr/lib/node_modules/homebridge-mi-aqara/index.js And then wait to the next release of YinHangCode...

Hi I did your trick but nothing happens :(. The MAC address of my gateway v2 is starting by "04:CF:8C" In my config.json I have added the following :

{
	  "platform": "MiAqaraPlatform",
	  "manage": {
            "port": 12345,
            "password": "XXXX"
        },
	  "gateways": {
          "4cf8cXXXXX": "1234567890123456"
      }
}

I have edited the index.js as you said :

else if (cmd === 'get_id_list_ack' || cmd === 'discovery_rsp') {
        that.log.debug("[Revc]" + msg);
        var gatewaySid = jsonObj['sid'];
        
		// TEMP PATCH
		if (gatewaySid.substring(0,1) == 0) gatewaySid = gatewaySid.substring(1);
		// ------------
		
        // update gateway token
        var gateway = that.GatewayUtil.getBySid(gatewaySid);

AND :


} else if (cmd === 'heartbeat') {
//      that.log.debug("[Revc]" + msg);
        var model = jsonObj['model'];
        var sid = jsonObj['sid'];
        
		// TEMP PATCH
		if (sid.substring(0,1) == 0) sid = sid.substring(1);
		// -----------------
		
        if (that.ParseUtil.isGatewayModel(model)) {

Did I missed something please ?

Thank you.

Drazy42 avatar Feb 10 '20 23:02 Drazy42