ESP32 based BLE tracking for mqtt_room

PlatformIO is used to build and upload firmware to an ESP device. ESPHome is a firmware that runs on the ESP32/ESP8266. This project (the room presence detector) is a different firmware. You can kind of think of firmware as the “Operating System” of the ESP32 - different firmware projects can’t be run on the same device at the same time.

Are you trying to get set up with tracking bluetooth beacons using the mqtt_room platform? If so, you’ll want to go ahead with this project and PlatformIO. If you’re just looking to get firmware running, you can use ESPHome, but for mqtt_room you would need to create the right actions and triggers, etc.

1 Like

Dears,

I cant configure correctly the binary sensor. The info in HA shows only:

image

It always shows connected even if Ihave turned off the beacon (movile phone with Beacon Simulator App.

I don’t know exactly what information I need to put in the binary sensor in HA. I put:

  • platform: mqtt
    name: ESP32 A
    state_topic: “presence_nodes/estudio”
    json_attributes_topic: “presence_nodes/estudio/tele”
    payload_on: “CONNECTED”
    payload_off: “DISCONNECTED”
    device_class: connectivity

But in the setting.h in Atom I have:

//Replace with the room name where the node will be placed; example: #define room “living-room”
#define room “estudio”

//Define the topic for publishing availability
#define availabilityTopic “presence_nodes/” room

//Define the topic for publishing JSON attributes
#define telemetryTopic “presence_nodes/” hostname “/tele”

What is hostname term?

Thanks

SOLVED:

If in settings I have

#define room “estudio”

and

#define hostname “esp32_room_presence”

Then the binary sensor needs to have:

  • platform: mqtt
    name: ESP32 A
    state_topic: “presence_nodes/estudio”
    json_attributes_topic: “presence_nodes/esp32_room_presence/tele”
    payload_on: “CONNECTED”
    payload_off: “DISCONNECTED”
    device_class: connectivity

:slight_smile:

So it’s unlikely to see an esphome version coming ?

That’s correct, unless someone else builds it. Unfortunately, I don’t have the time.

1 Like

I’ve just published release version V0.0.8 to address a change in a library that had broken the code. There is no improvement over existing functionality, so you don’t need to migrate to this release for any reason unless you’re flashing a new device.

Big thanks to folks on github who post issues, and the other smart folk who find the solution and post how to fix it. As I’m no longer using this project, contributions like that allow me to keep the code operational. :slight_smile:

1 Like