Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get chamber temperture on main screen without plugins #3654

Merged
merged 8 commits into from
Mar 17, 2025
13 changes: 13 additions & 0 deletions src/app/bottom-bar/bottom-bar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions src/app/model/printer.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export interface PrinterStatus {
status: PrinterState;
bed: Temperature;
tool0: Temperature;
chamber: Temperature;
fanSpeed: number;
}

Expand Down
5 changes: 5 additions & 0 deletions src/app/services/socket/socket.octoprint.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()];

Expand Down
Loading