forked from coolchip/luxtronik2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.js
More file actions
29 lines (27 loc) · 663 Bytes
/
example.js
File metadata and controls
29 lines (27 loc) · 663 Bytes
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
const luxtronik = require('./luxtronik');
const pump = luxtronik.createConnection('127.0.0.1', 8888);
pump.read(function (err, data) {
if (err) {
return console.log(err);
}
console.log(data);
console.log(data.values.errors);
});
/*
pump.write('heating_target_temperature', 0, function (err, data) {
if (!err) {
console.log(data);
}
});
pump.write('warmwater_target_temperature', 60);
pump.write('heating_operation_mode', 0, function (err, data) {
if (!err) {
console.log(data);
}
});
pump.write('warmwater_operation_mode', 0, function (err, data) {
if (!err) {
console.log(data);
}
});
*/