Device Tracker component for D-Link Routers

Can somebody please add support for Device Tracker component for D-Link Routers.
I have an TP-Link TL-WR703N Micro Router running DD-WRT, but the wireless signal keeps dropping out, so I would like to rather do the tracking with my D-Link DSL-2750U ADSL Router.

Kind Regards,
Riaan

I thought to make a plugin for D-Link support but I have spoken to them and they have no public API for this purpose.

In the end, I used nmap scanner for it.

Thank you for trying. I will try to implement NMAP.

Could the HNAP soap webservices be used for some of the DLink Routers. I believe my Dir-880L and Dir-859 support the HNAP protocols.

You can get the list of services by visiting the http://routerip/HNAP1

It may be at least a way to get stats about the router. Some services seem interesting such as the following.
http://purenetworks.com/HNAP1/Reboot
http://purenetworks.com/HNAP1/GetConnectedDevices
http://purenetworks.com/HNAP1/GetNetworkStats
http://purenetworks.com/HNAP1/IsDeviceReady
http://purenetworks.com/HNAP1/GetClientStats

This service allows one to run a shell script to reboot the router. perhaps with this knowledge someone can build a service that actually connects to the routers that are compatible and allow for some services. Its a shell script and didn’t run on Hass.io but if it can be adapted and extended on python it may be a good way.

I have a D-link DIR-825 router.
Tried to access “/HNAP1/” but it is 404.

The router does have telnet, so if I telnet into the router and then

iwlist wlan0 ap
iwlist wlan1 ap

I get the list of connected clients.
Is there something ready that can make a telnet connection, run the commands and return the list of devices to ha?

Ideas?

Arik.

I made a custom component to query a d-link ap/router for who is connected to the wireless interface.

Feedback is welcome.

i made a custom component to query dlink router/aps using the hnap protocoll (cuz my router does not support telnet)

Can I know how to install this device tracker into home assistant. Thanks.

Either manually:

or first install https://hacs.xyz/ manually and then you will be able to install components from HACS automatically.

What is telnet and how to I enable it? I cant seem to find anything on google

Hi, my D-Link router have telnet enabled and I can access into router by telnet protocol.

Now I use a WiFi tracker but works only for connected interface/smartphone (WiFi) and no outdoor (maybe I’ve to buy nabucasa…)
I would try to enable a device tracker using Mac address, I added this to config…yaml

device_tracker:
  - platform: dlink_presence
    host: 192.168.1.1 # ap
    username: admin
    password: !secret ap_password

Now, please help me (I’m a newbie :grin:) where I can read Mac address of connected interface of my dlink?

What I can do to setup a Mac address device tracker for every known smartphone?

Many thanks @ all

did you install the device tracker from https://github.com/ayavilevich/homeassistant-dlink-presence ?

of course, then added this code in config…yaml

  # dlink device mac tracker
device_tracker:
  - platform: dlink_presence
    host: 192.168.1.1
    username: admin
    password: !secret ap_password

AP/router password added in secrets.yaml

now what I’ve to do?

thanks

I think my dlink isn’t compatible with integration :slight_smile:


telnet → iwlist → unknown command

if i send “show” router show command accepted
show hosts → maybe works

and this is the results of telnet command: show hosts
can I write first value (mac address) in a sensor to make a tracker? many thanks