Enable the module
Adddevice-rpc to your Omega profile. The reference profile is omega/profiles/rpc-example.yaml — add an explicit bridge_id as in the minimal block below if the profile does not already set one.
Minimal configuration:
Broker URL, TLS, credentials, and
connection.root_topic come from the connection: block (or their env var overrides), not from device-rpc.
Connection env vars:
OMEGA_MQTT_BROKER_URL, OMEGA_DEVICE_ID, OMEGA_ROOT_TOPIC, plus optional OMEGA_MQTT_USERNAME, OMEGA_MQTT_PASSWORD, and TLS cert paths (OMEGA_TLS_CA_PATH, OMEGA_TLS_CERT_PATH, OMEGA_TLS_KEY_PATH).Run locally
Terminal 1 — MQTT broker:golain.device.v1.EchoService.
Run against Golain
Register the device in the Console first, then point Omega at the Golain MQTT broker with mTLS credentials:device-rpc.bridge_id in your profile to match the device id you registered. Update bridge_id whenever you change the device identity.
Verify schema registration
After Omega connects, confirm the platform bound your service schema:descriptor_digest and a non-empty services array. Empty services means announce or reflection has not completed yet.
Optional — force reflection (when the device is online but services are stale):
can_write_device_metadata on the device.
Echo example service
The bundled example implementsgolain.device.v1.EchoService:
Proto source:
omega/modules/device-rpc/proto/golain/device/v1/echo.proto.
Request body for Echo:
Example invoke
After schema binding, try a synchronous call from your machine:Bring your own gRPC service
-
Define
.protoservices and generate Go stubs. - Register your service on a gRPC server with gRPC reflection enabled (required for platform schema registration).
-
Wire your server into the Omega
device-rpcmodule build. -
Regenerate embedded descriptors:
- Deploy the device. On connect, the platform reflects and binds your new schema automatically.
Idempotency for queued invoke
If cloud callers use Queued invoke, the platform may deliver the same RPC to your handler more than once. The platform does not attachcall_id to the gRPC request bytes sent to the device.
Next steps
- Invoking methods — HTTP API from integrators
- Queued invoke — offline-tolerant delivery
- How it works — registration and invoke overview
- Troubleshooting — announce and invoke issues
For announce-only testing without a live MQTT broker listener, set
connection.transport: memory in a copied profile. Schema announce logic runs; the RPC listener is skipped.