π Device Information (Read)
Static information about the connected Melody device.| Field | Type | Description |
|---|---|---|
firmwareVersion | string | CI/CD firmware name (e.g. "v0.0.3-6-g4210228-dirty") |
deviceType | string | Device model (e.g. "melody") |
hardwareRevision | string | Hardware revision identifier/number |
factoryActivationTime | uint32 | Unix timestamp of factory activation |
π‘ Device Status (Read)
Dynamic operational data from the Melody device.| Field | Type | Range | Description |
|---|---|---|---|
deviceTime | int64 | ms | Current device time in milliseconds (power-on time if no internet time source is available) |
batteryLevel | uint32 | 0β100 | Battery level (%) |
batteryVoltage | float | 10.0β15.0 | Battery voltage (V) |
temperatureSensor1 | float | Β°C | PCB temperature near the charger section |
temperatureSensor2 | float | Β°C | PCB temperature near the motor section |
wifiConnected | bool | β | Whether the device is connected to a WiFi access point |
wifiRssi | int32 | -100 to 10 | WiFi RSSI signal strength (dB) |
bleConnected | bool | β | Whether there is an active BLE client connection |
βοΈ Device Settings (Read/Write)
Configurable parameters that control connectivity and naming.| Field | Type | Description |
|---|---|---|
deviceName | string | Human-readable device name (e.g. "Melody Toy") shown in apps / BLE lists |
wifiEnabled | bool | Enable or disable WiFi connectivity |
bleEnabled | bool | Enable or disable BLE connectivity |
π οΈ Service Commands (Write)
Service commands are write-only control flags that trigger specific system-level actions on the device.β οΈ Important: Calibration and OTA may move the stroker or restart the device. Always require explicit user confirmation before triggering these commands.
| Command | Type | Description |
|---|---|---|
startCalibration | bool | Start stroker calibration. Warn users to detach the device and confirm before execution. |
startOta | bool | Check for firmware updates. Requires user confirmation before applying an update. |
startOtp | bool | Request an OTP token used for API authentication / secure pairing flows. |
powerDown | bool | Shut down the device safely. |
π Firmware Update Info (Read)
Information about firmware update availability and state.| Field | Type | Description |
|---|---|---|
latestFirmwareVersion | string | Latest available firmware version on the update server |
firmwareStatus | string | One of: up-to-date, update-available, update-required |
π§ Debug Information (Read)
Debug data is exposed for diagnostics and should not normally be shown to end users.It is especially useful during development, QA, or support tooling.
| Field | Type | Description |
|---|---|---|
freeHeapSize | uint32 | Available heap memory in bytes |
externalFlashSize | uint32 | External flash storage size in bytes |
deviceTokenRetrieveTime | uint32 | Unix timestamp when the device token was received |
β Recommended Usage Patterns
- Show user-facing status from:
batteryLevel,batteryVoltage,temperatureSensor*,wifiConnected,bleConnected. - Offer configuration UI for:
deviceName,wifiEnabled,bleEnabled. - Gate service commands behind confirmation dialogs for:
startCalibration,startOta,powerDown. - Surface firmware prompts based on:
firmwareStatusandlatestFirmwareVersion. - Use debug information only in internal tools, logs, or support dashboards.