Presence (OPEN)

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

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

1 Like

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

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:

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

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)

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

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

1 Like

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

and in OpenHAB is use the Design Pattern from @rlkoshak

3 Likes

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

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:

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

1 Like

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.

1 Like

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

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.

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

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.

1 Like

thanks

Running OH quite a while, detection is based on WIFI and IFTTT…which runs mostly ok.
Since a couple of days I am looking into BLE detection but I am lost what to buy.
I wonder if some can give me a hand for specific device, that is supported by OH and uses BLE and WIFI. The idea is to place it into a wall outlet to ensure it is always running.
Any hints? Thanks for your effort

Well what to buy is easy, any BT beacon does. The problem is how to query BT from OH
(it’s easy with WiFi, there’s bindings to track devices on IP or MAC level, but no such thing exists for BT).
BT binding is experimental, using onboard BT on RPis easily interferes with anything to run on serial devices.
I suggest looking at FIND. Runs on Android, and uses both, WiFi and BT, to triangulate its position. There is a tutorial on integrating FIND with OH, but note that’s still based on old FIND v2. BT support requires FIND v3 (works as well with OH but there is no tutorial yet).