Device HTTP and commands¶
These are Wi-Fi firmware endpoints. Platform accounts use the separate /api/auth/... API described under platform integration.
The first half of this page is the HTTP contract every device shares; the second half holds the M1 and DAIKIN extensions. Read Access and Command envelope first, then jump to your model.
Access¶
Embedded WebUI uses same-origin HTTP. LAN clients query info and capabilities before selecting a device implementation. Device HTTP uses Basic authentication with username admin and the device Web password. Cross-origin browser access requires an allowed Origin and preflight; HTTPS-to-HTTP connections remain subject to browser mixed-content restrictions.
| Method and path | Purpose |
|---|---|
GET /api/v1/info |
Model, firmware and device identity |
GET /api/v1/status |
Status snapshot |
GET /api/v1/capabilities |
Features and supported actions |
GET /api/v1/config |
Public settings and password-presence flags, without plaintext passwords |
POST /api/v1/command |
JSON command envelope below |
GET /api/v1/config/backup |
Download a full binary backup; a Web password is required |
POST /api/v1/config/restore |
Restore a validated backup and schedule reboot |
POST /api/v1/ota/convert |
Explicit signed conversion to hub, only on DAIKIN full declaring conversion support; see below |
POST /api/v1/mcu/exchange |
M1 only: raw binary MCU request/reply, request length 6–262 bytes |
Logs, schedules, memory and sensor diagnostics depend on the model. Older releases may lack newer endpoints.
Command envelope¶
HTTP and TMCP use the same actions and JSON envelope:
{"request_id":"web_123","action":"co2_source.get","params":{}}
{"request_id":"web_123","code":"ok","message":"Success","data":{"source":"local","device_id":"","double_click":"none","revision":0,"valid":false,"button_events_supported":false}}
Match replies by request_id. Use the stable code for control flow and localized message for display. ok indicates a successful query; accepted indicates an accepted operation. Treat errors such as invalid_params, busy, unsupported and conflict as failures. Read capabilities.actions for the actual action list.
M1 generic field profile4¶
display_profile.get reports schema4; display_profile.set keeps its action name and must not include a schema key. This is m1-display-v4, replacing the deprecated old-RC profile3 without a backwards-compatibility guarantee. The revision/CAS, selection, display modes, TTL, lamps, raw display_value.set and MCU readback rules remain as documented below. The Wi-Fi profile version is independent of UART operation/schema numbering: existing OP24/25/26 and raw API v3 are unchanged.
A MQTT lane has exactly nine keys: slot, source:"mqtt", device_id, field_id, type:"number", unit, display, ttl_seconds, color. No metric, model or display name is stored. SET accepts compact or colon-separated MACs in either case; GET returns canonical lower12. field_id is1..32 ASCII [a-z][a-z0-9_]*; unit is0..24 valid UTF-8 bytes without C0/DEL. The expected type and unit must match the current schema2 descriptor; arbitrary publisher fields/units do not require a firmware model adapter.
none / local / api lanes retain exactly the eight keys containing metric instead of field_id/type. Local metrics still name M1's actual local sensors; none/custom and raw API behavior are unchanged. MQTT discovery cannot alter this local hardware list. PM's integer-only glass and the five HCHO modes remain unchanged. Runtime unit metadata is bounded arbitrary UTF-8 for generic MQTT fields; negative/unrepresentable values report out_of_range rather than becoming zero. Every accepted boot/sequence is a complete snapshot: unsupported/missing/malformed/invalid fields or an expected-unit mismatch immediately revoke the old numeric candidate, without deleting the configured source or turning unknown values into zero. Record counters to prevent old numeric replay; numeric siblings remain independent. Stale/offline sources cannot renew a lane lease.
Application config v11 appends remote[2] after the frozen v9/v10 prefix. An explicit migration of validated old MQTT metric/unit pairs stores the canonical old metric as field_id and its canonical unit, preserving revision, selection, double-click and style; it does not restore the old HTTP/feed schema. New MQTT writes use the generic remote binding internally rather than model-specific metrics. none/local/api settings retain their original meaning. Runtime leases are not persistent. Unsupported layouts must protect stored configuration and explain recovery; arbitrary old RC configuration acceptance is not guaranteed. The display_source.get/set action names are aliases of the current schema4 interface, not compatibility implementations of old HTTP shapes. A legacy profile projection alone cannot enable the new UART formatted profile.
Profile SET schema4 · GET schema4 · Contract · Examples. The sections below retain historical schema3/schema2 details; their MQTT metric/model mapping is deprecated.
M1 CO₂ source¶
co2_source.get {} returns:
| Field | Meaning |
|---|---|
source |
local for local SCD40; mqtt for an external sensor in this account |
device_id |
Lowercase 12-digit hex source ID; "" for local |
double_click |
none or switch_display |
revision |
Configuration revision, 0..2147483647 |
valid, ppm |
Freshness result; omit ppm when invalid |
button_events_supported |
Sensor MCU declared extended button events |
Write all four configuration fields through co2_source.set, including the latest revision:
{"request_id":"web_124","action":"co2_source.set","params":{"source":"mqtt","device_id":"123456abcdef","double_click":"switch_display","revision":0}}
Reject the device's own ID; local requires an empty ID. A stale revision returns conflict; success returns the incremented revision. OTA, pending reboot or Wi-Fi trial may return busy. A failed request preserves the current RAM configuration; interpret the Flash outcome using storage commit results. Changing source clears cached remote data.
co2_display.get / co2_display.set manage mode, position, thresholds and interval. Display overrides do not modify physical HCHO, PM or CO₂ measurements. See display sources for MCU behavior and button priority.
M1 display_profile API¶
The additive m1-display-v3 contract provides display_profile.get {}, display_profile.set and display_value.set, advertised in capabilities.actions. It requires formatted UART support; the HTTP version alone does not prove MCU support. GET returns schema:3 with configuration and a separate runtime. SET accepts a complete configuration without schema or runtime, using the existing shared revision/CAS token:
{
"revision": 12,
"selected_source": "user",
"double_click": "switch_display",
"lanes": [
{
"slot": 0, "source": "api", "device_id": "",
"metric": "custom", "unit": "", "ttl_seconds": 20,
"display": {"mode": "integer", "show_label": false, "show_unit": false},
"color": {"mode": "fixed", "lamps": [
{"red": false, "green": false, "yellow": false},
{"red": false, "green": false, "yellow": false},
{"red": false, "green": false, "yellow": false}
]}
},
{
"slot": 1, "source": "mqtt", "device_id": "F0:E1:D2:C3:B4:A5",
"metric": "fan_speed_percent", "unit": "%", "ttl_seconds": 15,
"display": {"mode": "integer", "show_label": false, "show_unit": false},
"color": {"mode": "thresholds", "low": 25, "high": 75}
}
]
}
Sources, metrics and physical configuration units retain the schema2 rules. Replace decimals/scale with the required display object. Five display modes and nine lamps per region describe local/MQTT conversion. PM accepts only integer. Fixed colors require all three lamp objects; thresholds must remain finite float32 values with low<high after conversion and compare the unscaled physical input. For an api lane, mode, physical unit metadata and color policy are retained configuration fields and do not transform direct writes.
MQTT IDs accept exactly 12 hex digits or six colon-separated octets, in either case. Normalize to lowercase compact form before self-device checks and persistence; responses always emit that canonical form. Non-MQTT IDs must be empty. co2_source.set has the same additive input normalization, defined in its new v2 input schema. The existing display_source.set implementation also accepts those spellings as input leniency beyond its frozen v2 contract; the old published schema bytes remain unchanged.
display_value.set directly writes one region. First explicitly save a formatted profile with that lane's source set to api; require the latest revision and TTL no greater than its configured limit. number is the integer digit register 0..999. decimal, show_label and show_unit are required booleans; PM requires decimal:false. Lamps are the complete left/middle/right array, with all three color switches in every position. No input scaling, rounding, saturation or threshold coloring occurs. Reject fractional or overflowing numbers, physical value/unit fields, scalar color and unknown fields.
{"request_id":"raw_display_1","action":"display_value.set","params":{"revision":13,"slot":0,"ttl_seconds":15,"number":123,"decimal":true,"show_label":false,"show_unit":true,"lamps":[{"red":true,"green":false,"yellow":false},{"red":false,"green":true,"yellow":false},{"red":true,"green":false,"yellow":true}]}}
{"request_id":"raw_clear_1","action":"display_value.set","params":{"revision":13,"slot":0,"ttl_seconds":0}}
The first request displays 1.23, the original mg/m³ unit, no HCHO label, and exactly the requested nine lamps. TTL0 accepts only revision/slot/ttl_seconds and restores that region's original reading. Writes are volatile; expiry, offline or reboot cannot replay a previous API lease. Authentication, retained-command rejection and request-ID deduplication follow existing command rules; replaying the same request ID does not renew a lease. accepted does not establish MCU confirmation.
GET runtime uses profile:legacy|dual|formatted. A valid API lane's value is its displayed number (number/100 when decimal, otherwise number), with possible float32 representation differences; unit is the actual native glyph unit (slot0 mg/m³, slot1 µg/m³), or empty when hidden. Local/MQTT runtime retains the original physical value/unit. number, format flags and the three-object lamps array describe the exact encoded output. Invalid lanes have null value/number/format/lamps and zero remaining TTL; confirmed clear and valid data remain separate concepts.
After SET, independently GET and compare the revision/full configuration. After a direct write, compare the raw number/flags/lamps and fresh TTL. Confirmation requires a matching OP25 selector ACK for the current configuration generation, then independent OP26 queries of both lanes with formatted-active=1 and matching selection/output. Only profile=formatted, supported MCU and two confirmed lanes can yield global confirmed:true; legacy/dual projections are unconfirmed and ineffective. A query alone or an old v2 cache cannot prove formatted selection.
Reading v3 while v2 is active projects configuration without saving or activating it: PM→integer; HCHO scale1000→milli, otherwise decimals0/1/2→integer/decimal_1/decimal_2. Scalar fixed color becomes uniform lamps and the old combined legend decision becomes two flags. Explicit v3 SET activates formatted control. A v2 GET during formatted control returns a disabled legacy view with the current shared revision and unconfirmed/ineffective lanes; explicit v2 SET replaces active control with v2. Legacy CO₂ SET selects legacy while retaining both newer configurations. Persist profile/settings together under the storage commit rules; see v10 migration.
Machine inputs and state: profile SET, profile GET, raw value SET.
M1 dual user display API¶
This section retains the published schema2 display_source / display_data behavior. Formatted schema3 uses the actions above.
Development contract m1-display-v2 adds display_source.get {}, display_source.set and display_data.set. Require these actions in capabilities.actions; their presence does not prove sensor MCU support. mcu.version.get adds display_source_schema (2 or 0) and dual_display_source_supported. Existing display_source_supported still means scalar schema1. Control also requires dual negotiation and readback.
display_source.set replaces both persisted lane configurations with the latest revision. slot0 is HCHO, slot1 PM2.5; include each exactly once. Defaults are selected_source=original, double_click=none; each lane uses source=none, device_id="", metric=custom, unit="", decimals0, scale1, ttl_seconds20 and color={"mode":"fixed","value":"off"}.
{"request_id":"display_cfg_1","action":"display_source.set","params":{"revision":0,"selected_source":"user","double_click":"switch_display","lanes":[{"slot":0,"source":"mqtt","device_id":"001122334455","metric":"power","unit":"W","decimals":2,"scale":1000,"ttl_seconds":15,"color":{"mode":"thresholds","low":100,"high":1000}},{"slot":1,"source":"api","device_id":"","metric":"custom","unit":"%","decimals":1,"scale":1,"ttl_seconds":10,"color":{"mode":"fixed","value":"green"}}]}}
| Configuration field | Rule |
|---|---|
revision |
Strict JSON integer 0..2147483647, compare-and-swap; advances on success |
selected_source |
original / user, global for both lanes |
double_click |
none / switch_display; cancel a ringing alarm first without toggling |
lanes[].source |
none / local / mqtt / api; none always retains original readings |
device_id |
mqtt requires an external lowercase 12-hex ID in the same account, excluding self; otherwise empty |
metric, unit |
Fixed pairs below; custom only for api/none, and none requires custom with empty unit |
decimals, scale |
Integers 0..2 and 1 or1000; display value / scale, without changing physical units or alarms |
ttl_seconds |
Integer1..60 maximum data lifetime; physical sources retain stricter freshness limits |
color |
fixed requires value off/red/green/yellow; thresholds requires finite low<high, comparing unscaled values for green/yellow/red |
| Metric | Unit | Sources and range |
|---|---|---|
temperature |
°C |
local/mqtt/api; physical -40..125, negative values cannot render in generic positions and fall back |
humidity |
% |
local/mqtt/api; 0..100 |
pm25, formaldehyde |
µg/m³, mg/m³ |
local/mqtt/api; finite, nonnegative |
co2 |
ppm |
local/mqtt/api; 1..65535, local requires real SCD40 support |
pressure |
Pa |
local/mqtt/api; finite, nonnegative; numerically convert centi-Pa/hPa before labeling Pa |
power, energy |
W, kWh |
mqtt/api; finite, nonnegative; current new TC1 feed publishes power only, without claiming energy |
tvoc, pm10 |
ppb, µg/m³ |
mqtt/api; finite, nonnegative, according to actual producer fields |
fan_speed_percent |
% |
A1 mqtt or api; finite0..100; A1 effective main-fan output percentage, not measured RPM, including fresh-air variants |
custom |
Allowlist | api only; unit is "", °C, %, µg/m³, mg/m³, ppm, Pa, W, kWh or ppb |
Local means this M1, permitting only climate, PM2.5, HCHO, CO₂ and pressure. Missing capability or fresh samples makes it invalid. MQTT consumes only the same-account typed feed, never arbitrary topics, URLs or JSONPath. none permits only custom/empty unit and is not writable. Reject unknown fields, wrong types, mismatching units, duplicate slots and low>=high.
Each lane has three nonnegative digits; encoding outside0..999 restores only that lane. Firmware derives native legends from the real slot, metric, unit and scale1. The glass has no selectable W, ℃ or % glyphs. Clients must explain logical units and scale; see representation limits.
display_data.set leases RAM data only to a lane configured as api. Require matching configuration revision/unit and TTL no greater than its configured limit. Optional color directly overrides this lease. A value write requires value, unit and1..60-second TTL. Clearing has a separate shape without fake zero:
{"request_id":"display_value_1","action":"display_data.set","params":{"revision":1,"slot":1,"value":45.6,"unit":"%","ttl_seconds":10,"color":"yellow"}}
{"request_id":"display_clear_1","action":"display_data.set","params":{"revision":1,"slot":1,"ttl_seconds":0}}
Both use existing HTTP Basic or authorized MQTT command authentication; reject retained commands. Repeating request_id returns the existing result without renewing a lease. Public sensor fields cannot write api lanes. Values/leases never persist to Flash or replay after reboot. accepted is not display confirmation.
GET keeps configuration at the root: revision, selected_source, double_click, lanes. Read-only runtime is separate and must not be sent back to SET:
| Runtime field | Meaning |
|---|---|
profile |
Active legacy / dual scheduler |
selected_source |
Actual original/user selection including a double-click RAM override, rebuilt on configuration change or reboot |
mcu_supported |
Explicit dual schema2 negotiation, beyond scalar support |
confirmed, confirmation |
Fresh independent MCU readback matches; mcu_readback, pending_mcu_readback or requires_mcu_upgrade |
lanes[].slot/valid/value/unit |
Resolved reading per position; unknown/invalid value is null |
age_ms, remaining_ttl_seconds |
Sample age or null; remaining0..60 seconds |
effective, reason |
Eligibility for user overlay; reason ok/disabled/missing/stale/offline/invalid/out_of_range/unsupported |
number/format/color |
Encoded output or null; color is a string enum |
confirmed |
This lane matches an independent MCU query, without optical LCD proof |
Global confirmed is true exactly when profile=dual, the MCU is supported and both lanes are confirmed; confirmation is then mcu_readback. A confirmed clear may have valid=false and zero remaining lease: value validity and confirmation are separate.
With valid=true, value, age and encoded fields are present, the remaining lease is positive and reason=ok. Otherwise value and encoded fields are null and the remaining lease is zero. effective=true also requires this lane's MCU readback to be confirmed.
After saving, independently GET and compare revision/full configuration. After writing a value, GET and compare that lane's valid/value/unit/lease; MCU confirmation still requires independent UART queries. Old MCUs may retain desired settings without claiming dual control. Expiry preserves desired selection and restores only the affected position. Without reliable offline events, use TTL rather than inventing offline detection.
Successful new SET persistently selects dual. Successful legacy CO₂ SET selects legacy and preserves dual configuration. Commit profile/settings together; CAS conflicts or busy do not commit the candidate. Interpret accepted / storage_error using storage commit results; storage_error alone does not prove Flash rollback. Dual configuration appends M1 storagev9; see v8 migration and backups.
M1 sensor reminders¶
alarm.get {} reads thresholds and optional sensor-buzzer switches. alarm.set requires sensor (hcho / pm25), yellow (integer 0..65535), red (integer 1..65535 and at least yellow), and the latest revision (integer 0..2147483647). Optional buzzer_enabled must be a JSON boolean and changes only the selected sensor; omission preserves its setting. Reject unknown fields, strings/floats in integer fields and numbers in boolean fields.
{"request_id":"web_alarm_1","action":"alarm.set","params":{"sensor":"pm25","yellow":75,"red":150,"revision":0,"buzzer_enabled":false}}
Successful persistence returns accepted and the full configuration with incremented revision. Revision mismatch, exhausted revision or occupied runtime returns busy; storage failure returns storage_error. See storage commit results for confirmed failures versus indeterminate commits. Threshold units remain main_controller_raw_u16; do not infer unit conversions from sensor names. Old configurations and unknown extension schemas migrate both desired buzzer switches to default OFF while preserving thresholds and revision.
alarm.get data field |
Meaning |
|---|---|
revision |
Current configuration revision |
hcho_configured / pm25_configured |
Whether each sensor's thresholds were configured |
hcho_yellow / hcho_red / pm25_yellow / pm25_red |
Sensor thresholds |
hcho_buzzer_enabled / pm25_buzzer_enabled |
Persisted desired switches, default false |
buzzer_supported / mcu_alarm_schema |
Negotiated MCU support and schema 0 / 1 |
buzzer_confirmed |
A fresh independent read matches the current revision and desired mask |
buzzer_confirmation |
mcu_readback / pending_mcu_readback / requires_mcu_upgrade |
mcu_hcho_buzzer_enabled / mcu_pm25_buzzer_enabled |
Actual switches; null when unknown or readback is at least 15 seconds old |
mcu_buzzer_mask |
Actual mask 0..7; null when unknown |
sensor_alarm_active |
Sensor reminder condition from the MCU's latest poll; null when unknown, not sound sensing |
uart_sent / confirmation |
Compatible threshold-send result; confirmation remains uart_send_only |
unit |
main_controller_raw_u16 |
Wi-Fi persists desired settings, sends OP 14 after capability negotiation, then independently reads and verifies them. A write reply cannot set buzzer_confirmed:true. Threshold uart_sent:true also does not establish buzzer readback. Old MCUs still save desired settings but return buzzer_supported:false, buzzer_confirmation:"requires_mcu_upgrade" and null actual fields. Clients must distinguish desired OFF from actual unknown, without claiming that the buzzer was silenced.
DAIKIN partition diagnostics¶
DAIKIN firmware supporting this extension includes read-only status.ota_partitions in its status object. In a status.get {} command reply, the path is data.ota_partitions. This diagnostic field is optional; clients must handle its absence on other models or older firmware.
| Field | JSON type and meaning |
|---|---|
running |
String or null; label of the running application partition, or null when unavailable |
running_size |
Nonnegative integer; running application partition capacity in bytes; 0 when running:null |
next |
String or null; label of the SDK-selected next OTA target partition, or null when no target is available |
next_size |
Nonnegative integer; OTA target partition capacity in bytes; 0 when next:null |
entries |
Array of objects enumerating all SDK-visible application and data partitions in the device's installed partition table |
entries[].label |
String; partition label |
entries[].type / entries[].subtype |
Nonnegative integers; ESP-IDF partition type/subtype identifiers |
entries[].address |
Nonnegative integer; partition starting byte offset in Flash |
entries[].size |
Nonnegative integer; partition capacity in bytes |
All numbers are JSON decimal numbers, not hexadecimal strings. Labels, counts and capacities come from the installed partition table, independently of the build CSV; do not assume labels are always app0 / app1. The object contains no Flash contents or credentials. It describes the current layout without switching OTA layouts or rewriting the partition table, and does not establish that an image is installed or suitable to write.
Implementation: otaPartitionStatus() and state() in firmware/DAIKIN/src/commands.inc.
Optional sibling status fields minimum_free_memory (lowest free heap since boot) and max_free_block (largest currently allocatable contiguous heap block) are nonnegative integers in bytes, alongside free_memory; clients must handle their absence.
Hub byte-addressable heap¶
Supporting DAIKIN hub firmware adds three optional, read-only nonnegative JSON integers under the status object's hub, or data.hub in a status.get {} reply. All sizes are bytes and use the combined ESP-IDF capabilities MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT: internal memory accessible through byte reads and writes.
Field in data.hub |
Meaning |
|---|---|
free_byte_heap |
Total currently free heap with these capabilities |
largest_byte_block |
Largest currently allocatable contiguous block with these capabilities |
min_byte_heap |
SDK low-water statistic since boot: the sum of matching regions' minimum free sizes |
Regional low-water marks can occur at different times, so min_byte_heap need not equal the lowest simultaneous total. The existing sibling free_memory, minimum_free_memory and max_free_block retain their original ESP getter semantics; they are not aliases for these capability-specific values. Clients must tolerate missing hub or missing fields on older firmware and other variants. Do not apply these ESP32 meanings to other device models.
See the fixed implementation, SDK heap reference and Hub connection admission. These optional diagnostics do not change required contract fields or consumer pins.
Reset reason¶
DAIKIN firmware supporting this diagnostic may include read-only status.reset_reason, or data.reset_reason in a status.get {} reply. It is a nonnegative JSON integer from unsigned(esp_reset_reason()), describing the last reset. Older firmware may omit the field; absence means the diagnostic is unavailable.
The following values belong to ESP-IDF 4.4.7's esp_reset_reason_t for DAIKIN's ESP32. They are not a shared reset-reason enumeration across device models or SDKs. Preserve unrecognized values as unknown diagnostics. See the official SDK reference and version-pinned enum definition.
| Number | SDK enum | Meaning |
|---|---|---|
| 0 | ESP_RST_UNKNOWN |
Undetermined reason |
| 1 | ESP_RST_POWERON |
Power-on event |
| 2 | ESP_RST_EXT |
External-pin reset; not applicable to ESP32 |
| 3 | ESP_RST_SW |
Software restart through esp_restart() |
| 4 | ESP_RST_PANIC |
Exception or panic |
| 5 | ESP_RST_INT_WDT |
Interrupt watchdog |
| 6 | ESP_RST_TASK_WDT |
Task watchdog |
| 7 | ESP_RST_WDT |
Other watchdog |
| 8 | ESP_RST_DEEPSLEEP |
Wake from deep sleep |
| 9 | ESP_RST_BROWNOUT |
Brownout reset |
| 10 | ESP_RST_SDIO |
SDIO reset |
Implementation: DAIKIN status diagnostic. This optional diagnostic does not change required contract fields or require consumers to update their existing specification pin.
Explicit DAIKIN full → hub conversion¶
Supporting full firmware declares data.ota_variant_conversion:"full-to-hub" in capabilities.get {} replies. Do not attempt conversion without that declaration. Support does not establish that any Hub image fits the device's installed OTA slot.
The device Web password is optional: no Basic authentication is required when none exists; an existing password still requires Basic admin authentication. Send a complete PHOTA001 signed binary to the dedicated endpoint. The following Authorization header is required only when a device Web password exists:
POST /api/v1/ota/convert
Authorization: Basic <base64(admin:device-Web-password)>
Content-Type: application/octet-stream
X-IoTCloud-Target-Variant: hub
X-IoTCloud-Confirm: full-to-hub
<complete PHOTA001 signed binary>
Both confirmation header values must match exactly. When a device Web password exists, local Hub owner sessions and upstream account sessions cannot replace device Basic authentication. The current configuration must be healthy, with no active OTA, pending command or scheduled reboot; configuration recovery blocks conversion.
Check application payload size against the actual next OTA partition, independently of the build CSV. The application prefix must match DAIKIN hardware, project and target hub identity at fixed offsets; finding identity strings elsewhere is insufficient. Check the fixed prefix and authenticate the envelope against a trusted signing key before erasing the inactive slot. After receiving the complete file, verify the signed payload digest by reading the entire staged payload from Flash, then read and verify the fixed identity again. Select the new boot partition only after every check passes.
| Positive/negative case | Result |
|---|---|
Supporting full, authenticated if a password exists, correct confirmation headers, healthy and idle, signed Hub image fits and passes all checks |
HTTP 202, {"code":"accepted"}; schedule reboot |
| No device Web password is configured | No Basic authentication required; confirmation headers, healthy/idle checks, signature and target validation still apply |
| Device Web password exists but Basic authentication is missing or incorrect | HTTP 401, unauthorized |
| Missing or incorrect confirmation header values | HTTP 400, invalid_params |
| Configuration recovery is active | HTTP 409, migration_required |
| Active OTA, pending command or scheduled reboot | HTTP 409, busy |
| Running identity cannot select the explicit Full-to-Hub target | HTTP 409, unsupported_conversion |
| Actual slot too small, missing/invalid signature, digest/readback mismatch or fixed identity is not the target Hub | HTTP 400, invalid_image; do not activate |
Different variant sent to ordinary /api/v1/ota/upload or /api/v1/ota/upload-unsigned, even with conversion headers |
HTTP 400, invalid_image; ordinary endpoints preserve the running variant |
hub requests conversion to full |
No conversion endpoint on Hub; reject cross-variant ordinary uploads because Hub's larger configuration is incompatible |
Conversion preserves the partition table and ordinary configuration, including shared Wi-Fi, MQTT and device Web passwords. Initial Hub setup requires the original device Web password only when one exists; the separate local owner password requirements remain unchanged. HAP defaults off. Installing the image neither creates a local owner nor completes HomeKit pairing. Conversion does not enlarge OTA slots: a factory 1.5 MiB slot still rejects larger images. HTTP 202 confirms verification and a scheduled reboot; reconnect and read info / status with firmware_variant:"hub" to establish that Hub is running.