Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

weather.reaplugin

Local weather for the Decaid live screen: temperature now, rain split by part of the day, and today's high and low.

The plugin emits on /ws/v1/plugins/weather.reaplugin/weather, which any skin can read. It holds no credentials and its only outbound call is to Open-Meteo, which needs no API key. The location is looked up once from the name you set and remembered.

Settings

setting meaning
Location a town or suburb, e.g. Brunswick, AU. Looked up once and remembered.
RefreshMinutes how often to ask for a new reading. 30 is plenty; below 10 is ignored.

Permissions

log, api, emit, pluginStorage. api is required — without it the Open-Meteo request is refused and the plugin emits nothing at all.

Releases

Each release carries one asset, weather.reaplugin-v<version>.zip, holding a single weather.reaplugin/ directory with manifest.json and plugin.js in it. The directory must be inside the archive: Decaid unpacks the ZIP into assets/plugins/ and expects assets/plugins/weather.reaplugin/ to appear. A flat archive unpacks two loose files and the fetch fails.

.github/workflows/release.yml builds the asset, so push a tag rather than building one by hand. It refuses a tag that does not match the manifest version, and it checks the id, the apiVersion, the four permissions, the createPlugin entry point, and that plugin.js reports the same version the manifest declares.

Decaid fetches the asset with scripts/fetch_weather_plugin.sh, which pins the tag and its SHA-256. Bump the pin in Decaid after every release here, or the fetch keeps installing the old version.

Why the plugin does the arithmetic

Open-Meteo's daily answer carries one rain probability for the whole day, which is not the question anyone asks standing at a machine. Its hourly answer carries a value per hour, so the plugin buckets those into morning, afternoon and evening itself.

timezone=auto is on the request, so the daily arrays are the location's days rather than the tablet's — which matters for a machine set to one timezone asking about another.

Absent values are null, never 0. Number(null) is 0 and 0 degrees is a real temperature, so a truthy test would send a missing high as a real zero.

About

Local weather plugin for Decaid — temperature, rain by part of day, today's high and low

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages