Switch the fan
POST
/api/v1/fan
const url = 'http://pwrman.local/api/v1/fan';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"on":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://pwrman.local/api/v1/fan \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "on": true }'{"on": true} or {"on": false} holds the fan on or off.
{"mode": "auto"} hands it back to the automatic rules. Saved, and
applied at once. With the fan held off it still starts when a
blade gets too warm.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Done.
Media typeapplication/json
object
ok
required
boolean
Example
{ "ok": true}The token is missing or wrong, or no token is set yet.
Media typeapplication/json
object
error
required
Why the request was refused, in words.
string
Examples
{ "error": "bearer token required"}{ "error": "no API token set yet: finish first-time setup first"}The controller is busy with another request. Try again.
Media typeapplication/json
object
error
required
Why the request was refused, in words.
string
Example
{ "error": "busy, retry"}USB Type-C® and USB-C® are registered trademarks of USB Implementers Forum.