A Home Assistant integration for fetching NOAA weather forecasts and sending them via email to satellite communicators.
- Fetches NOAA weather forecasts for GPS coordinates
- Supports multiple forecast formats (summary, compact, full)
- Email delivery to satellite communicators (ZOLEO, InReach)
- Automatic message splitting for device character limits
- Configurable scanning interval (1-1440 minutes)
- Two-step configuration process (email setup + forecast settings)
- Automatic folder detection and dropdown selection
- IMAP folder validation with helpful error messages
- Debug logging for troubleshooting
- Modern pytest-based test suite
- Enhanced weather event detection (rain, snow, sleet, wind, thunderstorms, fog, smoke)
- Advanced smoke detection with probability levels (areas of smoke: 65%, wildfire smoke: 75%, heavy smoke: 90%)
- Standard forecast abbreviations (Tonight: "Tngt", This Afternoon: "Aft")
- Extreme event highlighting with warning indicators (π¨)
- Temperature formatting with degree symbols (Β°)
- Wind speed detection with significant wind filtering (15+ mph)
- Probability inference for weather events when not explicitly stated
- Compact format with 1500 character limit for longer forecasts
To request a weather forecast, simply send an email to the address monitored by SatCom Forecast (the IMAP account you configured). The integration will extract the GPS coordinates from the email body and send a forecast reply to the sender.
Basic Syntax:
- The email body must contain latitude and longitude in decimal degrees (separated by a comma, space, or semicolon):
61.11027, -149.79715
- Optionally, you can specify a format keyword (
summary
,compact
, orfull
) anywhere in the message to override the default format:
61.11027, -149.79715
format: summary
or simply:
61.11027, -149.79715 summary
Example:
Subject: Forecast Request
Body:
61.11027, -149.79715 compact
The integration will detect the coordinates and format, fetch the forecast, and reply to the sender with the requested weather information.
To keep your inbox organized, consider setting up email filters or rules to automatically move forecast request emails to a dedicated folder. This helps separate forecast requests from regular emails and makes it easier to monitor the system.
Gmail Example:
- Go to Gmail Settings β Filters and Blocked Addresses
- Click "Create a new filter"
- Set criteria (e.g., "Subject contains: forecast" or "From: [email protected]")
- Choose "Apply the label" and create a new label like "SatCom Forecasts"
- Check "Skip the Inbox" to keep requests out of your main inbox
Outlook Example:
- Go to Settings β View all Outlook settings β Mail β Rules
- Click "Add new rule"
- Set conditions (e.g., "Subject contains: forecast")
- Choose "Move to" and select your forecast folder
- Save the rule
Other Email Providers: Most email providers support similar filtering options. Look for "Rules," "Filters," or "Actions" in your email settings to set up automatic organization.
Benefits:
- Keeps your main inbox clean
- Makes it easier to monitor forecast requests
- Allows you to set up different folders for different purposes
- Helps with troubleshooting if issues arise
- Open HACS in your Home Assistant sidebar
- Go to Integrations
- Click the + button in the bottom right
- Search for "SatCom Forecast"
- Click Download
- Restart Home Assistant
- Go to Settings > Devices & Services > Add Integration
- Search for "SatCom Forecast" and configure
If the integration is not yet in the default store:
- Open HACS in your Home Assistant sidebar
- Go to Integrations
- Click the + button in the bottom right
- Click Custom repositories
- Add repository:
clayauld/satcom-forecast
- Category: Integration
- Click Add
- Find "SatCom Forecast" in the list and click Download
- Restart Home Assistant
- Go to Settings > Devices & Services > Add Integration
- Search for "SatCom Forecast" and configure
- Copy the
custom_components/satcom_forecast
folder to your Home Assistantconfig/custom_components/
directory - Restart Home Assistant
- Add the integration via the UI
satcom-forecast/
βββ custom_components/satcom_forecast/ # Main integration code
βββ tests/ # Test suite
βββ docs/ # Documentation
βββ .github/ # GitHub workflows
βββ .translations/ # Translation files
βββ hacs.json # HACS configuration
βββ README.md # This file
The integration uses a two-step configuration process similar to Mail and Packages:
Enter your IMAP and SMTP server details to connect to your email account:
- IMAP Host: Your email provider's IMAP server (e.g., imap.gmail.com)
- IMAP Port: IMAP port (usually 993 for SSL, 143 for STARTTLS, 143 for None)
- IMAP Security: Choose SSL (recommended), STARTTLS, or None (unencrypted)
- Username: Your email address or username (depending on your provider)
- Password: Your email password or app password
- SMTP Host: Your email provider's SMTP server (e.g., smtp.gmail.com)
- SMTP Port: SMTP port (usually 587 for TLS)
- SMTP Username: Your email address
- SMTP Password: Your email password or app password
After successfully connecting to your email account, configure the forecast settings:
- Mail Folder: Select from available folders in your email account
- Forecast Format: Choose summary, compact, or full format
- Device Type: Select ZOLEO or InReach
- Character Limit: Set message length limit (0 = no limit)
- Debug Logging: Enable detailed logging for troubleshooting
- Scanning Interval: How often to check for new emails (1-1440 minutes)
The integration will automatically detect and list all available folders in your email account, making it easy to select the correct folder to monitor.
After the integration is installed, you can reconfigure all settings at any time:
- Go to Settings > Devices & Services
- Find "SatCom Forecast" in your integrations list
- Click on the integration entry
- Click Configure to open the reconfiguration options
- Modify any settings as needed:
- Email server settings (IMAP/SMTP)
- Forecast format and device type
- Character limits and debug settings
- Polling interval (how often to check for new emails)
- Click Submit to save changes
Note: Passwords are hidden by default in the configuration forms for security. You only need to enter passwords if you want to change them. The polling interval change takes effect immediately after saving.
The integration supports three forecast formats:
- Summary: Concise time-based summaries with weather events and probabilities (1500 character limit)
- Compact: Detailed multi-line format with weather highlights and temperature/wind info (1500 character limit)
- Full: Complete NOAA forecast text (2000+ character limit)
See docs/format_comparison.md for detailed format comparisons.
All formats support comprehensive weather event detection:
- Precipitation: Rain, showers, drizzle, sprinkles
- Winter Weather: Snow, blizzard, flurries, sleet, freezing rain
- Wind: Significant wind events (15+ mph) with direction and speed
- Thunderstorms: Thunderstorms, severe thunderstorms
- Fog: Fog, dense fog, patchy fog, mist
- Smoke: Areas of smoke, widespread haze, wildfire smoke, heavy smoke (with alarm emoji π¨)
- Extreme Events: Blizzard, ice storm, tornado, hurricane, severe thunderstorm, high wind warning, flood warning, dense fog, smoke
- Warning Indicators: Extreme events and smoke conditions are marked with π¨
- Temperature Formatting: High/low temperatures with degree symbols (Β°)
- Wind Detection: Only shows wind events for significant speeds (15+ mph)
- Probability Inference: Provides meaningful percentages when NOAA doesn't specify them
- Smart Truncation: Cuts at sentence boundaries to maintain readability
- Standard Abbreviations: Uses standard forecast abbreviations (Tngt for Tonight, Aft for This Afternoon)
The integration checks for new GPS coordinate emails at regular intervals. You can configure this scanning interval during setup or reconfiguration:
- Range: 1 to 1440 minutes (1 minute to 24 hours)
- Default: 5 minutes
- Recommendation: 5-15 minutes for most use cases
- Faster scanning (1-5 minutes): More responsive but higher email server load
- Slower scanning (15+ minutes): Lower server load but delayed responses
- Email server limits: Some providers have rate limits on IMAP connections
- Battery usage: For mobile devices, consider longer intervals to save battery
The scanning interval change takes effect immediately when you save the configuration.
The integration includes a comprehensive pytest-based test suite. To run tests:
# Run all tests
pytest tests/ -v
# Run specific test file
pytest tests/test_forecast_parser.py -v
The test suite covers:
- Basic forecast formatting (summary, compact, full)
- Smoke detection and probability levels
- Weather event detection (fog, thunderstorms, wind, snow, freezing rain)
- Temperature and wind extraction
- Period detection and abbreviations
- Real-world forecast scenarios
See tests/README.md for detailed testing information.
This integration includes comprehensive debug logging to help troubleshoot issues. You can enable debug logging in two ways:
When setting up the integration, you can enable debug logging by checking the "Debug" option in the configuration flow.
You can enable or disable debug logging dynamically using the Home Assistant service:
Enable debug logging:
service: satcom_forecast.set_debug_logging
data:
enabled: true
Disable debug logging:
service: satcom_forecast.set_debug_logging
data:
enabled: false
When debug logging is enabled, the integration will log detailed information about:
- IMAP connection and email processing
- GPS coordinate extraction from emails
- NOAA API requests and responses
- Forecast parsing and formatting
- Email sending operations
- Message splitting for device compatibility
- Coordinator update cycles
Debug logs can be viewed in the Home Assistant logs. To see debug logs for this integration specifically, you can filter the logs:
grep "custom_components.satcom_forecast" /config/home-assistant.log | grep DEBUG
Or in the Home Assistant UI, go to Developer Tools > Logs and filter for "satcom_forecast".
Error: command SEARCH illegal in state AUTH, only allowed in states SELECTED
Solution: This error occurs when the IMAP connection is not properly selecting a mailbox before searching. The integration now includes improved error handling for this issue. If you encounter this error:
- Check your IMAP folder name (default is "INBOX")
- Verify your email server credentials
- Enable debug logging to see detailed connection information
- Restart the integration if the issue persists
Error: Failed to select folder 'Forecasts': NO
or [NONEXISTENT] Unknown Mailbox: Forecasts
Solution: The integration now validates email connections and shows available folders during configuration. If you encounter this error:
- During initial setup: The configuration will automatically detect and list available folders
- During reconfiguration: The options form will display the error and prevent saving
- Common folder names: Try "INBOX", "Sent", "Drafts", or check your email client for exact folder names
- Case sensitivity: Some email providers are case-sensitive with folder names
The integration will now:
- β Automatically detect folders: Lists all available folders in your email account
- β Dropdown selection: Choose from available folders instead of typing
- β Show specific error messages: Clear guidance when folder issues occur
- β Prevent configuration errors: Validates folder selection before saving
If Home Assistant doesn't detect the integration after installation:
- Ensure the entire
custom_components/satcom_forecast
folder is copied - Restart Home Assistant completely
- Check the Home Assistant logs for any error messages
- Verify the integration folder is in the correct location:
config/custom_components/satcom_forecast/
If forecasts are not being sent via email:
- Verify SMTP server settings and credentials
- Check if your email provider requires app-specific passwords
- Enable debug logging to see detailed SMTP connection information
- Test your SMTP settings with a simple email client first
If NOAA forecasts are not being fetched:
- Verify the GPS coordinates are in the correct format (decimal degrees)
- Check your internet connection
- Enable debug logging to see NOAA API request details
- Verify the coordinates are within the United States (NOAA coverage area)
If you're still experiencing issues:
- Enable debug logging and check the logs
- Search existing GitHub Issues
- Create a new issue with:
- Home Assistant version
- Integration version
- Debug logs (with sensitive information removed)
- Steps to reproduce the issue
- Format Comparison - Detailed comparison of forecast formats
- Test Suite - Testing information and examples
- Contributing Guide - How to contribute to the project
We welcome contributions from the community! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.
- Fork the repository on GitHub
- Clone your fork and set up the development environment
- Create a feature branch for your changes
- Make your changes following our coding standards
- Run tests to ensure everything works
- Submit a pull request with a clear description
# Clone your fork
git clone https://github.com/YOUR_USERNAME/satcom-forecast.git
cd satcom-forecast
# Set up virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/ -v
- Bug fixes - Help improve reliability and stability
- New features - Enhance functionality and user experience
- Documentation - Improve guides, examples, and API documentation
- Tests - Add test coverage for new features or edge cases
- Translations - Help make the integration available in more languages
- Follow PEP 8 with Black formatting
- Use async/await for all I/O operations
- Add comprehensive tests for new functionality
- Follow Home Assistant integration development guidelines
- Use conventional commit messages
- Read the Contributing Guide for detailed instructions
- Check existing issues to see if your problem is already being worked on
- Use GitHub Discussions for general questions and ideas
- Join the community and engage with other contributors
Contributors are recognized in:
- The project README
- Release notes
- GitHub contributors list
For detailed information about contributing, including development setup, coding standards, testing, and the pull request process, please see our Contributing Guide.
This project is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.