KaZa Home automation

Home automation

TP-Link Wi-Fi access point

TP-Link Wi-Fi access point

Package kaza-wifiap, module org.kazoe.wifiap. Lists the devices connected to a TP-Link access point (web UI status.client.user.json): useful for presence detection. Experimental: only the author's model is tested.

import org.kazoe.wifiap 1.0

WifiAp {
    id: ap
    hostAddress: "192.168.1.2"
    login: "admin"
    password: "secret"
    refreshRate: 30
    onDevicesChanged: console.log(ap.devices.length, "devices")
}
Property Description
hostAddress, login, password Access point and web UI credentials
refreshRate Seconds, 0 = manual
devices List of maps: hostname, mac, ip, ssid, radio, rssi, rate, down, up, activeTime
connected, lastError Status

refresh() forces an update. The session cookie is reused and renewed transparently.

Presence example

KaZaObject { id: phone; name: "presence.fabien" }
Connections { target: ap; function onDevicesChanged() {
    phone.value = ap.devices.some(d => d.mac === "AA:BB:CC:DD:EE:FF") } }

Security

HTTP only: the password is sent unencrypted. Trusted network only.