These are Shelly scripts I've written to optimize the use of electricity from solar array.
A more detailed description of what the scripts do and how they work and how they are configured can be found in the supplementary md files.
In addition to merely switching the heater on when the sun shines, it has the following features:
- In the morning, the system wakes up, heating the water when the power generated by the solar panel system exceeds the power requirement of the heater. When the heater's thermostat opens or the allowed heating time has been used up, the heating is marked as finished and turns off for the rest of the day.
- At noon (all times are configurable), if the heating is not yet ready, the solar power requirement is significantly reduced. Smaller expectation ensures that the solar energy cover at least hopefully a good part of the energy used by the water heater, even if the rest is consumed from the grid.
- In the evening, if the heating is not ready, the script starts monitoring the electricity price and turns on the heating at the cheapest time. Price status is fetched from spot-hinta.fi
- At night, just before the morning, if the heating was not completed because there weren't enough cheap hours or the price monitoring wasn't used, the heating is forced on until completed, regardless of the energy price.
- Heating can be controlled manually: It can be paused, continued or put back to automatic by manipulating a key in the Shelly's KVS bank.
Turns Shelly Plug into an energy meter. The color of the light indicates how much unused solar energy is available, which helps, for example, decide whether another home appliance can be turned on. If the energy reading the meter uses is net yield, it also warns of very high consumption.