Skip to content

Add automatic weather reporting from Indigo weather plugins #10

Description

@simons-plugins

Feature Request

Automate weather reporting to Netro by integrating with Indigo weather plugins.

Current State

The reportWeather action exists but requires manual input:

  • User must manually enter all weather parameters
  • No automatic updates from weather sources
  • Inconvenient for regular reporting

Proposed Implementation

Phase 1: Plugin Configuration

Add weather plugin integration to PluginConfig.xml:

  • Enable automatic weather reporting (checkbox)
  • Select weather source:
    • Fantastic Weather plugin
    • Weather Underground plugin
    • Dark Sky plugin (if available)
    • NOAA plugin
    • Other Indigo variable source
  • Reporting schedule (e.g., every 6 hours)

Phase 2: Plugin-to-Plugin Integration

Implement data source adapters:

  1. Indigo Variable Source:

    • Map Indigo variables to weather parameters
    • User configures variable names in UI
  2. Weather Plugin APIs:

    • Query other plugins directly (if API available)
    • Extract temperature, humidity, rainfall, etc.

Phase 3: Automated Reporting

In runConcurrentThread():

  • Check reporting schedule
  • Fetch weather data from configured source
  • Call reportWeather() automatically
  • Log success/failure

Weather Parameters Needed

Required:

  • Current temperature (°F)

Optional:

  • Max/min temperature
  • Humidity (0-100%)
  • Rainfall (inches)
  • Rain probability (0-100%)
  • Wind speed (mph)
  • Pressure (inHg)
  • Weather condition (Clear/Cloudy/Rain/Snow/Wind)

Configuration Example

<Field id="enableAutoWeather" type="checkbox">
    <Label>Enable Automatic Weather Reporting</Label>
</Field>
<Field id="weatherSource" type="menu">
    <Label>Weather Source</Label>
    <List>
        <Option value="variables">Indigo Variables</Option>
        <Option value="fantastic">Fantastic Weather Plugin</Option>
        <Option value="wunderground">Weather Underground Plugin</Option>
    </List>
</Field>
<Field id="weatherInterval" type="menu">
    <Label>Reporting Interval</Label>
    <List>
        <Option value="3">Every 3 hours</Option>
        <Option value="6">Every 6 hours</Option>
        <Option value="12">Every 12 hours</Option>
        <Option value="24">Daily</Option>
    </List>
</Field>

Files to Modify

  • plugin.py - Add weather integration logic
  • PluginConfig.xml - Add weather source configuration
  • Tests - Add integration tests (may need mocking)
  • README.md - Document weather plugin setup

Benefits

  • Set-and-forget weather reporting
  • Better Netro scheduling accuracy
  • Leverages existing Indigo weather data
  • No manual intervention required

Challenges

  • Different plugins have different APIs
  • Variable mapping requires user configuration
  • Need to handle missing/stale data gracefully
  • May need plugin version detection

Alternative: Start with Variables Only

Simpler initial implementation:

  • Just support Indigo variable mapping
  • Let users populate variables from any source
  • Add direct plugin integration in future updates

References

  • API Documentation: NETRO_API.md lines 355-388
  • Current implementation: reportWeather() in plugin.py

Implementation Plan

See detailed implementation plan in: /Users/simon/.claude/plans/melodic-riding-storm.md (Issue #5 section)

When working on this issue, review the plan file for:

  • Complete API gap analysis
  • Three-phase implementation approach
  • Files to modify
  • Verification steps
  • Priority: Phase 3, Medium-Low - High effort, depends on available weather plugins
  • Alternative: Start with Indigo variable mapping only (simpler)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions