A Raspberry Pi time and weather display project based off of resin-electron-vue
Storing a DarkSky API Key and Instagram Token for Development and Production
Create a .env file in the root directory of your project. Add an environment variable containing your DarkSky API key on a new line in the form of DARKSKY=YOUR_API_KEY_HERE Add an environment variable containing your Instagram token on a new line in the form of INSTAGRAM=YOUR_TOKEN_HERE
For a Balena (formerly Resin.io) device, create a DARKSKY device variable and an INSTAGRAM device variable in the dashboard.
# install dependencies yarn install # serve with hot reload at localhost:9080 yarn run dev # build electron application for production yarn run build # lint all JS/Vue component files in `src/` yarn run lint
- Serve up display remotely
Some Things Learned From Working On This Project:
Balena on the Raspberry Pi
Rotating the Raspberry Pi display in a Balena application
In the device configuration tab of the Balena dashboard, create a RESIN_HOST_CONFIG_lcd_rotate custom environment variable and give it a value of 2 to rotate the Raspberry Pi display 180 degrees.
Working with the DarkSky API and using cors-anywhere to access the API in a development environment.
I tried using Skycons and the vue-skycon NPM module, but there seems to be a memory leak that caused the application to crash after a few days.
Integrated with resin based on resin-electronjs
Documentation about the original structure can be found here.
The weather icons used in this project come from Weather Icons