Skip to content

Commit

Permalink
Merge pull request #1043 from trevorkwhite/master
Browse files Browse the repository at this point in the history
Load Screenlogic Recurring Schedules / Version Correctly
  • Loading branch information
tagyoureit authored Nov 19, 2024
2 parents cf5f847 + 52942cd commit 5c79f9d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions controller/comms/ScreenLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class ScreenLogicComms {
logger.screenlogic(msg);
})
let ver = await this._client.getVersionAsync();
logger.info(`Screenlogic: connect to ${systemName} ${ver} at ${unit.ipAddr}:${unit.port}`);
logger.info(`Screenlogic: connect to ${systemName} ${ver.version} at ${unit.ipAddr}:${unit.port}`);

let addClient = await this._client.addClientAsync();
logger.silly(`Screenlogic:Add client result: ${addClient}`);
Expand Down Expand Up @@ -1111,12 +1111,12 @@ class Controller {
Run once schedules: [{"scheduleId":12,"circuitId":6,"startTime":"0800","stopTime":"1100","dayMask":1,"flags":1,"heatCmd":4,"heatSetPoint":70,"days":["Mon"]},{"scheduleId":13,"circuitId":6,"startTime":"0800","stopTime":"1100","dayMask":1,"flags":1,"heatCmd":4,"heatSetPoint":70,"days":["Mon"]}] */

for (let i = 0; i < slrecurring.data.length; i++) {
let slsched = slrecurring[i];
let slsched = slrecurring.data[i];
let data = {
id: slsched.scheduleId,
circuit: slsched.circuitId,
startTime: Math.floor(slsched.startTime / 100) * 60 + slsched.startTime % 100,
endTime: Math.floor(slsched.stopTime / 100) * 60 + slsched.stopTime % 100,
startTime: Math.floor(parseInt(slsched.startTime) / 100) * 60 + parseInt(slsched.startTime) % 100,
endTime: Math.floor(parseInt(slsched.stopTime) / 100) * 60 + parseInt(slsched.stopTime) % 100,
scheduleDays: slsched.dayMask,
changeHeatSetPoint: slsched.heatCmd > 0,
heatSetPoint: slsched.heatSetPoint,
Expand Down

0 comments on commit 5c79f9d

Please sign in to comment.