Skip to main content
Use these endpoints to inspect and manage the Melody device’s connection to the HapticsConnect sensation server over WiFi transport. All requests are made against the single production API:
https://api.getmelody.io
Authentication for protected endpoints uses JWT Bearer tokens, with required headers:
Authorization: Bearer <YOUR_JWT_TOKEN>
Content-Type: application/json

🔌 Server Connection Status (Read)

Server Connection Status

FieldTypeDescription
connectedboolWhether the device is currently connected to the haptics sensation server

Server Session Status

FieldTypeDescription
deviceIpAddressuint32Device IP represented as a 4‑byte integer (e.g., 192.168.1.1000xC0A80164)
connectedAtuint32Unix timestamp when the WiFi/server connection was established
serverSyncTimeuint32Device internal time (milliseconds since power‑on) when the last time‑sync was received from the server

⏰ Server Time Synchronization (Write)

Server Sync Time

Use this command to synchronize the device’s internal clock/timeline reference with official server time. Purpose:
  • Align device playback timeline with media or scripting engines
  • Ensure scripts using large millisecond timestamps (Melody engine, HPS streams) reference a consistent time source
Typical request body:
{
  "serverSync": true
}
This write endpoint may:
  • Update internal device time offset
  • Improve timeline accuracy for upcoming sensation sessions
✅ Always request this after a device joins WiFi for reliable scripted playback sync.

✅ Integration Tips

  • Call Server Connection Status to confirm the device is connected before sending timeline-based or streamed commands.
  • Convert IP values properly if displaying to users — backend value is a 32‑bit integer.
  • Request Server Time Sync during onboarding or prior to scripted video/VR playback.
  • Use serverSyncTime to validate that new commands use a current timeline reference.
For implementation-ready endpoint details and advanced request/response schemas, explore the WiFi API section in your API Reference tabs.