Updated Readme / Added EggTimer Support (#25)

* added setCircuitRuntimeById function
This commit is contained in:
Bruce Sheplan
2020-06-06 18:55:07 -05:00
committed by Parnic
parent 9c72e7b61d
commit c1ceacbd98
4 changed files with 94 additions and 0 deletions

View File

@ -249,6 +249,10 @@ class UnitConnection extends EventEmitter {
dayMask, flags, heatCmd, heatSetPoint).toBuffer());
}
setCircuitRuntimebyId(circuitId, runTime) {
this.client.write(new messages.SLSetCircuitRuntimeById(circuitId, runTime).toBuffer());
}
onClientMessage(msg) {
// console.log('received message of length ' + msg.length);
if (msg.length < 4) {
@ -321,6 +325,9 @@ class UnitConnection extends EventEmitter {
case messages.SLSetScheduleEventById.getResponseId():
this.emit('setScheduleEventById', new messages.SLSetScheduleEventById(msg));
break;
case messages.SLSetCircuitRuntimeById.getResponseId():
this.emit('setCircuitRuntimebyId', new messages.SLSetCircuitRuntimeById());
break;
case 13:
// console.log(" it's a login failure.");
this.emit('loginFailed');