Certain plugins, like the AI Image plugin, require API credentials to function. These credentials must be stored in a .env file located at the root of the project. Once you have your API token, follow these steps:
- SSH into your Raspberry Pi and navigate to the InkyPi directory:
cd InkyPi
- Create or edit the .env file using your preferred text editor (e.g., vi, nano):
vi .env
- Add your API keys following format, with one line per key:
PLUGIN_KEY=your-key
- Save the file and exit the editor
Required for the AI Image and AI Text Plugins
- Login or create an account on the Open AI developer platform
- Crate a secret key from the API Keys tab in the Settings page
- It is recommended to set up Auto recharge (found in the "Billing" tab)
- Optionally set a Budge Limit in the Limits tab
- Store your key in the .env file with the key OPEN_AI_SECRET
OPEN_AI_SECRET=your-key
Required for the Weather Plugin
- Login or create an account on OpenWeatherMap
- Verify your email after signing up
- The weather plugin uses the One Call API 3.0 which requires a subscription but is free for up to 1,000 requests per day.
- Subscribe at One Call API 3.0 Subscription
- Follow the instructions to complete the subscription.
- Navigate to Your Subscriptions and set "Calls per day (no more than)" to 1,000 to avoid exceeding the free limit
- Store your api key in the .env file with the key OPEN_WEATHER_MAP_SECRET
OPEN_WEATHER_MAP_SECRET=your-key