/zte-zxhn-h268a-presence-detection

Home Assistant presence detection module for ZTE ZXHN h268a

Primary LanguagePython

ZTE ZXHN h268a presence detection

This is a Device Tracker for Home Assistant. Currently in its early infancy.

Feedback and bug reports welcome. PRs even more welcome.

This device tracker

  • Connects to a local ZTE router over HTTP
  • Lists currently connected lan and wlan devices
    • about half the time
    • consistently
  • Supports basic configuration options (password, host, etc.)
  • Uses a continuous integration tool for unit testing and linting
  • Has the core communications library properly detached from the Home Assistant component
  • Has reliable, debuggable log output and error handling
  • Has adequate unit test coverage
  • Is ready for submission to the Home Assistant project

So there are still several things to do.

Using this device tracker

This device tracker is still a proof of concept for now, so don't hold your breath.

You can follow the dev docs for help on how to load custom components. But the short version is:

  1. Clone this repository into your Home Assistant's "custom_components" directory.
  2. Add the ZTE platform as a Device Tracker component

For example, I would do this:

cd /home/homeassistant/.homeassistant
mkdir -p custom_components
cd custom_components
git clone https://github.com/TassSinclair/zte-zxhn-h268a-presence-detection zte

And then, inside configuration.yml, add something like:

device_tracker:
  - platform: zte
    password: !secret zte_password
    host: 10.0.0.1

(with zte_password defined in your secrets.yml, of course)