I have a Blue Charm BC021 beacon with a programmable button. Also a Switchbot Smart Motion/Door Sensor. When I use KBeacon on my phone to watch the output of the Blue Charm beacon button press, the response is estimated to be less than 100ms. The output from OpenMQTTBridge to my MQTT broker being monitored with MQTT Explorer and a bespoke python script takes anywhere from about 1.5 to 8 seconds to respond with quite a bit of variation.
My use case is that I would like to turn a light ON/OFF with the beacon button going through the MQTT broker and controlling a Tasmota socket with Node-Red or a bespoke script. When someone clicks a button to turn ON/OFF a light, they expect a response in a second or less. Anything other than that is very confusing for the user.
I have set a whitelist for the three BLE devices I have locally. There is also a Govee Temp/Humidity sensor that is working fine and is not fussy about latency. I have tried turning AdaptiveScan ON and OFF, but it does not seem to affect the latency for a beacon switch press.
I set interval and intervalacts to 1ms, but as soon as I set AdaptiveScan True they are both set to 100ms by the firmware. I am also monitoring the serial output of the OpenMQTTGateway and see that even though there is a whitelist for the three devices in my location, it is scanning for and picking up other devices. It is not publishing them to MQTT, but it is taking the time to scan for them.
The interval between the N: Scan Begin messages is 10 seconds.
Here are my current settings copied from MQTT Explorer:
{âbleconnectâ:false,âintervalâ:1,âadaptivescanâ:false,âintervalactsâ:1,âintervalcnctâ:3600000,âonlysensorsâ:false,âhasspresenceâ:false,âpresenceTopicâ:âpresence/â,âpresenceUseBeaconUuidâ:false,âminrssiâ:-100,âextDecoderEnableâ:false,âextDecoderTopicâ:âundecodedâ,âfilterConnectableâ:false,âpubadvdataâ:false,âpubBeaconUuidForTopicâ:false,âignoreWBlistâ:false,âbtqblckâ:3,âbtqsumâ:94023,âbtqsndâ:92812,âbtqavgâ:1.013048}
Is there any way to improve the latency for button presses and PIR events? I am using the latest version 1.4 of the esp32dev-ble image.
Many thanks for the very useful suite of gateways. Iâm also using the 433Mhz version on a LilyGo board with display and it is working well.