Home Assistant Padavan Device Tracker
This device tracker component allows you to get wireless devices presence from Padavan-based routers.
Tested on Xiaomi MiWiFi Mini Router with Padavan 22.214.171.124-099_195eba6. Probably need additional changes to make it work on other devices.
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)
- Download stock Xiaomi dev firmware http://www1.miwifi.com/miwifi_download.html.
- Flash it via web interface.
- Install Android app (ru, en).
- Attach router to your Mi account.
- Download ssh unlock firmware http://d.miwifi.com/rom/ssh, remember login/pass - it's ssh credentials.
- Put it on USB FAT32 stick:
- Turn on Router while reset-button pressed and USB stick plugged in
- Release Reset-button after the orange LED starts flashing
- Wait a minute to complete flashing and device is online again (shown by blue LED)
- Check SSH to your device.
- Go to http://prometheus.freize.net/index.html:
- Download utility.
- Build Toolchain.
- Build Firmware.
- Flash Firmware.
- Flash EEPROM.
- Add the following lines to the
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
- 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.