diff --git a/src/app/bottom-bar/bottom-bar.component.ts b/src/app/bottom-bar/bottom-bar.component.ts index 7b2b607c1..2ca107469 100644 --- a/src/app/bottom-bar/bottom-bar.component.ts +++ b/src/app/bottom-bar/bottom-bar.component.ts @@ -42,6 +42,19 @@ export class BottomBarComponent implements OnDestroy { }); }), ); + } else { + this.subscriptions.add( + this.socketService.getPrinterStatusSubscribable().subscribe((printerStatus: PrinterStatus): void => { + if (printerStatus.chamber.current > 0) { + const chamberReading: TemperatureReading = { + temperature: printerStatus.chamber.current, + humidity: 0, + unit: printerStatus.chamber.unit, + }; + this.enclosureTemperature = chamberReading; + } + }), + ); } this.subscriptions.add( diff --git a/src/app/model/printer.model.ts b/src/app/model/printer.model.ts index ccc402616..254624f48 100644 --- a/src/app/model/printer.model.ts +++ b/src/app/model/printer.model.ts @@ -2,6 +2,7 @@ export interface PrinterStatus { status: PrinterState; bed: Temperature; tool0: Temperature; + chamber: Temperature; fanSpeed: number; } diff --git a/src/app/services/socket/socket.octoprint.service.ts b/src/app/services/socket/socket.octoprint.service.ts index 0c20c3da2..13cb40bc7 100644 --- a/src/app/services/socket/socket.octoprint.service.ts +++ b/src/app/services/socket/socket.octoprint.service.ts @@ -232,6 +232,11 @@ export class OctoPrintSocketService implements SocketService { set: Math.round(message?.current?.temps[0]?.tool0?.target), unit: '°C', }; + this.printerStatus.chamber = { + current: Math.round(message?.current?.temps[0]?.chamber?.actual), + set: Math.round(message?.current?.temps[0]?.chamber?.target), + unit: '°C', + }; } this.printerStatus.status = PrinterState[message.current.state.text.toLowerCase()];