Git Product home page Git Product logo

home-assistant-tenda-tracker's Introduction

Tenda AC23 Router Device Tracker

Adds device tracking support for Tenda AC23 to Home Assistant.

Setup Process

  1. Install using HACS or manually copy the files
  2. Add tenda_tracker to your configuration.yaml
  3. Restart Home Assistant

Step 1: Installation

Installation with Home Assistant Community Store (HACS)

For easy updates whenever a new version is released, use the Home Assistant Community Store (HACS) and add the following Integration in the Settings tab:

sakowicz/home-assistant-tenda-tracker

Step 2: Add Tracker to Home Assistant's Configuration

Now that that installation and authentication are done, all that is left is to add the device_tracker to your configuration.yaml.

The minimum required configuration:

device_tracker:
  - platform: tenda_tracker
    host: 192.168.1.1
    password: <password to admin panel>

Step 3: Restart and Test

You should see new devices in your entities. Their names will appear as you configured them before in Tenda admin panel or as their hostname or mac address. You can manipulate them in known_devices.yaml.

Disclamer

I am not a python developer so code can be not as clean as I would want to. Feel free to contribute and do refactor!

home-assistant-tenda-tracker's People

Contributors

sakowicz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

kmb36td

home-assistant-tenda-tracker's Issues

/goform/GetIpMacBind

Hi, i have the Tenda TX3 router. The plugin also works on this router. However, the goform page is not the right one. The /goform/getOnlineList shows all devices that are known to the router, so all devices are online.
The devices that are online are displayed on the goform/GetIpMacBind page. There is an entry "status", which is 0 or 1.
I have tried to adapt the script to this, but I fail. All devices are displayed as offline.
Could you change the script to this page?

{"lanIp":"192.168.1.35","lanMask":"255.255.255.0","dhttpIP":"0.0.0.0","dhcpClientList":[{"ipaddr":"192.168.1.217","macaddr":"02:xxxxx:97","devname":"homeassistant","status":"1"}, {"ipaddr":"192.168.1.225","macaddr":"14:xxxxx:26","devname":"CoreELEC","status":"1"}, {"ipaddr":"192.168.1.125","macaddr":"30:xxxxx:e1","devname":"HF-LPB130","status":"1"}, {"ipaddr":"192.168.1.139","macaddr":"98:xxxxx:ae","devname":"HF-LPB130","status":"1"}],"bindList":[{"ipaddr":"192.168.1.252","macaddr":"b8:xxxxxxx:60","devname":"klipper","status":"1"}, {"ipaddr":"192.168.1.200","macaddr":"60:xxxxxxx:5c","devname":"Licht","status":"1"}, {"ipaddr":"192.168.1.201","macaddr":"3c:xxxxxx:76","devname":"Lampe","status":"1"}, {"ipaddr":"192.168.1.202","macaddr":"70:xxxxxxx:b9","devname":"Steckdose","status":"1"}, {"ipaddr":"192.168.1.165","macaddr":"bc:xxxxxxx:8d","devname":"Mi9TPro","status":"1"}, {"ipaddr":"192.168.1.142","macaddr":"08:xxxxxxx:6c","devname":"iPhone","status":"0"}, {"ipaddr":"192.168.1.101","macaddr":"0c:xxxxxxx:86","devname":"AMD-Ryzen5","status":"1"}, {"ipaddr":"192.168.1.36","macaddr":"da:xxxxxx:70","devname":"pihole","status":"1"}, {"ipaddr":"192.168.1.108","macaddr":"00:xxxxxxx:c2","devname":"DS216j","status":"1"}, {"ipaddr":"192.168.1.106","macaddr":"6a:xxxxxxx:00","devname":"fhem","status":"0"}, {"ipaddr":"192.168.1.107","macaddr":"a8:xxxxxxx:e3","devname":"Meins Box","status":"1"},

[code]
for device in json_response:
mac = None
name = None
online = None

        if "macaddr" in device:
            mac = device.get("macaddr")

        if "devname" in device:
            name = device.get("devname")

        if "status" in device:
            online = device.get("status")

        if mac is not None and name is not None and online is "1":
                devices[mac] = name

    return devices

[/code]

Many thanks

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.