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

can't see any accessories, but log indicates accessories working?

Open Jinsterrrr opened this issue 6 years ago • 16 comments

Hi. I can't see any of my Aqara Motion Sensors or Temperature Sensors in iOS Home app. But the log seems to say the accessories are reporting values?

[2017-12-14 13:35:05] [MiAqaraPlatform] [DEBUG][Revc]{"cmd":"report","model":"sensor_motion.aq2","sid":"158d0001ad5c07","short_id":23064,"data":"{"no_motion":"120"}"} [2017-12-14 13:35:08] [MiAqaraPlatform] [DEBUG][Revc]{"cmd":"report","model":"sensor_motion.aq2","sid":"158d0001ad626c","short_id":59319,"data":"{"no_motion":"120"}"} [2017-12-14 13:35:27] [MiAqaraPlatform] [DEBUG][Revc]{"cmd":"report","model":"sensor_motion.aq2","sid":"158d0001e08a89","short_id":24547,"data":"{"no_motion":"120"}"} [2017-12-14 13:35:28] [MiAqaraPlatform] [DEBUG][Revc]{"cmd":"report","model":"sensor_motion.aq2","sid":"158d0001ab364c","short_id":2546,"data":"{"no_motion":"120"}"} [2017-12-14 13:35:28] [MiAqaraPlatform] [DEBUG][Revc]{"cmd":"report","model":"sensor_motion.aq2","sid":"158d0001ad6223","short_id":12496,"data":"{"no_motion":"120"}"}

Jinsterrrr avatar Dec 14 '17 02:12 Jinsterrrr

Can you receive read_ack packet from gateway?

YinHangCode avatar Dec 14 '17 07:12 YinHangCode

I don’t see read_ack in the logs.

Another post suggested to change the IP following “multicastaddress”. Where is this “multicastaddress” setting?

Jinsterrrr avatar Dec 14 '17 08:12 Jinsterrrr

no read_ack packet is an abnormal state.

YinHangCode avatar Dec 14 '17 13:12 YinHangCode

same here. no read_ack anywhere…

just: [MiAqaraPlatform] [DEBUG][Revc]{"cmd":"iam","port":"9898","sid":"xxxxxxxxxxx","model":"gateway","ip":"192.168.1.60"}

and

[MiAqaraPlatform] [DEBUG][Revc]{"cmd":"report","model":"sensor_ht","sid":"158d0001573a22","short_id":6199,"data":"{"temperature":"1977"}"}

but I have more than 10 supported devices

node -v: v8.9.3 npm -v: 5.6.0 on pi armv7

phenomeus avatar Dec 14 '17 23:12 phenomeus

neither homebridge-mi-aqare nor homebridge-mi-aqara2 or homebridge-smarthome are working for me.

but if I install the original npm from snoorz its working like a charm (but with much less features) homebridge-aqara is the only one working out of the box

phenomeus avatar Dec 15 '17 10:12 phenomeus

YinHangCode, how do I fix the "no read_ack packet" problem? What's the cause of this problem?

Jinsterrrr avatar Dec 16 '17 14:12 Jinsterrrr

I have done more experimenting. It seems that MiAqaraPlatform receives messages from individual sensors even if I deliberately put in the wrong MAC address and wrong password for the Gateway.... How is that possible???

[2017-12-17 03:17:09] [MiAqaraPlatform] [DEBUG][Revc]{"cmd":"report","model":"sensor_motion.aq2","sid":"158d0001ad6223","short_id":12496,"data":"{"status":"motion"}"} [2017-12-17 03:18:35] [MiAqaraPlatform] [DEBUG][Revc]{"cmd":"report","model":"sensor_motion.aq2","sid":"158d0001ad6223","short_id":12496,"data":"{"lux":"3"}"} [2017-12-17 03:18:35] [MiAqaraPlatform] [DEBUG][Revc]{"cmd":"report","model":"sensor_motion.aq2","sid":"158d0001ad6223","short_id":12496,"data":"{"status":"motion"}"}

Jinsterrrr avatar Dec 16 '17 16:12 Jinsterrrr

FINALLY! the bug is: the SID (=first long number) has to be small letters like …da3b3 BUT the Password has to be (VERY IMPORTANT) all CAPS! as an example:

{ "platforms": [{ "platform": "MiAqaraPlatform", "gateways": { "6409802da3b3": "02I44K56ZRGG578B" } }] }

"small letters": "big letters"

then you get the absolutely needed read_ack commands

phenomeus avatar Dec 19 '17 17:12 phenomeus

Glad it's working for you. Can you confirm if your password is showing up as small letters in Android/iOS but you needed to type caps into the config file in order for it to work? Or did you simply make a mistake to start with?

In any case, changing the password to caps didn't work for me. Just FYI, Android Mi app tends to generate passwords with lower case, and iOS tends to generate upper case. I have already tried both and swapping the cases around and/or keeping them the same. No combination works.

Also for anyone else still trying, the lack of read_ack simply means you haven't logged into the gateway for some reason. I have tried to deliberately type in bogus MAC address and/or password and essentially get the same log results. [debug][revc" but no read_ack.

Jinsterrrr avatar Dec 21 '17 07:12 Jinsterrrr

afaik there is no way to read the password with IOS. so I had to use android. it was lowercase.

all I did was stoping systemctl, start a fresh config, delete accessories and persist folders and do a try and error.

small caps ID & PW: no luck upper caps ID & PW: no luck upper caps ID & small PW: no luck small ID upper PW: bingo.

suddenly all sensors showed up.

phenomeus avatar Dec 21 '17 07:12 phenomeus

Thanks for the feedback, phenomeus.

You can see the passwords and LAN data in iOS Mi Home the same way as Android Mi Home. You just tap the empty space instead of the version number (or whatever) in the About screen.

I did everything you did. No luck, unfortunately. So my issue could be something different. Now, with the added uncertainty of whether I should use upper or lower case passwords. Every solution I try now needs to be tried with both cases. Yikes....

Jinsterrrr avatar Dec 21 '17 13:12 Jinsterrrr

@Jinsterrrr can you make a screenshot where to tap on the new mi home iOS app? never knew that this was possible and I don't have to use android

phenomeus avatar Dec 21 '17 14:12 phenomeus

Phenomeus, it's at the exact same spot as the Android version of the app. So from the Mi homescreen, click on Gateway, then the triple dot on the top right corner, then click About: you will see "Manual, Smart Home Kit Forum, Gameplay tutorial". In the Android version, there will also be a Version number at the bottom centre of this screen, which is where you tap. But it's missing in the iOS version. Regardless, you tap the same area.

So basically repeatedly tap the bottom (let's say 5mm from the lower edge of the screen) centre of the About screen of the Gateway.

Jinsterrrr avatar Dec 23 '17 00:12 Jinsterrrr

You are the best!!!

We need to add this information to the readme! I did this and I also let it generate a new password and of course suddenly it was all caps. So iOS always wants caps.

Try to generate a new password for you

phenomeus avatar Dec 23 '17 07:12 phenomeus

@Jinsterrrr have u solved with read ack problems? Same issues for me :(

Salsalove avatar Nov 14 '18 17:11 Salsalove

No. All reports suggest it's to do with the capital letters or not. I have tried every combination and it just doesn't work. I gave up on this. I have been using the homebridge-to-homeassistant plug-in and HA detects all Mi products fine. So consequently Homebridge sees everything. Much easier than this here.

Jinsterrrr avatar Nov 17 '18 06:11 Jinsterrrr