-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
34 lines (29 loc) · 1.01 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const ControlMySpa = require('./controlmyspa');
const spa = new ControlMySpa('[email protected]', 'password'); // uses celsius
// let spaFahrenheit = new ControlMySpa("[email protected]", "password", false);
spa.init().then(result => {
if (result) {
console.log('Spa init success.');
spa.waitForResult = true;
console.log(JSON.stringify(spa.currentSpa));
// available function calls
spa.getSpa(); // refresh values for spa
spa.toggleHeaterMode();
spa.setTemp(38.5);
spa.setTempRangeHigh();
spa.setTempRangeLow();
spa.setTime("24/01/2024/", "23:11", true) // true for 24H time format, false for 12 hour clock, default true
spa.lockPanel();
spa.unlockPanel();
spa.setJetState(0, 'OFF'); // "OFF"/"HIGH"
spa.setBlowerState(0, 'HIGH'); // "OFF"/"HIGH"
spa.setLightState(0, 'HIGH'); // "OFF"/"HIGH"
spa.setFilterCycleIntervalSchedule(
0,
spa.scheduleFilterIntervalEnum.i9hours30minutes,
'20:00'
);
} else {
console.log('Spa init failed.');
}
});