Presence (OPEN)


(Aaron) #22

thanks


(Marcus) #23

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


(Markus Storm) #24

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).


(Marcus) #25

Maybe I made myself unclear or I am completely wrong. I am not looking for software / app, I am more into the hardware thing. I try to round up quickly:

We do have a couple of Apple and Android phone, Bluetooth always enabled.
Isn’t there a way to buy a wall outlet based beacon, that will detect the phone(s) and fires a switch in OH in order to switch on presense?
In fact it does not matter who will enter the room or the house, I just want to have a third way (beside WIFI and IFTTT) that comes into place in order to detect presense.


(Markus Storm) #26

You’re completely wrong then. A BT beacon is a simple, essentially passive device to only announce its ID. It does not provide any function other than that. If you want to use it to detect proximity, you need to run a program somewhere on the mobile device to detect it’s moving into sending range of that beacon (i.e. it’s not running on the beacon). In other words: on your phone(s).
Alternatively, you could take the beacon for a walk (to be the moving part) and run the detection program on your (fixed location) server. But for that see my previous posting, BT and servers don’t really work well with each other.


(Marcus) #27

IC
Thanks so much for clarification.


(Sleepi) #28

Hallo,

I want show my way of presence detection. I build myself a plug board to detect if a certain key is plugged in. The plugs are standard audiojacks in which i soldered a resistor. Then I have a another resistor so I get a voltage divider and measure the analog voltage between the resistors. To read more than one jack I’m switching between the different plugs with some FETs (probably working with transistors as well, just had FETs liing arround) where every jack has its own resistor Value and therefore a different measured voltage. After measuring the voltages I send the information back to openhab via MQTT.

Greetings


(Holger OpenhabUser) #29

Cool idea! :sunglasses:


(Aaron) #30

I like it but I don’t like the idea of the audio jacks too fiddling maby the same style thing using a wireless protocol NFC maby


(UweB) #31

This can be done with iButton and 1wire with magnetic contacts as well