Updated info only when BT: Force Scan in HA

Hi all,

I have two Xiaomi temp & humidity sensors flashed with Telink flasher (standard settings, ATC format).

OMG version 1.6.0.

A couple of days ago it was working, but when I left the cabin leaving only the two sensors and GW the updates stopped. When I force scan through Home Assistant new data is sent.

Any ideas? Guess I could automate a force scan in HA, but that seems a bit…


Ole I.


“bleconnect”: true,
“interval”: 55555,
“adaptivescan”: true,
“intervalacts”: 55555,
“intervalcnct”: 1200000,
“scanduration”: 10000,
“onlysensors”: false,
“randommacs”: false,
“hasspresence”: false,
“presenceTopic”: “presence/”,
“presenceUseBeaconUuid”: false,
“minrssi”: -100,
“extDecoderEnable”: false,
“extDecoderTopic”: “undecoded”,
“filterConnectable”: false,
“pubadvdata”: false,
“pubBeaconUuidForTopic”: false,
“ignoreWBlist”: false,
“presenceawaytimer”: 120000,
“movingtimer”: 60000,
“btqblck”: 0,
“btqsum”: 4701,
“btqsnd”: 4586,
“btqavg”: 1.025076,
“bletaskstack”: 4500,
“blecoretaskstack”: 3108,
“blestarts”: 1518

Welcome @oleig,

There should not be any need to force scan through HA to get regular updates for your Xiaomi temp & humidity sensors.

With your posted settings above you will get a 10 seconds scan (“scanduration”: 10000) every 55 seconds (“interval”: 55555).

AFAIK the default broadcast interval for the ATC firmware is 60 seconds, so with all these settings combined you do get a couple broadcasts falling into the 10 second scan window, but with the 5 seconds deviation to the full minute ATC broadcast there will be quite a few scans/minutes which will not catch the ATC broadcasts, until they fall into the same time frame again.

For regularly catching all/most of the ATC broadcasts you can either increase the ACT broadcast interval, or increase the OMG scanning - I personally have “interval”: 25000 with the default “scanduration”: 10000 - or have a combination of both.

To best monitor how frequently your Xiaomi sensor broadcasts are actually scanned and registered by OpenMQTTGateway you can use MQTT Explorer.

Hope this makes sense and helps you to regularly have your Xiaomi sensors scanned.

Hi @DigiH

Thank you for your answer and suggestions.

I do not have access to the sensors now so I will try the changes on the OMG side first.

And yes, MQTT Explorer is an excellent tool and is registering the broadcasts - as per now after the forced scans.

Will update asap.

Thanks again.

//Ole I.

Quick update:

Sent this {“scanduration”: 15000, “intervalcnct”:300000, “save” : true}

to XXX/OpenMQTTGateway/commands/MQTTtoBT/config

and it’s now receiving data. :smile:

Will monitor, but looking good.

1 Like

Good news, but if you have also changed “intervalcnct” and not “interval” to get a better result it sounds as if you might not have the ATC firmware installed which broadcasts freely decodable BLE advertising data, but possibly the stock firmware which is only decodable by connecting to your Xiaomi devices, or it could be your longer “scanduration” now with the ATC BLE advertising broadcasts :wink:

All the different “interval”, “intervalcnct”, “scanduration” etc. are explained in more detail at

While your MQTT command was great, all these settings are also easily available in the OMG Gateway HA interface as switches and sliders.

Let us know how things are working for you.