8
index.js
8
index.js
@ -206,6 +206,10 @@ class UnitConnection extends EventEmitter {
|
||||
this.client.write(new messages.SLSetCircuitStateMessage(controllerId, circuitId, circuitState).toBuffer());
|
||||
}
|
||||
|
||||
setSetPoint(controllerId, bodyType, temperature) {
|
||||
this.client.write(new messages.SLSetHeatSetPointMessage(controllerId, bodyType, temperature).toBuffer());
|
||||
}
|
||||
|
||||
onClientMessage(msg) {
|
||||
// console.log('received message of length ' + msg.length);
|
||||
if (msg.length < 4) {
|
||||
@ -247,6 +251,10 @@ class UnitConnection extends EventEmitter {
|
||||
// console.log(" it's circuit toggle ack");
|
||||
this.emit('circuitStateChanged', new messages.SLSetCircuitStateMessage());
|
||||
break;
|
||||
case messages.SLSetHeatSetPointMessage.getResponseId():
|
||||
// console.log(" it's a setpoint ack");
|
||||
this.emit('setPointChanged', new messages.SLSetHeatSetPointMessage());
|
||||
break;
|
||||
case 13:
|
||||
// console.log(" it's a login failure.");
|
||||
this.emit('loginFailed');
|
||||
|
Reference in New Issue
Block a user