[APP] Homey ESPresense room presense system

Hi everyone,

For quite some time I was missing an amazing feature in Homey: Room presense.
I wanted to be able to track who is in the room (my or my girlfriend) and create some awesome flows for that.

This can be done with a simple ESP32 of less than 10 euro’s I found out Home assistant can do this with ESPresense. So i’ve decided to integrate that system in Homey!

With this system you can track the distance to a phone/smart watch.
Based on this you can start flows that are fully personalized and know in which room you are.

Right now it’s awaiting Homey approval but I wanted to share this already.


I keep the steps updated at my blog:



Homey app is live ESPresense App voor Homey | Homey

1 Like

Update Released:

  • Fixed bug in flow cards!

Nice addition for Homey. I have been playing with it for a while and have some issues and suggestions.

  • When removing the device from Homey, the app keeps producing errors: device_not_found. I have to restart the app for it to resolve this. I don’t know how to solve this myself.
  • The trigger cards keep triggering (in your example, the lights keep receiving the command to turn on every few seconds), so I would ditch these trigger cards. I added a measure_distance_capability.${deviceName} capability per ‘Presence ID,’ so flow cards will be created automatically for ‘Distance becomes greater or less than,’ ensuring they are triggered only once.
  • I added a setWarning/setUnavailable when the ESPpresence device goes offline.

Thanks for this app! There may be other solutions, but this gives me great control over what Homey should do when a certain person (actually a phone, smartwatch, or any other BLE device) enters a room. And the ESPresence devices are reasonably priced, only a few euros. I use the ATOM Lite ESP32; they are really plug and play. They are wonderful.

1 Like

Did you create a pull request? I can fix point 1 in an upcoming update. If you didn’t make a pull request I’ll add your second point aswell

No, no pull request. Looking forward to an update :+1:

1 Like

Hi, I was considering using Home Assistant for this but it’s much better to have a Homey app for this, thanks a lot!!!

In your screenshots I see the device name next to the distance. I do not see this for my devices. Any idea what could be the cause?

They are configured like this:


My flows trigger just fine with the device names, so everything else seems to work.

1 Like

That’s a very good question don’t know that without looking at the code. Sadly I’m on holidays so unable to check it for the next 2 weeks :sweat_smile:

Hi Menno, there’s no urgency so enjoy your holidays!

1 Like

That screenshot was from a slightly modified version I made myself. Let’s wait for an update from Menno, his version doesn’t have that yet.

1 Like

Will come in about a week or so

1 Like

I would like to base my presence information on multiple devices. For example, If my garmin watch is not connected to my phone it also sends out a BLE beacon, but when the watch is connected to my phone it is not visible for ESP Presence.

So when the garmin watch is broadcasting BLE, then I am probably in another room than where my phone is.

So I would like to have some options in the “AND” part of the app, so I can set conditions to when to use what device for my location determination.

For example: When device Samsung S23 is closer than xx meters AND Garmin Fenix is not present, then set my location to “location X”

So I would need multiple changes for this:

  1. conditions in the “AND” part of a flow
  2. some kind of indication that a device is not present any more. If a device disappears from range, then you will see the latest distance. It should be shown as “not present”.
  3. descriptions with the device name in stead of “distance” as description (as was already confirmed will be added soon)

@Dries_Verbruggen I will look into it but i can’t make promises.

I didn’t add and cards on purpose so far since they are unreliable.
If a device stop’s transmitting while being in-range, is it then inrange forever?
There are lots of cases and cards will not work and that’s why I am avoiding them.

You can add simulair behaviour with custom variables, I just don’t want to add things that don’t work optimal to the app for the average users.

I would say that if a device is not in range you should not show a distance anymore since it is not present.

I took some time to see how it works on home assistant this morning. Here you have an ESPresence device in each room.

And then you create a sensor that is tracked, it shows which room the device is in. If the device is not found, it reports not_home.


I think this is the best solution to use in flows. So maybe it would be better to remove the device distance on the room ESPresence devices. And move the ESPresence ID configuration to a new “tracked beacon device” that the user can create, and then show the location where the device was detected. Or if the device wasn’t detected in any room.

As in home assistant, it would be needed to be able to set the absorption (distance) to limit how far a device in a specific room should detect beacons:

I am currently looking at the code for the suggesitons.
Sadly i cannot modify a capability title.
There for i can not display the device name in homey instead of distance.
Also the measure_ flow card generation is not gonna work because of the same reasons.
It will just generate distance flow cards but won’t tell you for which device.

@Menno_van_Hout, it’s Amazing you’ve built an app for Espresense, it’s a great way to do room detection :+1:

I’ve been using Espresense for a while and would love to replace my “complex” flows with a simple solution like your app, but I do have a request. :innocent: If you have an ESP32 with espresense in every room, just having the distance isn’t really working for me so far with the app, that is unless you put the ESP32 exactly in the middle of the room…otherwise there might be an overlap between ESP32 devices and it cannot determine in which room a device is. For example I have 1 in the bedroom and 1 in the hallway, but the one in the bedroom is not that far from the door (and no other place to put it).

What I’m currently using is a solution like this: (partial screenshot)

First get the distance from MQTT, set it as a variable and then I calculate which ESP32 is closest to the device every 3 seconds using this part of the flow. (partial screenshot)

Yes, I know I can make flows a bit simpler, this is my test setup (and I never have time to fix things that aren’t broken :crazy_face: ).

It would be great if it would be possible to include something like this functionality in your app.
Also would love an AND card, and yes, I understand that if a device isn’t connected anymore that causes issues. I’ve solved that by making a flow that checks (by setting a variable) if the device has connected in the last 3 minutes, if not, I set all the distance variables to -1. Maybe something like that can be done to resolve that issue in your app too.

I know this isn’t a minor addition :rofl:, but think lots of people would enjoy functionality like this.
If you need any help, for example testing, feel free to send me a message.

1 Like

Sounds like a plan, probably next to esp32 i can add a tracker device? with a room capability.
This way you can create a device that takes a device name and keeps track of the room.

1 Like

Yeah that would be very nice, although, keeping track of a room would mean there could be a connection to 2 or more rooms, so then a distance would give the best indication in which room someone is probably. If you need some more information about my current “setup”, like the screenshots above, feel free to send a message.

These seem pretty sweet! I’m about to order some for myself here as well to test. What would you recommend to power them considering I’d want to put them in as small of a box as possible?

I just connected them to old phone chargers I had laying around, and tucked them away behind stuff :blush:

1 Like