Skip to content

DevJCrystal/WeatherBot

Repository files navigation

WeatherBot

Raspberry Pi Zero + E-Ink + Tomorrow.io = ❤️

Now with InkyPhat support for Raspberry Pi Zero!

Supported Displays

  • Waveshare 2.13" E-Paper displays (epd2in13_V2, epd2in13bc)
  • Pimoroni InkyWHAT (400x300, 3-color) - Larger display, perfect for detailed weather info!
  • Pimoroni InkyPHAT (212x104, 3-color) - Compact display, great for Pi Zero!

Quick Setup for Inky Displays on Pi Zero

  1. Run the automated setup:

    chmod +x install_inkyphat.sh
    ./install_inkyphat.sh
  2. Get your API key: Sign up for a free account at Tomorrow.io and get your API key. For free, you get 500 calls a day.

  3. Configure your location: Edit settings.ini and add:

    • Your Tomorrow.io API key
    • Your latitude and longitude coordinates
    • Set Screen_Type=inky_what (for InkyWHAT) or inky_phat (for InkyPHAT)
  4. Test your setup:

    python3 test_inkyphat.py
  5. Run WeatherBot:

    python3 main.py

Manual Installation

If you prefer manual setup:

# Install requirements
pip3 install -r requirements.txt

# Install InkyPhat library (Pi only)
curl https://get.pimoroni.com/inky | bash

# Enable SPI interface (required for InkyPhat)
sudo raspi-config nonint do_spi 0

Run the script with python3 main.py. This will generate the settings.ini file if it doesn't exist. Enter your API key, latitude, and longitude coordinates.

Configuration

Edit settings.ini:

[API]
Key=your_tomorrow_io_api_key_here

[Location]
Lat=40.7128
Long=-74.0060

[Application_Settings]
Screen_Type=inky_what
Save_Image=False
Flip_Image=False

Display Types

Choose the appropriate screen type in settings.ini:

InkyWHAT (400x300) - Recommended

  • Larger display with more room for weather details
  • Higher resolution for crisp text and larger icons
  • Better visibility of all weather information
  • Set Screen_Type=inky_what

InkyPHAT (212x104) - Compact

  • Smaller footprint perfect for minimal setups
  • Lower power consumption
  • Compact layout with essential weather info
  • Set Screen_Type=inky_phat

Inky Display Features

  • Low power consumption - Perfect for Pi Zero projects
  • 3-color display - Black, white, and red/yellow/black variants
  • No backlight - Always visible, easy on the eyes
  • Weather alerts highlighted in accent color
  • Auto-detection of display size and type

Auto-start on Boot

Add to crontab (crontab -e):

@reboot sleep 60 && cd /path/to/WeatherBot-Remastered/ && /usr/bin/python3 main.py &

(Alert was showing because flash flooding in the area - Future thought, might show qr code to link to alert hmmm)

Supported Screen Types

Set Screen_Type in settings.ini to one of:

  • inky_what - Pimoroni InkyWHAT 400x300 (recommended for detailed weather display)
  • inky_phat - Pimoroni InkyPHAT 212x104 (compact display for Pi Zero)
  • epd2in13_V2 - Waveshare 2.13" V2
  • epd2in13bc - Waveshare 2.13" B/C

Credits:

Icons: Bluxart - Meteocons Icon Pack

About

Raspberry Pi Zero + E-Ink + Tomorrow.io = ❤️

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published