Best Presence detection

Thanks man, could u please open issue page in your github page? I would like to send issues but I can’t find the issue page, thanks!

Also could you please describe how to filter on a specific set of MAC addresses? Can I also be able to filter down to only shows the currently connected devices in my local router?

btw thanks for your hard work, the codes are working very stable, goog job sir ^^

I believe the term “Presence” takes on multiple levels of granularity, which could be serviced by different techniques;

  • Intra-building: Within a room in a building (e.g, FIND, bluetooth beacon, or similar). If facial recognition is to be considered, it invariably should be enhanced by tracking via Kalman filters (or similar) which would benefit very significantly from tracking the head (front or side) and upper torso of any individuals that have been facially recognized (as actual facial recognition events may be few and far between). This requires cameras in many (if not most) locations in and around the building, and is a fairly complex solution. I had made progress in this direction until a lightning strike knocked out my system and I rediscovered life outside of OH.
  • On Premises: Inside or within a very short distance of a building or other finite location (e.g, geofence of 7 to 50 meters from building/location boundary, depending on location ‘footprint’ and urban/suburban/exurban density considerations). Phone WIFI presence could work here.
  • Near Premises: Within some end user definable distance as ‘near’, in order to identify when a person is approaching/leaving home for purposes of HVAC control, outside light control, setting security system mode, etc. There could be multiple geofences of differing distances for different purposes (as HVAC control may need more time to ramp up, as one example) 0.5 to 3 kms might be such example distances, with the aforementioned urban/suburban/exurban considerations. Owntracks or other solutions could work here
  • Away: Anything considered beyond ‘Near Premises’. Owntracks or similar could work well here. There could also be multiple such levels, if purposes warrant.

So Presence could be an object with the attributes 'location" and “time”, with the location attribute defined by rules that focused on the most granular location systems first per their availability.

Timeliness is another important aspect, as different User Stories have differing needs. Knowing the presence of a person with respect to whole house HVAC or security mode settings only requires knowing within a 10-20 seconds that a person has entered or exited a zone. Lighting or ‘following’ music, as two examples, would be expected to react within 1-2 seconds. Zone/room HVAC would be expected to react within 5-10 seconds, though behavior interpretation via video analytics (such as recognizing that a person just sat down) would be highly preferable to preclude starting up a system to respond to a person who walks into a room, picks up something, then leaves (which has obvious HVAC efficiency penalties). One could take this to extremes, of course, so it goes without saying that understanding the actual need should drive any system analysis of alternatives and corresponding architecture.

Hence, “Best Presence Detection” may likely be a combination of techniques tailored to the specific circumstances and objectives.

(have created a new thread for purposes of the larger context of Presence discussion)

1 Like

hi, I have got the script installed, ESP device working, listing clients and beacons,Have seen the Connecting to MQTT on the Serial console, mosquitto installed, MQTT failed with state -2, im guessing user/pass, not that ive seen them in the .ino, comments appreciated

Yeah that’s what its usually been whenever I’ve seen that error. As long as you’ve got your mqtt broker set to require a password, the mqtt .connect function in your arduino sketch should take username and password arguments from memory.

Did you make the non sensitive parts of this code available ?

Hi guys, I was also using Andreas’ version of the wifi sniffer. I couldn’t get it to work stable (crashes) on my esp so I made some changes to the code.
For me personally it was also a nice small project to test developing something on a ESP using platformio/vscode.

Because it is running stable for a couple of months now on two ESP’s I decided to push the code to github.
Maybe it is also useful for somebody else.

3 Likes

Hi @normaniac,

I’m not sure how I should configure this self defined URL. As of this moment I wrote a simple PHP script which does return the post request. this is stored in a free webhosting environment. When testing webhook posting in Geofency I do get a message that it was succesful, along with correct data. This data however is not present on my website. What did you use to store the webhook’s data?

kind regards

So a general question on presence that I’m struggling to find a neat solution too.

I have motion sensors, cameras, Bluetooth beacons, phones etc - like everyone else.

I’m trying to create a simple ‘generic’ set of rules for presence, ie ones that don’t require me to have to put specific apps on phones or spend 5 minutes adding a devise ip / Mac to my router when a guest arrives etc etc etc.

I get the wasp in a box methodology and see a lot of benefit in it from a ‘someone must be home’ point of view but how do people determine between a family member / guest / unwanted guest? For example if I assume front door sensor opening and movement in my hallway is someone home, surely it could be a burglar, and all my system has done is unarm everything and even turn the lights on for him if it’s dark…might as well get it to roll a red carpet out!

What logic do people add to negate this?

I have static DHCP leases for my “authorized” people, it does stink if they change phones as you have to maintain this until the end of time; however they are members of groups and based on that the house can be “armed/unarmed” and notifications can be sent out based on what you want to know about happening.

I took this approach with some family members who are left in charge of my house and I like knowing their coming and goings without them having to send me updates; as one time I discovered the person in charge went all the way back home and back to my house without notifying me. I wasn’t upset as they are an adult but at the same time I wasn’t thrilled they left for two plus hours without an FYI.

I’m going to be putting in a rule soon for my door/light rules to be sent a telegram if my “armed” system has a sensor updated when no one is supposed to be home; just never seem to have enough time or brain power by the time I get to do things I want to do. :confused:

If security is your top priority, then I would suggest that your alarm system should be manually armed and disarmed, rather than automated for convenience. Then, your only concern is that all of your family members (and guests, when necessary) know how to arm/disarm the system. It reduces the highly unpredictable human element to a single variable, and doesn’t require anyone to always remember their phone, tag, or whatever else they need to have on their person to identify themselves as coming or going. More importantly, it reduces the risk that the alarm won’t go off when an intruder breaks in due to some unforeseen set of conditions.

Also, I like knowing when I’m in the house that the alarm is definitely off, and won’t accidentally sound off due a perfect storm of presence-detection failures.

1 Like