target_id — where the message is routed.
Inside a command handler that is the from argument, so a reply, a widget
update and a dialog all go back to whoever asked. Widget calls also take a
widget_id.
Most functions return esp_err_t (ESP_OK on success). The *_with_response
variants return a cJSON * you own and must cJSON_Delete().
Lifecycle
Device state
device_id, ssid, user_id, product_id, version, and
the flags wifi_connected, ip_ready, ws_connected, ap_mode_active,
ntp_initialized, plus uptime_seconds. Take the lock if you read it from a
task other than your handler.
Connection state
Receiving commands
register_user_msg_cb sees every inbound message — useful for debugging or
a protocol of your own. cmd_process feeds a message in by hand.
The handler gets the whole envelope, so use the helpers to dig into it:
The dashboard sends parameters as strings —
"true", not true. Write
cJSON_IsBool() and nothing will happen.Responding and emitting
emit takes ownership of params — do not delete it yourself.
Updating widgets
Push a value to a dashboard widget by its widget ID (needsHYPERWISOR_ENABLE_WIDGET).

Copy a widget's ID from General → Basic — this is the value your update calls reference.
Specialised widgets
hyperwisor_update_widget_position moves, resizes and rotates a widget from the
device — r is rotation in degrees.
Telemetry and status
DEVICE_STATUS is answered by the library automatically — you do not need to
register a handler for it. send_device_status is there for reporting
unprompted.Dialogs
Identity and security
auth_ok. The private key never leaves the chip; only the public
key is ever shared.
hyperwisor_hsc_register() registers the key against an account without the
app — for a factory jig, or a device you provision yourself.
Credentials
Database
Read and write a product’s cloud tables straight from the device (needsHYPERWISOR_ENABLE_HTTP).
*_with_response variant returning cJSON * that you must delete.
Users
SMS
Onboarding from the device
Persistent storage
Your own key/value store in NVS, separate from the credentials above.Time
Wi-Fi
HYPERWISOR_WIFI_EVT_CONNECTED, _DISCONNECTED,
_AP_START, _AP_STOP and _GOT_IP.
GPIO
NeedsHYPERWISOR_ENABLE_GPIO.
save_state / restore_all_states persist output levels across a reboot.
OTA
NeedsHYPERWISOR_ENABLE_OTA. See OTA updates for the
partition table.
Board port
hyperwisor_init().
Feature headers
The umbrella header pulls these in — their signatures are the source of truth.Examples
A real project walkthrough.
OTA updates
Enable over-the-air firmware.

