Presence (OPEN)


(Aaron) #1

Hows everyone tracking that people are present in the home?

to make a start the idea i was going to use was mobile phones if they are connected to wifi people are home if no mobiles are connected nobodys home

got a few problems with that approatch atm my partners phone keeps dropping connection

what solutions is everyone using RFID WIFI BLUETOOTH NFC PIR SENSORS ?


(Kees Van Gelder) #2

I have been less than impressed by phone-online-detection. Add to that I dont always bring my phone.
I do have pir sensors, which is quite ok as long as there is movement, but it also doesnt tell you who is home, so i recently started experimenting with BLE


(Aaron) #3

if the mobiles stayed connected to the wifi i would be quite happy with this method for now tbh 99% of the time we always take our mobiles with us but if there is a better solution i would prob use that instead

im only just starting out at this so just getting something running is better than nothing


(Kees Van Gelder) #4

oh, i fully agree.
I understand the iPhone is quite notorious in this aspect but even my Android isnt reliable on this.


(Aaron) #5

both android devices

samsung galaxy a5 mine (Fine) as far as i can tell
samsung galaxy a5 2016 gf phone (Keeps going offline when its locked)

i will hopefully solve this problem or get a better idea i need to toubleshoot the phone see whats happening as its set the same as mine to always stay connected to wifi


(Kees Van Gelder) #7

Thanks, currently experimenting withESP8266 (sorrry, I mean ESP32)


(Frantisek) #8

What do you mean exactly by “experimenting with ESP8266”? Is it related to the presence issue? What is your idea behind? Maybe something I coul also use :slight_smile:


(davorf) #9

Hello!

I’m using phone’s WiFi for presence detection, and it works pretty reliably. How do you use it? Network binding pings? I guess there could be problems with that approach, if you can’t ping the device when asleep. I’m using Tasker to update OH items when phone connects or disconnects my WiFi network, and this status change isn’t triggered when you lock phone. Maybe you could try this approach and see if it works.

Best regards,
Davor


(Peter Juenger) #10

Im using presence detection with my android phones as described here

It is absolutly important that you install “arping”, because you will only get reliable detection with that.
https://docs.openhab.org/addons/bindings/network/readme.html

It will be used automatically by the network binding, BUT you have to set the “suid” bit (chmod u+s /usr/sbin/arping)


(Kees Van Gelder) #11

Apologies, typo. I mean the ESP32, detecting BLE key


(Aaron) #12

for now i seem to have solved this problem i changed the port the network binding was pinging

now the phone doesent disconnect from the wifi network when locked just drops for a moment every few hours

i changed the binding to ping port 5060 and to only consider this device offline after 5 pings are lost


(Kevin) #13

This is my Solution for Detecting Presence with Bluetooth :slight_smile:

and in OpenHAB is use the Design Pattern from @rlkoshak


(Aaron) #14

My plan for the moment is to use the network binding to ping a mobile if this is on somebodys home if its off they have left thats part 1

im going to add a second type of sensor to backup these results maby a bluetooth tag attached to keys

and a door open/close sensor to improve more if this hasent changed nobodys left


(Kevin) #15

Look @ my Github Projekt … that is Bluetooth Tag … that works perfectly for my … installed on a Raspberry Zero W… if your Openhab is installed on a Raspberry … the copy the install script to /home/pi/ and than sudo bash install.sh answer the Questions … and it will work :slight_smile:

Ping was no Option for me … because iPhones in my house … and it works not good … the Network Binding wakes most time the iPhone over Bonjour … but sometimes it not wakes up …

Bluetooth GTag’s no Errors :slight_smile:


(Aaron) #16

im running android here not getting into that debate :slight_smile:

like i say im thinking the solution is phone wifi & bluetooth tags paired with door sensor


(Crystollic) #17

I am using homekit automation and the homekit binding to set a switch/group to determine presence.

Works reliably aside from occasionally losing homekit/OH pairing. I prefer the geofence approach as opposed to detecting via network and I can also set a switch for when I am leaving work etc.


(Aaron) #18

At the moment I’m using two buttons on my habpannel mounted on the wall

Arriving home
Leaving home

You just touch these as you leave at it works flawless I’m just after a decent approach to automate this function and to also know when and who is home I don’t need to know where they are or anything


(Jeremy Wood) #19

I tried to using mobile phones, it just wasn’t reliable enough.

I have since used BLE iBeacons and a Raspi3 (that has BLE and Wi-Fi). The wife has one and I have one and so do my kids. The raspi3 has a python script (modified by me but not mine originally) to detect the iBeacon MAC address via BLE and passes this on vi Wi-Fi network to Openhab. Rules do the rest so I know ‘who’ is home and how many are home (for heating setting security alarm etc) The iBeacon is a little bulky for the key ring but smaller ones battery time is in months whereas the one I use is 2 years with a 5 second ping time.


(Aaron) #20

Could you all send me links too the ble beacons that you are all using thanks


(Markus Storm) #21

Please search the forum for existing threads before you open a new one.
You would have found this thread and the presentation linked to here.