A Python 3 script to relay sensor values from a SpaceAPI endpoint to an InfluxDB instance so it can be viewed in Grafana.
beverage_supplynetwork_connectionspeople_now_presenttemperaturetotal_member_count
If you want support for another type, please open an issue or pull request! :)
Copy config.example.json to config.json and adjust the values.
After installing the requirements from requirements.txt, just run python3 relay.py <endpoint-url> regularly :)
The repository provides a Dockerfile that calls relay.py in a loop.
Configure it using the following env vars:
INFLUXDB_HOSTINFLUXDB_PORTINFLUXDB_USERINFLUXDB_PASSINFLUXDB_DBSPACEAPI_ENDPOINTRELAY_INTERVAL_SECONDS
The image is published at ghcr.io/spaceapi-community/spaceapi-sensor-logger.
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.