Cloud Account Management¶
The regulator registers itself once with the Xengineering cloud platform to unlock cloud-side features (leaderboards, fleet statistics, sailing chrono, history backup, over-the-air firmware updates). After that first registration the regulator logs in automatically on every boot — there is no manual login, ever.
This page documents the registration model, the two account-management buttons in the dashboard, and what happens in every reset / re-flash / recovery scenario.
How registration works¶
First boot¶
- Connect the regulator to WiFi using the captive portal (Configuration tab).
- Open the dashboard, go to Cloud Features → Registration.
- Fill out the registration form (username, email, vessel info) and press Save.
- The regulator contacts the cloud, creates your account, and saves a registration token (the
auth_token) in its internal memory (NVS partition). - Cloud features unlock immediately.
You only do this once per device.
Every subsequent boot¶
The regulator reads its registration token from internal memory at startup and identifies itself to the cloud automatically. As long as it can reach the internet, your data syncs in the background with no user action.
Account-management buttons¶
There are two buttons that affect your cloud account, in two different parts of the dashboard.
Delete All Data¶
Location: Cloud Features → Account Management Network required: Yes
Permanently deletes your cloud account and all associated data — vessel profile, statistics, sensor history, leaderboard entries. The cloud row is destroyed and cannot be recovered. The regulator also clears its local registration token, so it behaves as if it has never been registered.
Local features (charging control, dashboard, sensor reads) continue to work normally — only cloud data is affected.
Use this when:
- You want to start over in the cloud with a fresh account.
- You are transferring ownership to a new user.
- You no longer want your data on the platform.
If the regulator cannot reach the cloud at the moment you press the button, nothing is deleted. Try again when you have internet.
Erase All Memory¶
Location: Security & Maintenance Network required: No
Resets the regulator to factory defaults — clears every saved setting, WiFi credential, calibration value, buffered log, and tuning history record. Restarts the regulator into WiFi configuration mode.
The cloud registration token is deliberately preserved across this wipe. Your cloud account, history, and leaderboard entries stay intact. After you reconnect the regulator to WiFi, cloud features resume automatically.
Use this when:
- You want a clean local slate (e.g. tuning has gotten out of hand and you want to start over).
- You want to wipe local WiFi/settings without losing your cloud history.
This button works fully offline — it does not contact the cloud.
Common scenarios¶
"I want a completely fresh device for a new owner"¶
Press Delete All Data first (this deletes the cloud account), then Erase All Memory (this resets local settings). The new owner connects to WiFi, opens the dashboard, and registers their own fresh account. None of your data is visible to them.
"I re-flashed the firmware over USB — am I still registered?"¶
Yes. A normal Arduino IDE upload only replaces the application code. It does not touch the NVS partition where the registration token lives. The regulator stays logged in and no re-registration is needed.
The same is true of OTA updates and the flashFactory / flashOTA workflow, which only touch the LittleFS partition.
"I did a full chip erase (esptool.py erase_flash) — what now?"¶
A full chip erase wipes the registration token along with everything else. When the regulator tries to register again, the cloud sees that this device's serial number is already claimed and refuses to issue a new token. The regulator stays in "not registered" state.
To recover, email joe@xengineering.net with your device's serial number (visible on the main dashboard → System panel → Device Serial, also shown on Cloud Features → My Profile → Device ID when accessible). The previous account will be deleted server-side, after which you can register the device fresh. Your previous history and leaderboard entries are not recoverable.
"I bought a used device but the seller didn't press Delete All Data first"¶
Same recovery as above — email joe@xengineering.net with the device's serial number (Device Serial in the dashboard's System panel). The previous owner's account will be deleted and you can register fresh.
"My regulator's NVS got corrupted somehow"¶
Rare, but the recovery is the same as for a full chip erase: email joe@xengineering.net.
Why registration is sticky¶
The regulator's unique device ID (device_uid) is derived from a factory-burned identifier (the eFuse MAC) on the ESP32 microcontroller — it is hardwired and cannot be changed in firmware. Once that ID has been registered to a cloud account, the cloud will never hand out a new registration token to any caller asking about that same ID.
This is what stops a stranger from impersonating your regulator and pulling your data: even if they somehow learn your device_uid, they cannot register a fresh account against it or extract your token. Recovery from genuine token loss requires support intervention by design.
Because the registration token is preserved across the Erase All Memory button, you can reset your regulator to defaults whenever you want without losing your cloud account. The only operations that genuinely break cloud access are the explicit Delete All Data button (intentional cloud reset) and a developer-level full chip erase (rare).
How your data is protected¶
A few specifics about the security model:
- Per-device authentication token (
auth_token). The only thing that authorizes a request as "this regulator" is a token issued by the cloud on first registration. Every per-device endpoint (sensor history upload, history read, profile update, account delete) requires this token AND verifies it matches the device making the request. Knowing only the public-facing device ID is not enough to read or write your data. - Device ID is not published. Leaderboard and ranking responses do not include device IDs. Rows are tagged server-side with an
is_current_userflag so the dashboard can highlight your row without exposing identifiers. - Token never leaves the regulator after first registration. The registration flow is the only time the token transits between cloud and device. Subsequent re-registration attempts are refused with a 409 response — the cloud never re-issues the token, so it cannot be harvested by anyone asking for it.
- Local admin password is never sent to the cloud. The admin password unlocks the dashboard's settings forms locally on the regulator. It is not used as a cloud credential and is not transmitted in any cloud request.
- Erase All Memory works fully offline. The cloud registration token is preserved in NVS across the wipe, so cloud account continuity does not depend on having internet access at the moment you press the button.