WiFi presence detection using Android Companion app

Hi!

I have a (so far) working GPS Presence detector simply with the Android companion, but I’d love to have a WiFi SSID connected detector too. The reason is because I want GPS to arm and disarm my Fibaro devices when I am at a distance from home and WiFi to turn off heat and lights right away.

I managed to create an Automation for GPS and Fibaro arming devices, but not yet for WiFi connected.

I have searched and not found any recent discussions on this…

…and I think I’m just missing some small details to make it work very simply.

Attached is some screenshots of how far I have gotten. I could grind through this and guess everything but it would be faster if I got help thank you :slight_smile:

Also interested in how people are doing this now. I still think (as you linked to my old topic) this should be built into the device tracker for the app.

I got this far. I guess we need a State trigger wifi disconnected :sob:

Don’t post screenshots of your code attempts. Post properly formatted yaml.

It helps us to help you without the need to write everything out manually. it’s easier to just copy/edit/paste the code text (and it’s easier to read than looking at a itty bitty picture…).

I did it! With Tasker… Here is what I did (sorry screenshots are all I have =)

I followed this (nice screenshots)

And used some old knowledge I had to avoid WiFi bouncing (tasker waits for a while to make sure wifi is still off after a few seconds).

2 Likes

Using a template binary sensor you can include both your GPS device tracker and the WIFI connected sensor into one home/away sensor. This is a very basic presence detection but I believe it would accomplish what you want.

You could also use ping, nmap device tracking to similar effect. Some routers such as Unifi AP’s also have device tracking integrations.

template:
  - binary_sensor:    
      - unique_id: klumpo_is_home
        name: Klumpo Is Home
        state: >
          {{ is_state('sensor.klumpo_wifi_connection','<MYSSIDXXX>')
              or is_state('device_tracker.mobile_app_klumpo','home') }}

Now your automation triggers are as simple as this.

trigger:
  - platform: state
    entity_id: binary_sensor.klumpo_is_home
    to: 'on'
6 Likes

Thanks for the ideas. I wanted to be able to feed this into the person.xxxx entity which will only accept device trackers so I fed a binary sensor like the above into the composite trackers custom component. Seems to be working well and better than using the bluetooth detection that I was using before.