8000 GitHub - proffalken/ttn2otel: Translate payloads from The Things Network to an OpenTelemetry endpoint.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Translate payloads from The Things Network to an OpenTelemetry endpoint.

License

Notifications You must be signed in to change notification settings

proffalken/ttn2otel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TTN2OTEL

Translate payloads from The Things Network to an OpenTelemetry endpoint.

Usage

Create a configuration file with the following content:

ttn:
  mqtt_user: <your TTN MQTT Username>
  mqtt_pass: <your TTN MQTT Password>
  mqtt_server: <your MQTT Server>
  mqtt_tls: True
lookups:
  enabled: True
  server: https://<your device api server>

Lookups

The data lookup functionality allows you to retrieve more information about the device via a remote API.

Initially we only support the lookup of static lat/long coordinates via the Make Monmouth Sensor Management Portal as part of our Air Quality Sensor network, allowing us to update the location of the sensor on a map without needing the additional cost of a GPS module in the sensor itself.

Pull Requests to improve this part of the code are welcome!

Run the code

Make sure you have an Open Telemetry endpoint available, then run the following:

poetry run opentelemetry-instrument \
  --traces_exporter console,otlp \
  --metrics_exporter console,otlp \
  --logs_exporter console,otlp \
  --service_name ttn2otel \
  --exporter_otlp_endpoint http://127.0.0.1:4318 \
  --exporter_otlp_protocol http/protobuf \ 
  python src/ttn2otel.py

About

Translate payloads from The Things Network to an OpenTelemetry endpoint.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 
0