I have a ESP32 flashed with Openmqttgateway to read Mijia Temperature and humiduty sensor and convert to MQTT. After weeks triing to compile and flash, finally did it…But now the Bluetooth range is only 1 or 2 meters…
There is som way to change the power of BLE in code and how to do it???
I dont have other board… But the sensor works with raspberry pi at 10 meters. I wanted to use this board because the raspberry cant reach the 1st floor. I have read that esp32 has several ble tx power…
Hi, this is my first post so i would like to congratulate for the great idea!
I also experienced the same issue between ESP32 and ble 4.0 keyrings. Measured signal level is -80 at 1 meter of distance.
I tried as you suggested to include the esp_ble_tx_power_set but the configuration i had to set is ESP_PWR_LVL_P7 because with ESP_PWR_LVL_P9 i got the error:
\ZgatewayBT.ino: In function ‘void setupBT()’:
ZgatewayBT:129:73: error: ‘ESP_PWR_LVL_P9’ was not declared in this scope
anyway also with the P7 setup i didn’t experience any change in quality of signal (still between -70 or -80).
The purpose of my implementation is to set up a reliable presence detection to my openhab.
I configured:
#define TimeBtw_Read 500 //define the time between 2 scans #define Scan_duration 10 //define the time for a scan
And i configured my openhab to set the person as “not at home” if i dont recieve updates for 2 minutes from the mqtt item.
Unfortunately it still looks like i got frequent offline messages. What can i do to improve my application?
Thank you!
Hello, between - 70 and - 80 is the signal value that I read on mqtt for my ble keyrings, when they are 1-2 meters from my esp32. If I go more far I start to not discover anymore the devices