Presence detection, BLE, mi flora, RF gateway with ESP32, OpenMQTTGateway is now compatible

Hi there

Yes, I was wondering what is the most stable. I had seen some people mentioning the Pi Zero W as a good device?

That sounds great. How long does it usually take to detect presence?

I’m also a bit confused about the different ESP32 boards out there. I live in Ireland and usually order from Amazon UK.

Would this board be suitable?

https://www.amazon.co.uk/gp/aw/d/B071JR9WS9/ref=ox_sc_saved_image_4?smid=A167QJB1GLPJYG&psc=1

Thanks for getting back to me

Most stable would be an arduino + hm10, but it will not be the fastest to detect beacons.
Regarding the pi on a general manner i don’t think they are stable, mainly due to the use of sd card.
I think currently the esp32 is a good compromise.
Here is the board that I use :

my use cases doesnt requires fast presence detections. Maybe you can ask here some users feedbacks.

Just added to OMG:

and

As a part of many feature available for tests on v0.9.4beta

Using 0.9.4 -beta I’m unable to see discovered mi flora using ha mqtt discovery. It’s my first usage of OMG, still wondering if it’s broken or I’m doing something wrong?

Hi,

Do you see the mi flora messages in the mqtt broker?

I do see them:

homeassistant/sensor/80EACA890C56-MiFlora-moi/config {"stat_t":"OMG/OpenMQTTGateway_ESP32_BLE/BTtoMQTT/80EACA890C56","name":"MiFlora-moi","uniq_id":"80EACA890C56-MiFlora-moi","val_tpl":"{{ value_json.moi | is_defined }}","unit_of_meas":"%"}
OMG/OpenMQTTGateway_ESP32_BLE/BTtoMQTT/80EACA890C56 {"moi":49}

Thanks, Mi flora device is a separated entity not linked to OMG device, did you took a look into the entity registry?

Indeed they are in the entities but not attached to the entity of OMG. Is there a way to do that, would be easier to find them.

It was the case before but I didn’t find it logical :slight_smile: , My thought was to differentiate entities according the physical devices separation. But maybe this is not the good approach in HA?

For me it should be managed together, that’s indeed more like HA approach. Can this be changed in the future?

For info v0.9.4 is out, it adds the following features/fixes:

Under the hood:

Thanks to the numerous contributors to this version!

Breaking changes:

  • Home assistant discovery of luminance value is now with lx unity instead of lu
  • actuatorONOFF API has been modified, see docs, pin is replaced by GPIO
  • all system attributes published to SYStoMQTT are now lower case, example:
{"uptime":260,"version":"version_tag","freemem":50012,"rssi":-30,"SSID":"omgap","ip":"192.168.1.23","mac":"24:0A:C4:24:90:98","wifiprt":0,"lowpowermode":0,"interval":55555,"modules":"BTHADiscovery"}

You can find it below:

1 Like

Plenty of new stuff for the v0.9.5, I hope you will enjoy it,
A big thank you to @jmw6773 & @Legion2 for their numerous contributions!

–Here is the content–
New devices:

New boards:

New features:

Aside from the code:

  • A new way to retrieve the compatible devices, boards and parts, through a website

Under the hood:

Breaking:

Deprecate - items that will be removed on the next release:

1 Like

Hi @1technophile,
I configured my ESP32 (DOIT ESP32 DEVKIT V1) by uploading the bootloader (file .bin) and the “main.ino” file via arduinoIDE.
In the “User_config.h” file I uncommented the line “#define ZgatewayBT” BT “// ESP8266, ESP32” to use my ESP32 as a gateway BLE for NUTs.

The process was successful and I can see the RSSI of the NUT in the MQTT broker.

Having to use the NUT for home presence, how can I enable the payload that sees the status of the NUT in home and not_home (or on and off) to integrate it into Home Assistant?
These are the values I currently see in MQTT:

{“id”: “xx: xx: xx: xx: xx: xx”, “name”: “nut”, “rssi”: - 66, “distance”: 2.246586, “servicedata”: “xxxxxxxxxxxxx”}

{“id”: “xx: xx: xx: xx: xx: xx”, “name”: “nut”, “manufacturerdata”: “59000003”, “rssi”: - 66, “distance”: 2.246586}

Thank you

Hi,

You have now an integration example into the section of the same name.
https://docs.openmqttgateway.com/integrate/home_assistant.html#mqtt-room-presence

Big release time, I hope you enjoy it!

This one brings a lot of features and improvements.

  • In particular the support of RTL_433 library to ESP32 thanks to @NorthernMan54. This is a huge addition to the community as this library enables to support a lot of new protocols. More than 75 433Mhz protocols supported with an ESP32 + a CC1101!
    Here is an example with a weather station:
home/OpenMQTTGateway_RTL_433_ESP/RTL_433toMQTT

{"model":"WS2032","id":38553,"battery_ok":1,"temperature_C":22.3,"humidity":65,"wind_dir_deg":90.0,"wind_avg_km_h":0,"wind_max_km_h":0,"rain":256,"flags":0,"mic":"CRC","protocol":"WS2032 weather station","rssi":-52,"duration":511982}
  • Also, @csiki2 improved the BLE gateway by adding a queue mechanism, bringing more stability to the gateway, and improving the number of BLE packets transmitted. Thanks to this, the gateway can now be configured for the continuous scan (TimeBtwRead:0, Scan_duration:1000) and catch easily BLE PIR and door/window sensors events.
  • Regarding the BLE gateway, sensor devices are now created automatically in Home Assistant so as to gather their entities. You can add directly these devices from configuration->devices into your Lovelace UI. Thanks, @titilambert, and @francisp.

