g-TAG over BLE to ESP32 over WIFI to MQTT/Openhab

  • Platform information: RPI3
    • OS: openhabian latest
    • openHAB version: Openhab 2.4 latest

Hello everybody,

is it possible to detect presence (BLE) via an ESP32? I found some instructions, but I’m new to the field and I’m not quite sure.

I would like to detect a g-TAG with the ESP32 via Bluetooth (BLE) and send Informations (presence) via WLAN / MQTT to pi3 / openhab.

Is that possible? Does anyone have a step by step guide?

thanks for help

Daniel

Yes

Hello everybody,

After a few hours, I got the ESP32 up and running. I still have the following problem, in the Mqtt comes the information about RSSI and distance, but above hab does not take this.
What am I doing wrong?

> home/presence/BLEGateway {"id":"7c:2f:80:8e:xx:xx","manufacturerdata":"▒4▒▒▒Ȼ▒","rssi":-74,"distance":5.270232}
> Number  nogone_tag_rssi     "Daniel Empfang [%d %%]"                            <wlan>      (gPresenc)              {mqtt="<[broker:home/presence/BLEGateway/7c2f808exxxx:state:JSONPATH($.rssi)]"}
> Number  nogone_tag_dis      "Daniel Entfernung [%.2f m]"                        <wlan>      (gPresenc)              {mqtt="<[broker:home/presence/BLEGateway/7c2f808exxxx:state:JSONPATH($.distance)]"}

thanks for help

This is mqttv1 syntax
Your are using openHAB 2.4. Which version of the mqtt binding are you using?

I use the old MQTT V1.13.0

Your mqtt.cfg, please

broker.url=tcp://openhabxxxxxx:1883
broker.clientId=OpenHAB2
broker.user=openhabian
broker.pwd=xxxxxxxxxx
broker.qos=0
broker.retain=true
broker.async=false

All othe Sonoffs and shellys work, only the Data from ESP32 - Presenc dont work

Ok, so the problem is not MQTT…

Do you use an MQTT tool like MQTTfx?
What topics are being published by the ESP32 and what payloads? Exactly. Thanks

oh sorry, in the Mqtt comes the information about RSSI and distance

home/presence/BLEGateway {“id”:“7c:2f:80:8e:xx:xx”,“manufacturerdata”:“▒4▒▒▒Ȼ▒”,“rssi”:-74,“distance”:5.270232}

but in openhab the items

Number  nogone_tag_rssi     "Daniel Empfang [%d %%]"                            <wlan>      (gPresenc)              {mqtt="<[broker:home/presence/BLEGateway/7c2f808exxxx:state:JSONPATH($.rssi)]"}
Number  nogone_tag_dis      "Daniel Entfernung [%.2f m]"                        <wlan>      (gPresenc)              {mqtt="<[broker:home/presence/BLEGateway/7c2f808exxxx:state:JSONPATH($.distance)]"}

don’t take the payload.

The topic is incorrect

{mqtt="<[broker:home/presence/BLEGateway:state:JSONPATH($.rssi)]"}

Ok, what would that be the right topic?

{mqtt="<[broker:home/presence/BLEGateway…??

You posted it yourself above:

Hello, can you post a link of the instructions you followed?

Openmqttgateway can do it :
https://docs.openmqttgateway.com/

Added to the decoding of numerous BLE sensors :
https://docs.openmqttgateway.com/prerequisites/devices.html#for-ble-devices