Presence Detection Seems Too Hard

You should be able to test with curl to determine if your device on the Internet can update the status of myopenhab and rule out some of the troubleshooting.

When I finally get to presence detection, this is my current plan as well. Instead of using Google Home I’m going to use the setting of the security system to trigger “Away” mode. If the security system is armed “Away”, nobody’s home. I already have the security system integration, and we all push the buttons to arm it when we leave, and we all disarm it when we come in.

1 Like

That way works fine, when you´re living on your own. But in a family with more members, this isn´t going to work, unless everyone tells when they´re leaving, and again, when they arrive… Not optimal :slight_smile:

this works just fine, as many of houses (or us) having regular alarm which kind of need to type something in to be IN or OUT :smiley:

Good afternoon, I propose one of my solutions, (I hope these next vacation to do it). It is very simple, it is a simple hanger, where to place for example house keys, car etc. Use a contact sensor, in my case of xiaomi, since it is very small, The function is that when placing the keys, bring the part that has the greatest weight, to the part of the magnet, and close the contact, this would send us to OPENHAB the signal indicating the state of closed and in maps, we define what interests us. I think it is a simple solution, but in micaso it is functional.
Forgive my English, it’s Google translation.

1 Like

Why?

If you assign static IPs to these devices on the router the problem becomes very simple. You just need the Network binding.

This is really hard and I’m not sure I’ve seen anyone provide a solution to this beyond motion sensors. You could use something like reelyActive Smart Spaces Revisited and see when any device with BT turned on is present, but you cannot uniquely identify any given device because most will periodically change their BT address as a privacy/anti-tracking feature. And you will have no way to tell whether that someone is supposed to be there or not.

I found just the opposite, with up to a 30 second to 1 minute lag between my entering an area and actually being reported in that area. A well tuned Network binding with arping will see any device, whether it is sleeping or not, within 5 seconds.

Check out AutoLocation which is better, but GPS is still pretty slow to update. But you can use other stuff in Tasker which may work better such as 'WiFi Nearor 'Cell Tower Near.

This is why the Generic Presence Detection tutorial has a flapping timer. Only if the phone is off for five minutes would it count you as away. And there is an override switch that you could flip if you know the phone will be offline for longer. I use that when we have a baby sitter over to stop all the “blah blah happened and no one is home!” alerts.

I believe it still let’s you define a geofence that triggers a Switch when you enter/leave the geofence. But that was before the new GPS Tracker binding so I don’t know if that is still possible.

It’s worth mentioning that FIND doesn’t work with iOS, unless something has changed since the last time I looked. It’s one my list of things to play with at some point, too little time myself.

That’s what the override switch is for. And the general advice (I figured it was common sense but may it isn’t) that nothing critical should be driven by any presence detection that isn’t 100% solid whether you have a device on your person or not, which is reaching the edge of what is technically feasible frankly. If you don’t have enough time to manually flip the override Switch or manually do something to avoid alarms or something when you arrive home without your phone, you should be relying on presence to drive that automation.

Yeah I use alarm as well. When alarm is armed, no is at home, (hopefully :slight_smile: ). Problem is, if last person leaves without activating the alarm.
I have thought about a way to automate this, but it´s not stable enough, as I want it to activate as soon as last person leaves the house… But what if the last person only leaves a few meters from the house, forget the key/phone/any triggering part… Not good.

For detecting who is home, I use Unifi binding to detect the phones. It´s working quite good. But it takes a few minutes to detect when someone has left the house (aprox 5 minutes).

Per my earlier post, I only need to tell Google Home when I’m leaving. openHAB detects when I arrive home via my lock or motion sensor. So all that this requires is for people to turn the away/alarm mode on when they leave. That’s not a difficult task.

This is exactly why manually turning the away/alarm mode on is, in my opinion, the optimal solution (regardless of how many people there are in the house). It removes the biggest source of unpredictability (humans) from the equation.

I think your concern is that the last person will fail in their task of turning on the alarm. I acknowledge that that can happen, but I trust a family member to make the right decision more than I trust a set of rules that can’t account for every possible scenario (particularly rules that I’ve programmed). I think it’s better to leave the complex processing to a person who can easily determine whether or not others are still in the house.

Not only do I trust my family members more than rules I might write to try and guess every situation, by tying the “Away” to the security system it’s easier to remember to engage - there is more at risk than just the HA system, and people seem willing to deal with the annoyance of the security system for its perceived benefits.

One reason I haven’t moved far forward on this is I’ve discovered how rarely we all actually leave… :slight_smile:

Whenever face detection gets better and more stable to use, I believe this is will the revolutionary thing in the whole aspect of presence detection. Just like voice recognation, the two together will finish what we all ask for. I look forward to that day!

It does, but it´s hardly automated :slight_smile:

Naah, it´s not really a question of trust, (even though some part of the family do tend to forget once in a while). It´s more a question of automating things like these insted of dealing with it. You can forget to tell your GH that you´re leaving, just as well as you can forget to activate the alarm.
What if you´re in an extreme hurry, you tell GH you´re leaving, but something goes wrong and it doesn´t respond. You dont have time to deal with it.
Also there are situations where it´s not necessary to activated the alarm. Perhaps you just leave the house to go into the garden or just nearby. Ofcouse it wont hurt to activate the alarm or lock the door (unless you forget the key). And it doesnt hurt if the house thinks you have left the building. But it would be better trying to deal with these situations, if possible though.

well it seems like you are trying to fix humans with technology, which kind of can’t be done :wink:
if one is not able to arm own house before leaving, nothing will help :stuck_out_tongue:

Ofcouse it can be done… Just a matter of enough triggers and some highly advanced logic :slight_smile:
This is actually a simple task. The worse part is to trust the system working as suppose to, every time.

Having a daugther at 16, it sometimes feels more simple to create an highly advanced automated system, rather than trying to correct her :smiley:
(She isn´t that bad to remember to activate the alarm… luckily!).

Turns out that it’s even easier than that.

Thats the next step when face detection doesn´t work :slight_smile:
For a Tesla model 3, I wouldnt do it though, it´s the cheap model you know :smiley:

Actually I really like the idea of having an RFID inserted somewhere under the skin. I have thought about fingerprints as well, maybe even an eye (iris) scanner as I think the RFID chip can be copied.

I’ve been using the Unifi binding for presence detection for about a year now, after trying quite a few options, including OwnTracks and the Network binding, and the Unifi has been pretty much spot on. Don’t get me wrong, there are times when someone has left their phone at home, or my openHAB/Unifi virtual machines have restarted in an order that left the binding not working until I’ve noticed, but generally, it reflects with reasonable accuracy the current occupancy situation at home.

I’ve not actually used it yet for controlling anything, but I’m fairly happy that, combined with maybe something like motion sensors, I can have a fairly good solution.

I use the UniFi binding as well. It works pretty good. Only problem is the delay when “things” have left. It can take up to 5 minutes. I guess this is why Russel use a “manual” switch, when he leaves the house.

You can set the time delay in sensing Unifi things as offline - I’ve got it set to 180 seconds, but it could be as low as 10s if you want, or whatever your polling period is (mine checks status of devices every 10 seconds)

Ok we have processed the trade-in for your car. All we need is for you to give us the keys.:scream::flushed:

Hmm I thought this was difficult to go below 180 (3) minutes…
But it may be due to I´m still using a rather old version of the binding.