Skip to content

winterer/awattar-scraper

Repository files navigation

Awattar Scraper

Gets the energy prices from the Awattar API and pushes them to an InfluxDB.

Usage

For information about supported commands, use --help:

docker run --rm mwinterer/awattar-scraper:latest --help

Supported Environment Variables

  • INFLUXDB_V2_URL: URL of the InfluxDB (version 2 - either OSS or Cloud). Defaults to http://localhost:8086.
  • INFLUXDB_V2_ORG: InfluxDB organisation. Required.
  • INFLUXDB_V2_BUCKET: InfluxDB bucket within the organization to write the data to. Defaults to awattar.
  • INFLUXDB_V2_TOKEN: InfluxDB access token. Required if authentication is required.

Usage Examples

The following examples assume the required environment variables (see above) are properly set. This can either be done via:

  • Option -e
  • Environment file (--env-file <file>)
  • Defining the environment variable on the host

Scrape the energy prices of the following day (tomorrow) and remove the container:

docker run --rm mwinterer/awattar-scraper:latest --start tomorrow

Scrape the energy prices of the current day (today) and remove the container:

docker run --rm mwinterer/awattar-scraper:latest --start today

Scrape the energy prices of a specific time range and remove the container:

docker run --rm mwinterer/awattar-scraper:latest --start 2024-01-01 --end 2024-01-31

Scrape the energy prices of the following day (tomorrow) and keep the container for future usage:

docker run --name awattar-scraper mwinterer/awattar-scraper:latest --start tomorrow

... so it can be started again, e.g., via a cron job every day:

docker start awattar-scraper

About

Gets the energy prices from the Awattar API and pushes them to an InfluxDB.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors