ClimaCell API v4 (#8)
* gets lan/lon from map geo * climacell v4 endpoints * Uses ClimaCell API v4, adds Sunrise-Sunset API
This commit is contained in:
@@ -1,22 +1,29 @@
|
||||
|
||||
# Pi Weather Station
|
||||
|
||||
This is a weather station designed to be used with a Raspberry Pi on the official 7" 800x480 touchscreen.
|
||||
|
||||

|
||||
|
||||
The weather station will require you to have API keys from [Mapbox](https://www.mapbox.com/) and [ClimaCell](https://www.climacell.co/). Optionally, you can use an API key from [LocationIQ](https://locationiq.com/) to preform reverse geocoding.
|
||||
The weather station will require you to have API keys from [Mapbox](https://www.mapbox.com/) and [ClimaCell (v4)](https://www.climacell.co/). Optionally, you can use an API key from [LocationIQ](https://locationiq.com/) to preform reverse geocoding.
|
||||
|
||||
Weather maps are provided by the [RainViewer](https://www.rainviewer.com/) API, which generously does not require an [API key](https://www.rainviewer.com/api.html).
|
||||
|
||||
Sunrise and Sunset times are provided by [Sunrise-Sunset](https://sunrise-sunset.org/), which generously does not require an [API key](https://sunrise-sunset.org/api).
|
||||
|
||||
See it in action [here](https://www.youtube.com/watch?v=dvM6cyqYSw8).
|
||||
|
||||
> Be mindful of the plan limits for your API keys and understand the terms of each provider, as scrolling around the map and selecting different locations will incur API calls for every location. Additionally, the weather station will periodically make additional api calls to get weather updates throughout the day.
|
||||
|
||||
## Setup
|
||||
# v2.0.0
|
||||
|
||||
1-22-2021: Now uses [ClimaCell](https://www.climacell.co/) API v4. For ClimaCell API v3 keys, use [Pi Weather Station v1](https://github.com/elewin/pi-weather-station/releases/tag/v1.0).
|
||||
|
||||
# Setup
|
||||
|
||||
> You will need to have [Node.js](https://nodejs.org/) installed.
|
||||
|
||||
To install, clone the repo and run
|
||||
To install, clone the repo and run
|
||||
|
||||
$ npm install
|
||||
|
||||
@@ -26,7 +33,7 @@ Start the server with
|
||||
|
||||
Now set point your browser to `http://localhost:8080` and put it in full screen mode (`F11` in Chromium).
|
||||
|
||||
### Access from another machine
|
||||
## Access from another machine
|
||||
|
||||
It's possible to access the app from another machine, but beware that by doing so you'll be exposing the app to your entire network, and someone else could potentially access the app and retreive your API keys from the settings page. By default the app is only accessible to `localhost`, but if you would like to open it up to your network (at your own risk!), open `/server/index.js` and remove `"localhost"` from the line that contains:
|
||||
|
||||
@@ -42,13 +49,13 @@ app.listen(PORT, async () => {
|
||||
|
||||
The server will now serve the app across your network.
|
||||
|
||||
## Settings
|
||||
# Settings
|
||||
|
||||
- Your API keys are saved locally (in plain text) to `settings.json`.
|
||||
- The server will attempt to get your default location, but if it cannot or you wish to choose a different default location, enter the latitude and longitude under `Custom Latitude` and `Custom Longitude` in settings, which can be accessed by tapping the gear button in the lower right hand corner.
|
||||
- The server will attempt to get your default location, but if it cannot or you wish to choose a different default location, enter the latitude and longitude under `Custom Latitude` and `Custom Longitude` in settings, which can be accessed by tapping the gear button in the lower right hand corner.
|
||||
- To hide the mouse cursor when using a touch screen, set `Hide Mouse` to `On`.
|
||||
|
||||
## License
|
||||
# License
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user