But that’s not all, let’s take a deeper look at all the new devices, boards, and features!

New devices:

New boards:

New features:

Under the hood:

Docs:

Breaking:

Deprecate - items that will be removed on the next release:

  • SimplePublishing and simpleReceiving methods will be removed see why here
3 Likes

Release time!

The 0.9.7 brings a lot of features and improvements to BLE and TLS functions.

  • The support of a generic BLE connection to devices, you can now trigger a READ/WRITE to a BLE device through your ESP32 with MQTT. The gateway will initiate a connection to the device and acts on the service and characteristic given. For a value reading or writing. This opens a lot of integration possibilities, among others the control of actuators, valves, light, relays…
    It could also be a good way to test a value retrieval with a BLE connection before asking for a native integration into the gateway.

Example MQTT message format:

mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{ "ble_write_address":"AA:BB:CC:DD:EE:FF", "ble_write_service":"cba20d00-224d-11e6-9fb8-0002a5d5c51b", "ble_write_char":"cba20002-224d-11e6-9fb8-0002a5d5c51b", "ble_write_value":"TEST", "value_type":"STRING", "ttl":4 }'
  • Efforts have been made around the security connection functions, the TLS connection can now be configured within the configuration web page by adding the server root certificate (copy&paste) and checking a box.
    You can alternatively use self-signed certificates and even several sets of them, if you want to handle several MQTT servers. With this comes also the ability to change the MQTT server by MQTT, with automatic return to the previous configuration if not working.

  • So as to make the update of the gateway you are now able to trigger it through MQTT, if the version is different than the current one and if the password is OK, the gateway will download and install the linked firmware.

mosquitto_pub -t "home/<gateway_name>/commands/firmware_update" -m '{ "version": "test", "password": "OTAPASSWORD", "url": "https://github.com/1technophile/OpenMQTTGateway/releases/download/v0.9.6/esp32-m5stack-ble-firmware.bin" }'

But that’s not all, let’s take a deeper look at all the new devices and features!

New devices:

New features:

Under the hood:

Breaking:

Docs:

Deprecate - functions that will be removed or modified on the next release:

  • The default gateway name for ESP will be generated automatically from the MAC address per default, OpenMQTTGateway in the AP name and the topic will be replaced:
    AP Name: OMG_112233445566
    Topic: home/112233445566/BTtoMQTT
    Setting the Gateway_name will not be needed anymore unless you want to do it explicitely.
  • SimplePublishing and simpleReceiving methods will be removed see why here
1 Like

V0.9.9 is out !

What’s Changed

Among new devices and boards this release brings some exciting features like the capability to connect and control a BLE device like a switchbot, here is a sample command for the SWITCHBOT S1:

{
  "ble_write_address": "FF:AA:BB:FF:DD:EE",
  "ble_write_service": "cba20d00-224d-11e6-9fb8-0002a5d5c51b",
  "ble_write_char": "cba20002-224d-11e6-9fb8-0002a5d5c51b",
  "ble_write_value": "570100",
  "value_type": "HEX",
  "ttl": 4,
  "mac_type":1,
  "immediate": true
}

OMG has been supporting for a long time reading of BLE broadcasters, we can also read data through a BLE connection but being able to act on a BLE device is something new. Opening a lot of possibilities and use cases like controlling BLE actuators, lights, valves, plugs…
Feel free to test and share your snippets of OMG command for the others!
Do you like BBQ? So get ready for the sunny months and set up your meat cooking monitoring thanks to 3 Inkbird BBQ sensors supported.
You wanted to analyze your HASS entities data on a long-term basis and you didn’t set up a separate DB to store those, you now have the support of long-term statistics into HASS directly with the auto-discovery.
You are a professional looking for an ESP32 firmware that can integrate to AWS and send sensor data, OMG now supports this type of integration.
But that’s not all, here is the exhaustive list of improvements!

NEW BOARDS:

NEW DEVICES:

  • ThermoBeacon WS08
  • ThermoBeacon WS02
  • BlueMaestro TempoDisc
  • INKBIRD 6XS and 2X BBQ sensor support
  • GOVEE H5075, H5072 and H5102

NEW FEATURES:

FIX:

BREAKING:

  • [BREAKING] Change unique id structure for HASS discovery by @1technophile in #1147
    You will see duplicate entities if you use HASS autodiscovery, explanation here
  • [BREAKING] Differentiate WM version by @1technophile in #1148
    If you are using your own PlatformIO environment you will need to add the link to the suitable wifimanager library directly into your environment library list:
lib_deps =
  ${libraries.wifimanager8266}

or

lib_deps =
  ${libraries.wifimanager32}

MISCELLEANOUS:

New Contributors

Full Changelog: v0.9.8…v0.9.9

2 Likes

Hello I have the version of OpenMQTTGateway v0.9.10 before I had a version 0.98 and I was using inkbird 2x as well if it saw it as 4x, today I put the latest version the 0.9.10 and I find that instead of seeing it 2x or 4x I am IBEACON Gneric as in the photo, but does not see the correct name like “inkbird2xs_temp1” why ??? I had read that it was detected automatically

thank you

Could you connect to the mqtt broker of your home assistant with mqtt explorer and give me some screenshots of the BTtoMQTT topic please. Especially of the topic with the MAC address of your device.

I hope it goes well