Skip to main content
Include the umbrella header to access the full API:
#include "hyperwisor.h"

Lifecycle

void hyperwisor_init(void);    /* initialize subsystems */
void hyperwisor_start(void);   /* spawn the core task: Wi-Fi, NTP, realtime, commands */

Credentials

bool hyperwisor_has_credentials(void);
void hyperwisor_set_credentials(const char *ssid, const char *password,
                                const char *device_id, const char *user_id);
Credentials persist in NVS, so set them only on first boot or when overriding.

Custom commands

Register a handler for a named command. The handler receives the sender ID and the command payload as cJSON. Reply with hyperwisor_send_response:
static void cmd_blink(const char *from, cJSON *payload)
{
    gpio_set_level(GPIO_NUM_2, 1);

    cJSON *reply = cJSON_CreateObject();
    cJSON_AddStringToObject(reply, "status", "ok");
    hyperwisor_send_response(from, reply);
    cJSON_Delete(reply);
}

void app_main(void)
{
    hyperwisor_init();
    hyperwisor_register_cmd_handler("BLINK", cmd_blink);
    hyperwisor_start();
}

Feature modules

The umbrella header pulls in feature headers. Their exact function signatures live in the headers themselves — treat those as the source of truth:
HeaderProvides
hyperwisor_core.hInit/start lifecycle
hyperwisor_wifi.hWi-Fi connect / provisioning
hyperwisor_ws.hRealtime transport
hyperwisor_cmd.hCommand registration + responses
hyperwisor_nvs.hPersistent storage helpers
hyperwisor_widget.hPush values to dashboard widgets (HYPERWISOR_ENABLE_WIDGET)
hyperwisor_ntp.hTime sync (HYPERWISOR_ENABLE_NTP)
hyperwisor_http.hhyperwisor_http_get/post helpers (HYPERWISOR_ENABLE_HTTP)
hyperwisor_port.hBoard port struct
hyperwisor_ota.hOTA (HYPERWISOR_ENABLE_OTA)
hyperwisor_gpio.hCloud GPIO (HYPERWISOR_ENABLE_GPIO)

Next: OTA updates

Enable over-the-air firmware updates.