pilot water heater power switch
- during solar panel production
- during grid discount hours when tomorrow is cloudy
- during grid discount hours when tomorrow is over taxed
Get the solar irradiance for the next 2 days
get the consumption of the home, the solar panel production, and the grid import
hold the application settings
- turn on
- turn off
- get the state of charge (in percent)
- get the state (charging, discharging, idle)
- get the instant power ( positive is charginf)
- push monitoring data to influxdb server
from weather, power, battery and settings modules, events.py contains methods to generates events
- is_sunny_now(weather: Weather, now: datetime, settings: Settings) -> bool decide if solar production should be enough: compare current solar irradiance with settings.minimal_solar_irradiance_wm2
- is_cloudy_tomorrow(now: datetime, weather: Weather, settings: Settings) -> bool decide if tomorrow will be cloudy. check that solar irradiance > settings.minimal_solar_irradiance_wm2 during settings.minimal_daily_solar_hours
- is_forced_period_window(now: datetime, settings: Settings) -> bool define discount grid hours with settings.forced_hour_begin and settings.forced_hour_duration
- is_too_much_import(now: datetime, power: Power, settings: Settings) -> bool return True when grid import > settings.too_much_import_watts during settings.too_much_import_duration
- is_no_importing(now: datetime, power: Power, settings: Settings) -> bool: return True when grid import < settings.no_import_watts during settings.no_import_duration
- return True when estimates solar production is enough to switch on