Device Tracker: Xiaomi MiWifi Mini
Hi, I have one Xiaomi router, to get the list of devices in home, I can make a GET request to:
http :// CONF_HOST/cgi-bin/luci/;stok=CONF_STOK/api/misystem/devicelist
example:
http :// 192.168.10.1/cgi-bin/luci/;stok=fe61dd1f6ce1e36734a4f5f1b92b38cb/api/misystem/devicelist
you can help me to fork components/device_tracker/ubus.py or similar to use this json?
The JSON result is like this:
{
"code": 0,
"list": [{
"authority": {
"admin": 1,
"lan": 0,
"pridisk": 0,
"wan": 1
},
"icon": "device_list_mi.png",
"ip": [{
"active": 1,
"downspeed": "35",
"ip": "192.168.10.150",
"online": "35033",
"upspeed": "19"
}],
"isap": 0,
"mac": "28:6C:07:10:C3:46",
"name": "yeelink-light-color1_miio48230235",
"oname": "yeelink-light-color1_miio48230235",
"online": 1,
"parent": "",
"push": 0,
"statistics": {
"downspeed": "35",
"online": "35033",
"upspeed": "19"
},
"times": 0,
"type": 1
}, {
"authority": {
"admin": 1,
"lan": 0,
"pridisk": 0,
"wan": 1
},
"icon": "device_list_samsung.png",
"ip": [{
"active": 1,
"downspeed": "0",
"ip": "192.168.10.175",
"online": "28728",
"upspeed": "0"
}],
"isap": 0,
"mac": "64:B8:53:AA:EB:95",
"name": "android-2dbd236c77d2d5dd",
"oname": "android-2dbd236c77d2d5dd",
"online": 1,
"parent": "",
"push": 1,
"statistics": {
"downspeed": "0",
"online": "28728",
"upspeed": "0"
},
"times": 0,
"type": 1
}, {
"authority": {
"admin": 1,
"lan": 0,
"pridisk": 0,
"wan": 1
},
"icon": "device_list_mi.png",
"ip": [{
"active": 1,
"downspeed": "0",
"ip": "192.168.10.198",
"online": "2074",
"upspeed": "0"
}],
"isap": 0,
"mac": "28:6C:07:11:D4:76",
"name": "yeelink-light-color1_miio48238731",
"oname": "yeelink-light-color1_miio48238731",
"online": 1,
"parent": "",
"push": 0,
"statistics": {
"downspeed": "0",
"online": "2074",
"upspeed": "0"
},
"times": 0,
"type": 1
}, {
"authority": {
"admin": 1,
"lan": 1,
"pridisk": 0,
"wan": 1
},
"icon": "device_list_mi.png",
"ip": [{
"active": 1,
"downspeed": "0",
"ip": "192.168.10.210",
"online": "2735",
"upspeed": "0"
}],
"isap": 0,
"mac": "74:23:44:EA:22:58",
"name": "Redmi3-GustavoUNO",
"oname": "Redmi3-GustavoUNO",
"online": 1,
"parent": "",
"push": 0,
"statistics": {
"downspeed": "0",
"online": "2735",
"upspeed": "0"
},
"times": 0,
"type": 1
}, {
"authority": {
"admin": 1,
"lan": 0,
"pridisk": 0,
"wan": 1
},
"icon": "",
"ip": [{
"active": 1,
"downspeed": "38",
"ip": "192.168.10.101",
"online": "35033",
"upspeed": "81"
}],
"isap": 0,
"mac": "28:D9:8A:05:35:CE",
"name": "28:D9:8A:05:35:CE",
"oname": "28:D9:8A:05:35:CE",
"online": 1,
"parent": "",
"push": 0,
"statistics": {
"downspeed": "38",
"online": "35033",
"upspeed": "81"
},
"times": 0,
"type": 1
}, {
"authority": {
"admin": 1,
"lan": 0,
"pridisk": 0,
"wan": 1
},
"icon": "device_list_mi.png",
"ip": [{
"active": 1,
"downspeed": "0",
"ip": "192.168.10.173",
"online": "35033",
"upspeed": "0"
}],
"isap": 0,
"mac": "28:6C:07:10:AA:5D",
"name": "yeelink-light-color1_miio48227954",
"oname": "yeelink-light-color1_miio48227954",
"online": 1,
"parent": "",
"push": 0,
"statistics": {
"downspeed": "0",
"online": "35033",
"upspeed": "0"
},
"times": 0,
"type": 1
}, {
"authority": {
"admin": 1,
"lan": 0,
"pridisk": 0,
"wan": 1
},
"icon": "device_list_mi.png",
"ip": [{
"active": 1,
"downspeed": "29",
"ip": "192.168.10.105",
"online": "35033",
"upspeed": "0"
}],
"isap": 0,
"mac": "28:6C:07:10:BE:E1",
"name": "yeelink-light-color1_miio48233206",
"oname": "yeelink-light-color1_miio48233206",
"online": 1,
"parent": "",
"push": 0,
"statistics": {
"downspeed": "29",
"online": "35033",
"upspeed": "0"
},
"times": 0,
"type": 1
}, {
"authority": {
"admin": 1,
"lan": 0,
"pridisk": 0,
"wan": 1
},
"icon": "device_list_mi.png",
"ip": [{
"active": 1,
"downspeed": "0",
"ip": "192.168.10.124",
"online": "35033",
"upspeed": "0"
}],
"isap": 0,
"mac": "F0:B4:29:B4:4D:32",
"name": "lumi-gateway-v3_miio45844807",
"oname": "lumi-gateway-v3_miio45844807",
"online": 1,
"parent": "",
"push": 0,
"statistics": {
"downspeed": "0",
"online": "35033",
"upspeed": "0"
},
"times": 0,
"type": 1
}, {
"authority": {
"admin": 1,
"lan": 0,
"pridisk": 0,
"wan": 1
},
"icon": "",
"ip": [{
"active": 1,
"downspeed": "0",
"ip": "192.168.10.205",
"online": "34817",
"upspeed": "0"
}],
"isap": 0,
"mac": "AC:63:BE:DE:F7:9F",
"name": "kindle-8d5c5ea15",
"oname": "kindle-8d5c5ea15",
"online": 1,
"parent": "",
"push": 0,
"statistics": {
"downspeed": "0",
"online": "34817",
"upspeed": "0"
},
"times": 0,
"type": 1
}, {
"authority": {
"admin": 1,
"lan": 0,
"pridisk": 0,
"wan": 1
},
"icon": "",
"ip": [{
"active": 1,
"downspeed": "25",
"ip": "192.168.10.199",
"online": "1119",
"upspeed": "25"
}],
"isap": 0,
"mac": "80:A5:89:81:A2:C3",
"name": "Unknown",
"oname": "Unknown",
"online": 1,
"parent": "",
"push": 0,
"statistics": {
"downspeed": "25",
"online": "1119",
"upspeed": "25"
},
"times": 0,
"type": 1
}, {
"authority": {
"admin": 1,
"lan": 0,
"pridisk": 0,
"wan": 1
},
"icon": "",
"ip": [{
"active": 1,
"downspeed": "0",
"ip": "192.168.10.238",
"online": "35033",
"upspeed": "0"
}],
"isap": 0,
"mac": "B8:27:EB:C3:53:C6",
"name": "HA",
"oname": "raspberrypi",
"online": 1,
"parent": "",
"push": 0,
"statistics": {
"downspeed": "0",
"online": "35033",
"upspeed": "0"
},
"times": 0,
"type": 0
}, {
"authority": {
"admin": 1,
"lan": 0,
"pridisk": 0,
"wan": 1
},
"icon": "",
"ip": [{
"active": 1,
"downspeed": "306",
"ip": "192.168.10.201",
"online": "721",
"upspeed": "243"
}],
"isap": 0,
"mac": "94:65:9C:9F:A1:00",
"name": "uno-xps",
"oname": "uno-xps",
"online": 1,
"parent": "",
"push": 1,
"statistics": {
"downspeed": "306",
"online": "721",
"upspeed": "243"
},
"times": 0,
"type": 2
}],
"mac": "94:65:9C:9F:A1:00"
}