At home or not at home problem

Hi,

i have tried different ways to check if someone is at home or away. all ways are not working fine:

  • device tracker via ping to mobile device ip
  • mobile app device tracker
  • nmap device tracker

all three ways are showing not the correct status. sometimes it shows away when i am at home and sometimes not.

is there a way to do that working to 100%? i have a nokia 7.2 and a samsung a520 handy and a easybox from vodafone.

greetings

Well, if your phone does not respond to a ping, there is either a problem with your phone or with your network…

I would seriously check that ….

Modern phones will turn off the WiFi when in deep sleep.

I find that monitor, which uses Bluetooth, is the most reliable method. The mobile app works well if you use the value of the WiFi SSID rather than the device tracker.

Hi,

ssid is a very good idea. how do i configure that?

I can recommend to combine two sensors, one network based and one gps based (companion app) in a person entity.
They are almost never both wrong at the same time.
I actually use the SSID as the network based device tracker, by switching a “dummy device” state through an automation:

  - id: presence_set
    alias: presence_set
    mode: restart
    trigger:
      - platform: state
        entity_id: 
          - sensor.seanpixel3a_wlan_verbindung
          - device_tracker.seanpixel3a
      - platform: homeassistant
        event: "start"
    action:
      - choose:
          - conditions:
              - "{{states('sensor.seanpixel3a_wlan_verbindung') == 'SSID'}}"
            sequence:  
              - service: device_tracker.see
                data:
                  dev_id: sean_dummy
                  location_name: "home"
          - conditions: 
              - "{{states('sensor.seanpixel3a_wlan_verbindung') != 'SSID'}}"
              - "{{states('device_tracker.seanpixel3a') != 'home'}}"
            sequence:
              - service: device_tracker.see
                data:
                  dev_id: sean_dummy
                  location_name: "not_home"

This would need a customization, te be recognized as a network based device_tracker:

homeassistant:
  customize:
    device_tracker.seanpixel3a_dummy:
      source_type: router

Thanks for sharing!
This works indeed more precise. :+1:

1 Like