Skip to content

Weather

Gleanvolt can record what the sky was doing at the start and the end of each charge: the temperature, the clouds, sunrise and sunset. You see it in each charge’s history, which helps explain a charge that took longer than expected.

It is optional, and changes nothing about how the car charges. It also needs your home’s location, which the setup wizard’s Site step asks for.

Open Settings and find Weather (or the setup wizard’s Extras step). Under Source, choose:

  • Not provided: no weather is recorded.
  • External: a separate program sends the weather to Gleanvolt. The OpenWeather plugin, which comes with Gleanvolt, is the ready-made one: it reads the weather from OpenWeatherMap.

Press Save. There is no need to restart.

Record the weather with the OpenWeather plugin

Section titled “Record the weather with the OpenWeather plugin”
  1. Go to openweathermap.org and create a free account.

  2. Open your account’s API keys page and copy the key.

  1. Under Weather, choose External and press Save.

  2. Start the plugin with the provider token from Settings → External providers: see Run the OpenWeather plugin below.

  3. Once it connects, its own page appears under Weather. Enter the OpenWeatherMap key there and press Save and check.

The weather section on Settings, with the OpenWeather plugin connected and its page shown.

Gleanvolt asks the plugin when a charge starts and when it ends, and the plugin asks OpenWeatherMap at most once every 10 minutes, well within the free plan. If the plugin isn’t running or doesn’t answer within 15 seconds, that charge is recorded without the weather. Nothing else is affected.

If you used OpenWeather in Gleanvolt before

Section titled “If you used OpenWeather in Gleanvolt before”

Gleanvolt used to ask OpenWeatherMap itself, with the key entered under Weather. That is gone: the weather from OpenWeatherMap now comes only through the OpenWeather plugin. After the update, Gleanvolt chooses External for you and says so under Weather, until the plugin connects:

The weather section on Settings after the update, saying that the weather now comes from the OpenWeather plugin.

The key you saved in Gleanvolt is not kept. Start the plugin as below, and enter your key again on its page. Until then, charges are recorded without the weather.

The OpenWeather plugin comes with each Gleanvolt release, as a container and as a download. Use the same version as your Gleanvolt. Each way starts with the token:

  1. Open Settings → External providers and press Make a token. Copy the token, which starts with gvp_.

  2. Start the plugin, as shown for your installation below.

  3. Under Weather, choose External and press Save. The plugin’s page appears there once it connects.

Make the plugin’s folder, then start it next to Gleanvolt. Put your token in place of gvp_...:

Terminal window
sudo mkdir -p /opt/gleanvolt/plugins/openweather
sudo chown 1654:1654 /opt/gleanvolt/plugins/openweather
sudo chmod 700 /opt/gleanvolt/plugins/openweather
docker run -d --name gleanvolt-plugin-openweather --restart unless-stopped --init \
--network host \
-e Gleanvolt__Token=gvp_... \
-v /opt/gleanvolt/plugins/openweather:/data \
ghcr.io/mpospisil/gleanvolt-plugin-openweather:latest

The folder keeps the OpenWeatherMap key, and only the plugin can read it. If Gleanvolt isn’t on port 8090, add -e Gleanvolt__Endpoint=http://localhost:<its port>.

The plugin’s page uses port 8096 on the same computer as Gleanvolt. Gleanvolt opens it under the same name you opened Gleanvolt at, so gleanvolt.local and the address both work.

If you make a new token, the plugin disconnects until you start it with the new one.