High-level command implementation for Nefit Easy™.
Use this library in moderation: don't flood the backend with new connections made every X seconds. Instead, if you want to poll the backend for data, create a connection once and reuse it for each command. In the end, it's your own responsibility to not get blocked because of excessive (ab)use.
$ npm i nefit-easy-commands
const NefitEasyClient = require('nefit-easy-commands');
const client = NefitEasyClient({
serialNumber : NEFIT_SERIAL_NUMBER,
accessKey : NEFIT_ACCESS_KEY,
password : NEFIT_PASSWORD,
[ requestTimeout : Number ]
});
client.status() : Promise
client.pressure() : Promise
client.location() : Promise
client.program() : Promise
client.userMode() : Promise
client.setUserMode(value : String) : Promise
value
should be one of manual
/clock
.
client.setTemperature(value : [Number|String]) : Promise
value
can be prefixed with a specifier to conditionally set the temperature if it doesn't match the specifier.
Valid specifiers:
>
: only set new temperature if it's larger then the currently set temperature;<
: only set new temperature if it's smaller than the currently set temperature;
Example: "Set the thermostat to 21°C, but only if it's not already set higher than that."
client.setTemperature('> 21').then(...)