custom-components / ble_monitor

BLE monitor for passive BLE sensors
https://community.home-assistant.io/t/passive-ble-monitor-integration/
MIT License
1.89k stars 243 forks source link

CGG1 slow response #477

Closed archiespb closed 3 years ago

archiespb commented 3 years ago

I have a CGG1-M. It works fine with MI Home and Qingping apps, but in HA I see very slow response to the temperature and/or humidity change up to getting "unknown" value for 5-10 minutes after HA restart. So I can't make right and responsive automations.

Ernst79 commented 3 years ago

There are different version of the CGG1 and users have reported different broadcast intervals, some say that it only sends 1 advertisement per 10 minutes. I would recommend using the alternative ATC firmware, see e.g. https://github.com/pvvx/ATC_MiThermometer this allows you to set the interval to whatever you want.

archiespb commented 3 years ago

Why there is no problems with advertisement interval in MI Home and Qingping apps? Also I tried to flash alternative firmware and failed ( https://github.com/pvvx/pvvx.github.io/issues/5#issue-970993781

Ernst79 commented 3 years ago

You are sure it is the M version? Other than that, do you have other sensors that are working fine, or is this the first sensor? It might also be a reception issue, either sensor being too far away or a SSD drive close to your Bluetooth dongle, causing interference.

archiespb commented 3 years ago

Yes, I'm sure. It has a qingping logo and encryption and works with MI Home. Yes, I also have an old CGG1 version (without encryption and logo) and it works fine with HA. And Telink flasher doesn't recognize it. I have only ssd in laptop located pretty far from raspberry pi with HA.

Ernst79 commented 3 years ago

Ok, just to be sure, it does work occasionally, but very slow updates. Or does it never work.

try to enable report_unknown for xiaomi and later for qingping, to check if they changed the format. You will have to enable debug logging in HA as well, see the faq for instructions.

archiespb commented 3 years ago

It does work occasionally, but very slow updates, right.

What info I should extract from log?

Ernst79 commented 3 years ago

Report_unknown option will report unknown formatted messages of xiaomi or qingping devices, they might have changed the format. But if it works occasionally, I suspect an reception issue. Try to place it closer, to see if that improves thing, just to make sure.

archiespb commented 3 years ago

I think issue can be closed. I didn't find nothing strange in logs, but I finally flashed the device with instruction (https://github.com/pvvx/ATC_MiThermometer/issues/41#issuecomment-830570681) and tuned tx power and advertisement interval to relevant values.