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"},
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