OMS Edge Cloud Gateway & Secure Vault

If you've ever seen a tutorial that says WIFI_PASSWORD = 'my_real_password' right at the top of the code, you've seen the problem this feature is trying to solve.

Connectivity5 blocksMicroPythonC++

If you've ever seen a tutorial that says WIFI_PASSWORD = "my_real_password" right at the top of the code, you've seen the problem this feature is trying to solve. The moment you share that code — on GitHub, with a friend, in a school project folder — your real Wi-Fi password goes with it. The OMS Edge Gateway's idea is to keep secrets like Wi-Fi passwords and cloud API keys in a separate secure "Vault" on the device itself, so your actual program code never contains them at all.

[!IMPORTANT] This is the least complete extension in this chapter — read the Simulator Behavior section below before relying on it. Several blocks here don't yet do everything their name and tooltip suggest, in both languages, not just in the simulator. This page documents the real, current behavior plainly rather than the aspirational one.


1. Real-World Uses

The underlying idea — keeping secrets out of source code — is a genuinely important real-world practice, even though OMS's implementation of it here is still early:

  • Sharing project code safely — publishing your Blockly project or exported code without accidentally leaking your home Wi-Fi password to anyone who reads it.
  • Fleet identification — giving every deployed device its own unique ID (derived from its hardware MAC address) so a dashboard managing many boards can tell them apart.
  • Separating secrets from logic — a general best practice in real professional IoT products: the code that reads a sensor shouldn't need to also contain the password to your cloud account.

2. Vault Provisioning Architecture

Device credentials (Wi-Fi SSID, Password, Auth Tokens) are meant to be flashed once into the board's secure non-volatile storage (ESP32 Preferences / MicroPython oms_vault.py), configured through the IDE's own Settings panel rather than typed into your Blockly project. Code blocks then reference the Vault at runtime instead of containing the actual secret values.


3. Supported Blockly Blocks (5 Blocks)

Drawing the blocks…

4. Simulator Behavior

[!IMPORTANT] Same inert-but-crash-free category as Wi-Fi (Section 7.1), since this extension is built on top of it. With no real Wi-Fi connection possible in the browser Circuit Simulator:

  • Setup OMS Cloud always exhausts its retries and reports "Failed" (or "Error: No Vault" if no Vault credentials were ever configured in Settings).
  • OMS Cloud Status will show one of those failure states, never "Connected".
  • This Board Device ID still returns a real value in the simulator — the MAC/unique-ID read doesn't depend on an active network connection, just on the chip's own hardware, which the simulator does model.
  • Cloud Sync never prints anything, since it's gated on a connection that never succeeds.
  • When Cloud Event never fires — as covered above, this is true everywhere right now, not just in the simulator.
OMS Edge Cloud Gateway & Secure Vault — OMS Parts