diff --git a/controller/boards/IntelliCenterBoard.ts b/controller/boards/IntelliCenterBoard.ts index e43efdec..f6ac328a 100644 --- a/controller/boards/IntelliCenterBoard.ts +++ b/controller/boards/IntelliCenterBoard.ts @@ -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 { + 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); @@ -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; } @@ -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; diff --git a/controller/nixie/circuits/Circuit.ts b/controller/nixie/circuits/Circuit.ts index 44feb7a3..2f7d44dd 100644 --- a/controller/nixie/circuits/Circuit.ts +++ b/controller/nixie/circuits/Circuit.ts @@ -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) {