Added ability to set pool or spa heat setpoint

Fixes #9
This commit is contained in:
2019-06-21 00:12:29 -05:00
parent 3824437d7a
commit 1aa1dddb49
5 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,27 @@
'use strict';
const SLMessage = require('./SLMessage.js').SLMessage;
const MSG_ID = 12528;
exports.SLSetHeatSetPoint = class SLSetHeatSetPoint extends SLMessage {
constructor(controllerIndex, bodyType, temperature) {
super(0, MSG_ID);
this.controllerIndex = controllerIndex;
this.bodyType = bodyType;
this.temperature = temperature;
}
encode() {
this.writeInt32LE(this.controllerIndex || 0);
this.writeInt32LE(this.bodyType || 0);
this.writeInt32LE(this.temperature || 0);
super.encode();
}
static getResponseId() {
return MSG_ID + 1;
}
};

View File

@ -9,3 +9,4 @@ exports.SLSaltCellConfigMessage = require('./SLSaltCellConfigMessage.js').SLSalt
exports.SLVersionMessage = require('./SLVersionMessage.js').SLVersionMessage;
exports.SLSetCircuitStateMessage = require('./SLSetCircuitStateMessage.js').SLSetCircuitStateMessage;
exports.SLGetGatewayDataMessage = require('./SLGetGatewayDataMessage.js').SLGetGatewayDataMessage;
exports.SLSetHeatSetPointMessage = require('./SLSetHeatSetPoint.js').SLSetHeatSetPoint;