Skip to content

Latest commit

 

History

History
65 lines (39 loc) · 1.71 KB

README.md

File metadata and controls

65 lines (39 loc) · 1.71 KB

SpaceAPI InfluxDB Sensor Logger

Docker Image

A Python 3 script to relay sensor values from a SpaceAPI endpoint to an InfluxDB instance so it can be viewed in Grafana.

Supported sensor types

  • beverage_supply
  • network_connections
  • people_now_present
  • temperature
  • total_member_count

If you want support for another type, please open an issue or pull request! :)

Configuration

Copy config.example.json to config.json and adjust the values.

Running

After installing the requirements from requirements.txt, just run python3 relay.py <endpoint-url> regularly :)

Docker

The repository provides a Dockerfile that calls relay.py in a loop. Configure it using the following env vars:

  • INFLUXDB_HOST
  • INFLUXDB_PORT
  • INFLUXDB_USER
  • INFLUXDB_PASS
  • INFLUXDB_DB
  • SPACEAPI_ENDPOINT
  • RELAY_INTERVAL_SECONDS

The image is published at ghcr.io/spaceapi-community/spaceapi-sensor-logger.

License

Licensed under either of

at your option.

Contribution

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.