Skip to content

Commit f23b636

Browse files
committed
Fix mid-cook target temperature changes
Live-tested against a real oven and found the target-temp-while-active path was silently broken: MC_TEMP (11005) acks "success" but the oven's own cook plan never updates (confirmed via three independent fetchStatus() polls over 45s). Re-issuing preheat() while active fares worse — the oven acks "not-allowed" outright. The only sequence that actually works, verified live: cancel() then preheat() at the new temperature. Update the thermostat accessory to do that, and drop the dead setTemperatureC()/MC_TEMP code path since it doesn't do anything real.
1 parent 4a42f1c commit f23b636

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ Works well:
110110

111111
HomeKit doesn't expose an oven-timer characteristic Siri can drive, so this plugin doesn't fake voice timers, timer extension, or spoken time remaining.
112112

113+
June's oven doesn't support changing the target temperature of a cook that's already running — confirmed by testing against a real oven, both a direct "change temp" command and simply re-issuing preheat while active are rejected or silently ignored. So "Set June to 375" while it's already heating cancels the current cook and starts a new one at 375° (a brief, sub-second interruption) rather than smoothly retargeting.
114+
113115
## Troubleshooting
114116

115117
- **Pairing hangs or fails** — make sure the oven and the Homebridge host both have working internet access; pairing goes through June's cloud, not local network. Double-check the 8-digit code before it expires and try again.

src/accessories/thermostat.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,15 @@ export class JuneThermostatAccessory {
6161
if (!this.active) {
6262
return;
6363
}
64-
const status = await this.client.setTemperatureC(value);
64+
// June rejects (or silently ignores) changing an already-active cook's
65+
// target temperature directly — confirmed live: re-issuing preheat()
66+
// while active gets acked "not-allowed", and the old MC_TEMP primitive
67+
// acks "success" without actually changing the oven's target. Cancelling
68+
// first and then preheating at the new temperature is what actually
69+
// works, verified by polling fetchStatus() afterward.
70+
const tempF = Math.round(value * 9 / 5 + 32);
71+
await this.client.cancel();
72+
const status = await this.client.preheat(this.client.config.defaultMode, tempF);
6573
if (status !== 'success') {
6674
this.service.updateCharacteristic(this.platform.Characteristic.TargetTemperature, previous);
6775
this.platform.log.warn(`June rejected target temperature change: ${status || 'no ack'}`);

src/june-client.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
MC_CANCEL,
1111
MC_KEEPALIVE,
1212
MC_PREHEAT,
13-
MC_TEMP,
1413
milliCToCelsius,
1514
normalizeOvenConfig,
1615
NormalizedJuneConfig,
@@ -75,11 +74,6 @@ export class JuneClient extends EventEmitter {
7574
return this.sendCommand(MC_PREHEAT, { primitive_type: mode, temperature_cavity: fahrenheitToMilliC(tempF) });
7675
}
7776

78-
public async setTemperatureC(tempC: number): Promise<string | null> {
79-
this.lastTargetTempC = tempC;
80-
return this.sendCommand(MC_TEMP, { plan_id: 0, temperature_cavity: Math.round(tempC * 1000) });
81-
}
82-
8377
public async cancel(): Promise<string | null> {
8478
this.lastCancelled = true;
8579
return this.sendCommand(MC_CANCEL, { plan_id: 0 });

0 commit comments

Comments
 (0)