Skip to content

Commit

Permalink
Extra logging for #848
Browse files Browse the repository at this point in the history
  • Loading branch information
tagyoureit committed Jul 1, 2024
1 parent 9a7d79f commit 374330f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion controller/boards/IntelliCenterBoard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2828,6 +2828,7 @@ class IntelliCenterBodyCommands extends BodyCommands {
body2: { heatMode: number, heatSetpoint: number, coolSetpoint: number }
};
private async queueBodyHeatSettings(bodyId?: number, byte?: number, data?: any): Promise<Boolean> {
logger.debug(`queueBodyHeatSettings: ${JSON.stringify(this.bodyHeatSettings)}`); // remove this line if #848 is fixed
if (typeof this.bodyHeatSettings === 'undefined') {
let body1 = sys.bodies.getItemById(1);
let body2 = sys.bodies.getItemById(2);
Expand Down Expand Up @@ -2890,10 +2891,12 @@ class IntelliCenterBodyCommands extends BodyCommands {
state.emitEquipmentChanges();
} catch (err) {
bhs.processing = false;
bhs.bytes = [];
throw (err);
}
finally {
bhs.processing = false;
bhs.bytes = [];
}
return true;
}
Expand All @@ -2903,7 +2906,10 @@ class IntelliCenterBodyCommands extends BodyCommands {
setTimeout(async () => {
try {
await this.queueBodyHeatSettings();
} catch (err) { logger.error(`Error sending queued body setpoint message: ${err.message}`); }
} catch (err) {
logger.error(`Error sending queued body setpoint message: ${err.message}`);
throw (err);
}
}, 3000);
}
else bhs.processing = false;
Expand Down
2 changes: 1 addition & 1 deletion controller/nixie/circuits/Circuit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class NixieCircuit extends NixieEquipment {
}
else arr.push({ isOn: true, timeout: 1000 });
}
console.log(arr);
logger.debug(arr);
let res = await NixieEquipment.putDeviceService(this.circuit.connectionId, `/state/device/${this.circuit.deviceBinding}`, arr, 60000);
// Even though we ended with on we need to make sure that the relay stays on now that we are done.
if (!res.error) {
Expand Down

0 comments on commit 374330f

Please sign in to comment.