The aim of this project is to provide a bridge component between an Eclipse Zenoh network and an Eclipse Kuksa Databroker.
It can be utilized to subscribe to a list of actuator VSS signals and propagate their state from the Kuksa Databroker to the Zenoh network on the respective key expressions and back.
The provider currently supports peer discovery in the network via UDP multicast, which can be useful for connecting to a nearby zenoh router. If peer discovery is not suitable for your use case, you can also create a direct configured connection.
The basic operation is as follows:
The provider connects to a Kuksa Databroker and subscribes to changes on the configured
target values of the configured signals. When there is a change in state, the provider will publish the
change to the zenoh network. When a device's target value changes and it publishes its current value
to the Zenoh network, the provider will detect this change and update the corresponding
current state in the Databroker.
Note: Please note that no datapoint updates for array types can be processed at this time. See kuksa_utils.rs for reference.
The main entry point for configuration is the DEFAULT_CONFIG.json5 template configuration in the root of the project. To adjust the configuration, simply copy and rename the commented example:
cp DEFAULT_CONFIG.json5 provider-config.json5
Here you can set the following things:
- URL of your Kuksa Databroker
- List of VSS paths in the Databroker to subscribe to
- Key expression for the provider to subscribe to in the Zenoh network (e.g. Vehicle/Body/Horn/IsActive)
- Zenoh (client) configuration, including
- setting the connection mode (
client
,peer
) - enabling or disabling peer discovery (scouting)
- endpoints to connect to (when using client mode), e.g. a Zenoh router
- setting the connection mode (
Use cargo to compile the project:
cargo build --release
The compiled binary is built as target/release/zenoh-kuksa-provider
.
In order to run the provider you need to pass the provider-config.json5 file as an argument like this:
./target/release/zenoh-kuksa-provider -c provider-config.json5
To enable logging use
RUST_LOG=DEBUG ./target/release/zenoh-kuksa-provider -c provider-config.json5
Use
docker build -t zenoh-kuksa-provider.
to build the image and tag it as zenoh-kuksa-provider.
The following command will run the image and mount your provider-config.json5 file into the container, setting the PROVIDER_CONFIG environment variable:
docker run \
-e "PROVIDER_CONFIG=/provider-config.json5" \
-v "$(pwd)/provider-config.json5:/provider-config.json5" \
zenoh-kuksa-provider
🚧 Remember to follow the steps from Configuring the provider in order to have a properly composed
provider-config.json5
file.