1 stable release
1.0.0 | Apr 4, 2024 |
---|
#271 in Asynchronous
107 downloads per month
80KB
1.5K
SLoC
Fundamentum Edge Daemon
The supported way to access Fundamentum's ecosystem from linux devices.
Edge daemon
Getting Started
config.toml
and provisioning.json
files will be generated in the current
working directory unless specified:
$ cargo run -- \
--config /path/to/config.toml \
--state_dir /path/to/statedir/
# ..
The gRPC server will bind to 127.0.0.1:8080
by default.
Examples
Use the gRPC endpoints to interact with the daemon:
-
To provision the device:
$ grpcurl \ -plaintext \ -d '{ "api_base_url": "mqtts.fundamentum-iot-dev.com", "project_id": 1, "region_id": 2, "registry_id": 3, "serial_number": "device1", "asset_type_id": 4, "access_token": "TOKEN" }' \ 127.0.0.1:8080 \ com.fundamentum.edge.v1.Provisioning.Provision # ...
-
To publish telemetry data:
$ grpcurl \ -plaintext \ -d '{ "sub_topic": "test", "qos": 0, "payload": "SGVsbG8sIFdvcmxkIQ==" }' \ 127.0.0.1:8080 \ com.fundamentum.edge.v1.Telemetry.PublishTelemetry # ...
-
To get the device configuration:
$ grpcurl \ -plaintext \ 127.0.0.1:8080 \ com.fundamentum.edge.v1.Configuration.Get # ...
-
To subscribe to configuration updates:
$ grpcurl \ -plaintext \ 127.0.0.1:8080 \ com.fundamentum.edge.v1.Configuration.UpdateStream # ...
For more options, use --help
Development setup
Please see the development setup guide.
License
Licensed under Apache License, Version 2.0 LICENSE.
Dependencies
~25–61MB
~1M SLoC