The core component of the Cyberwave Edge Node
Project description
Cyberwave Edge Core
This Edge component acts as an orchestrator of your Cyberwave edge components.
Quickstart (Linux machines)
SSH into the device where you want to install the edge.
# Install the CLI (one time setup)
curl -fsSL https://cyberwave.com/install.sh | bash
# Use the CLI to complete the edge setup
sudo cyberwave edge install
The cyberwave-cli will ask you to log in with your Cyberwave credentials and then will proceed installing the cyberwave-edge-core on your edge device.
Don't have a Cyberwave account? Get one at cyberwave.com
Configuration
The edge core reads configuration from /etc/cyberwave/ (overridable via the CYBERWAVE_EDGE_CONFIG_DIR environment variable, which is set in the systemd unit):
| File | Description |
|---|---|
credentials.json |
API token, workspace info |
fingerprint.json |
Device fingerprint |
environment.json |
Linked environment UUID |
Of the files above, the core needs only the credentials.json file. You can easily populate it with the cyberwave-cli as described in the quickstart.
The fingerprint.json is populated by the core itself.
How the edge works
Once it's started (either via CLI or via service) the core does the following:
- Checks if the credentials stored in
credentials.jsonare valid - Connects to the backend MQTT and checks if the connection is up and running
- Registers the
edgedevice is running on, or updates its registration record. Eachedgedevice is defined by a unique hardware fingerprint - Downloads the latest environment from the backend and resolves the twins linked to this edge fingerprint
- Starts drivers for linked twins, with one special case for attached camera twins:
- if a linked twin is a camera child twin (
attach_to_twin_uuid) of another linked twin, edge-core does not start a dedicated driver for that camera child - edge-core passes camera child UUIDs to the parent driver via
CYBERWAVE_CHILD_TWIN_UUIDS
- if a linked twin is a camera child twin (
Remote restart (via Edge REST API)
POST /api/v1/edges/{uuid}/restart-core publishes an MQTT command to:
edges/{edge_uuid}/command
with {"command":"restart_edge_core", ...} payload.
The running edge-core subscribes to that topic using the Cyberwave SDK and, when it receives the command, it:
- Deletes cached twin JSON objects under the edge config directory
- Stops/removes edge-managed driver containers and prunes stopped containers
- Re-downloads the linked environment twins and starts drivers again
Writing compatible drivers
A Cyberwave driver is a Docker image that is capable of interacting with the device's hardware, sending and getting data from the Cyberwave backend. Every time the core starts a driver Docker image, the core does so by defining the following environment variables:
CYBERWAVE_TWIN_UUIDCYBERWAVE_API_KEYCYBERWAVE_TWIN_JSON_FILECYBERWAVE_CHILD_TWIN_UUIDS(optional, comma-separated)
CYBERWAVE_CHILD_TWIN_UUIDS is present when the driver twin has attached camera child twins in the same linked set. Drivers can use this to discover and coordinate child twins without relying on extra camera selection prompts.
The Cyberwave twin JSON file is an absolute path to a JSON file. The JSON file is writable by the driver. It represents a complete twin object as well as its complete asset object. It represented in the same way that is it in the API, including the whole metadata field, schema and abilities. Twin reference here, Asset reference here.
As a driver, you can change the JSON file. The core will, when connectivity is present, sync it with the one in the backend.
When writing drivers, use the official Cyberwave SDK to communicate with the backend, as it will abstract a bunch of complexity in the MQTT handshake, REST API authentication, and more.
Once you wrote a driver, you can add its details in the twin's metadata (or the asset's metadata if you own it). Right now the edit is manual and directly in the metadata. To edit the metadata, you can switch to Advanced editing in the environment or in the asset editing.
Note: If you change the metadata on the asset, every twin created out of that asset from that moment on will have the same metadata as the asset, as the starting point
The driver object in the metadata looks like this:
"drivers": {
"default": {
"docker_image":"cyberwaveos/so101-driver", // this is either a public image on the Docker hub or on your own registry
"version": "0.0.1", // this field is optional
"params" : ["--network local", "--add-host host.docker.internal:host-gateway"] // this is also optional
}
}
For an example, check how the camera driver handles the TWIN JSON file.
Passing environment variables to drivers (metadata["drivers"])
To inject environment variables into a driver container, use the params field with Docker's -e flag:
"drivers": {
"default": {
"docker_image": "cyberwaveos/go2-native-driver",
"params": ["-e", "MY_VAR=value", "-e", "ANOTHER_VAR=value2"]
}
}
Each -e must be its own element in the array, followed by the KEY=value string as the next element. This is equivalent to passing -e MY_VAR=value on the docker run command line.
This is useful for driver-specific configuration that varies per device, such as IP addresses, credentials, or feature flags that cannot be stored in the twin's edge_configs metadata.
Runtime configuration for drivers (metadata["edge_configs"])
Drivers and edge services should treat metadata["edge_configs"] as the source of truth for per-device runtime configuration.
Edge identity should be stored at metadata["edge_fingerprint"] (not duplicated inside edge_configs).
Runtime access: The core passes the full twin JSON (including
metadata) to every driver via theCYBERWAVE_TWIN_JSON_FILEenvironment variable. Drivers can readedge_configsfrom that file at startup to obtain per-device settings — for example, selecting the right camera source or IP address for the current machine. This is the recommended way to pass device-specific configuration to a driver without hardcoding values in the image.
- Type: object/dictionary
- Value: binding object (
object)
Canonical shape:
"edge_fingerprint": "macbook-pro-a1b2c3d4e5f6",
"edge_configs": {
"camera_config": {
"camera_id": "front",
"source": "rtsp://user:pass@192.168.1.20/stream",
"fps": 10,
"resolution": "VGA",
"camera_type": "cv2"
}
}
Field notes:
edge_fingerprint(recommended): fingerprint of the edge currently serving this twin (top-level metadata field).camera_config(recommended): per-device camera/runtime config consumed by edge drivers.- Do not store
edge_uuid,registered_at,last_sync,last_ip_address, orstatus_datainsideedge_configs.
Backward compatibility:
- Older records may still use the legacy map shape (
edge_configs[fingerprint] = {...}). - Older records may store camera settings in
cameras[0]or as top-level fields. - New writers should always write to
camera_config. - Do not rely on
PUT /api/v1/edges/{uuid}/twins/{twin_uuid}/camera-config; it is deprecated. Update twin metadata instead.
Advanced usage
Manual install and usage
# Install the registry signing key:
curl -fsSL "https://packages.buildkite.com/cyberwave/cyberwave-edge-core/gpgkey" | gpg --dearmor -o /etc/apt/keyrings/cyberwave_cyberwave-edge-core-archive-keyring.gpg
# Configure the source:
echo -e "deb [signed-by=/etc/apt/keyrings/cyberwave_cyberwave-edge-core-archive-keyring.gpg] https://packages.buildkite.com/cyberwave/cyberwave-edge-core/any/ any main\ndeb-src [signed-by=/etc/apt/keyrings/cyberwave_cyberwave-edge-core-archive-keyring.gpg] https://packages.buildkite.com/cyberwave/cyberwave-edge-core/any/ any main" > /etc/apt/sources.list.d/buildkite-cyberwave-cyberwave-edge-core.list
# Run all startup checks (validate token, MQTT, devices, environment)
cyberwave-edge-core
# Show current credential, token, MQTT, and device status
cyberwave-edge-core status
# Show version
cyberwave-edge-core --version
Other env vars
To run against another env:
export CYBERWAVE_ENVIRONMENT="yourenv"
export CYBERWAVE_BASE_URL="https://yourbaseurl"
cyberwave-edge-core
Or from the CLI
sudo CYBERWAVE_ENVIRONMENT="yourenv" CYBERWAVE_BASE_URL="https://yourbaseurl" cyberwave edge install
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cyberwave_edge_core-0.0.26.tar.gz.
File metadata
- Download URL: cyberwave_edge_core-0.0.26.tar.gz
- Upload date:
- Size: 27.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75cb8c057752cdb25dbf0539fd1e4f6b381c7ec190522f19bb4d743199d7c00a
|
|
| MD5 |
0ec60671a679f7eef50bd259c5d14fc9
|
|
| BLAKE2b-256 |
3fc4b9e7141c55bcb524964465e7bc208eb93863371ebdd6c7dd46f991fdd8b5
|
Provenance
The following attestation bundles were made for cyberwave_edge_core-0.0.26.tar.gz:
Publisher:
release-pypi.yml on cyberwave-os/cyberwave-edge-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cyberwave_edge_core-0.0.26.tar.gz -
Subject digest:
75cb8c057752cdb25dbf0539fd1e4f6b381c7ec190522f19bb4d743199d7c00a - Sigstore transparency entry: 1027824743
- Sigstore integration time:
-
Permalink:
cyberwave-os/cyberwave-edge-core@0e60d52f40f05d4959bb3788354de433aad74673 -
Branch / Tag:
refs/tags/v0.0.26 - Owner: https://github.com/cyberwave-os
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@0e60d52f40f05d4959bb3788354de433aad74673 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cyberwave_edge_core-0.0.26-py3-none-any.whl.
File metadata
- Download URL: cyberwave_edge_core-0.0.26-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8296fd0c62a7baab31ec83f727da2aef5af54c9585f1f5b0a7113c487a40bc4
|
|
| MD5 |
9b4732e1bd281c3f71c7f882ab8a2fa1
|
|
| BLAKE2b-256 |
807b4a2ffaa0070637e91aaecd56cb95c8188991e501c72547a53a3ce6bb8814
|
Provenance
The following attestation bundles were made for cyberwave_edge_core-0.0.26-py3-none-any.whl:
Publisher:
release-pypi.yml on cyberwave-os/cyberwave-edge-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cyberwave_edge_core-0.0.26-py3-none-any.whl -
Subject digest:
f8296fd0c62a7baab31ec83f727da2aef5af54c9585f1f5b0a7113c487a40bc4 - Sigstore transparency entry: 1027824818
- Sigstore integration time:
-
Permalink:
cyberwave-os/cyberwave-edge-core@0e60d52f40f05d4959bb3788354de433aad74673 -
Branch / Tag:
refs/tags/v0.0.26 - Owner: https://github.com/cyberwave-os
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@0e60d52f40f05d4959bb3788354de433aad74673 -
Trigger Event:
push
-
Statement type: