Giter Site home page Giter Site logo

dnschnur / iphonedetect Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mudape/iphonedetect

0.0 0.0 0.0 73 KB

A custom component for Home Assistant to detect iPhones connected to local LAN, even if the phone is in deep sleep.

License: MIT License

Python 100.00%

iphonedetect's Introduction

hacs_badge GitHub release

iPhone Detect

This integration sends a message to the defined hosts on UDP port 5353.
The iPhone responds, even when in deep sleep, and an entry in the ARP cache is made .

Uses Home Assistant's device_tracker and idea/script from return01

Only IP addresses will work, no hostnames!
You have to assign a static IP address(es) to your iPhones, probably in your router.

The interval_seconds time must be shorter than the timeout in which the ARP cache is cleared (usally 15-45sec), or the phone will be marked not_home. So, leave it at the default value (12sec) or make it shorter.

Buy Me A Coffee

Example configuration.yaml

device_tracker:
  - platform: iphonedetect
    consider_home: 60
    scan_interval: 12
    new_device_defaults:
      track_new_devices: true
    hosts:
      hostname1: 192.168.0.17
      hostname2: 192.168.0.24

This will create device_tracker.hostname1 and device_tracker.hostname2 once the devices have been detected on your network.
(Re)start the Wi-Fi on your device/phone to trigger their creation on first run.

Note
If you have track_new_devices: false (in this or any integrations specified before this) for the device_tracker component you need to manually change track: to true for each device in known_devices.yaml
(see component settings for device_tracker)

hostname1:
  icon:
  mac:
  name: hostname1
  picture:
  track: true

iphonedetect's People

Contributors

davidfw1960 avatar gerard33 avatar mudape avatar spideyfusion avatar systemcrash avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.