Apple Home
Get the HomeKit bridge
GET
/api/homekitAdmin. Needs an unlock token (
x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.Whether the bridge is on, its setup code and QR code address, and the paired controllers.
Responses
200OKapplication/json
enabledbooleanstatestringOne of
"off" "starting" "ready" "error"errorstring | nullmdnsErrorstring | nullportinteger | nullnamestringdeviceIdstringpairedbooleansetupCodestringsetupUristringX-HM://…, for the QR code.
pairingsobject[]accessoriesinteger403Locked, or not allowed.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
Request
curl 'http://localhost:8080/api/homekit'const res = await fetch("http://localhost:8080/api/homekit");
const data = await res.json();
console.log(data);import requests
res = requests.get(
"http://localhost:8080/api/homekit",
)
print(res.json())Response
{
"enabled": true,
"state": "ready",
"error": null,
"mdnsError": null,
"port": 51826,
"name": "Tempolight 3F2A",
"deviceId": "3F:2A:10:C4:9B:E1",
"paired": false,
"setupCode": "123-45-678",
"setupUri": "X-HM://0023ISYWY3F2A",
"pairings": [],
"accessories": 7
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}