Coder Social home page Coder Social logo

home-assistant-padavan-tracker's Introduction

Home Assistant Padavan Device Tracker

hacs_badge

This device tracker component allows you to get wireless devices presence from Padavan-based routers.

Devices support:

  • tested on Xiaomi MiWiFi Mini Router with Padavan 3.4.3.9-099_195eba6
  • reported working on Asus N56U Router with Padavan 3.4.3.9-099

Probably need additional changes to make it work on other devices.

Purpose

Detect ANY Wi-Fi clients (=Android/iOS/Windows Phone smartphones...) with 100% accuracy at any time moment.

Why not ...?

  • Nmap - mobile devices (Nexus 5X, iPhones) can go to a deep sleep so nmap can send dozen different packages and get nothing. It's very unreliable. You need at least 3 minutes to understand client is really offline and not ignoring your requests.
  • OpenWrt luci - can't check, but from source code it checks ARP table which is totally wrong, because it doesn't remove client immediately after disconnect.
  • OpenWrt ubus - looks promising, but doesn't exist in Padavan firmware out of the box.
  • Xiaomi - works like this solution (=perfectly), but only in router mode. Padavan tracker works in AP mode too.

Installation (Xiaomi MiWiFi Mini Router only)

  1. Download stock Xiaomi dev firmware http://www1.miwifi.com/miwifi_download.html.
  2. Flash it via web interface.
  3. Install Android app (ru, en).
  4. Attach router to your Mi account.
  5. Download ssh unlock firmware http://d.miwifi.com/rom/ssh, remember login/pass - it's ssh credentials.
  6. Put it on USB FAT32 stick:
    1. Turn on Router while reset-button pressed and USB stick plugged in
    2. Release Reset-button after the orange LED starts flashing
    3. Wait a minute to complete flashing and device is online again (shown by blue LED)
  7. Check SSH to your device.
  8. Go to http://prometheus.freize.net/index.html:
    1. Download utility.
    2. Build Toolchain.
    3. Build Firmware.
    4. Flash Firmware.
    5. Flash EEPROM.
  9. Add the following lines to the configuration.yaml:
device_tracker:
  - platform: padavan_tracker
    consider_home: 10
    interval_seconds: 3
    url: http://192.168.1.1/ # web interface url (don't forget about `/` in the end)
    username: admin # Web interface user name
    password: admin # Web interface user pass

Notes

  • Sometimes/most of the time web interface will be inaccessible while this component is working. That's because Padavan firmware doesn't allow >1 users authorized from different IPs. Check the possible workaround for this.

Useful links

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.