Apple Home
Reset pairing
POST
/api/homekit/resetAdmin. Needs an unlock token (
x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.Forgets every paired controller and makes a new identity and setup code. Then remove the old Tempolight from the Home app.
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 -X POST 'http://localhost:8080/api/homekit/reset'const res = await fetch("http://localhost:8080/api/homekit/reset", {
method: "POST",
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"http://localhost:8080/api/homekit/reset",
)
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."
}