Solar PV inverters often have their own web-based monitoring solutions. However some of these do not make it easy to view current generation or consumption due to refresh delays. Out of the box monitoring is usually good for looking at long-term time periods however lacks the granularity to see consumption of appliances over the short term.
Realtime monitoring of Solar generation and net export helps to maximise self-consumption. For example coordinating appliances to make best use of solar PV.
Existing inverter monitoring does not show granular data over recent history – for example, to be able to tell when a dishwasher has finished its heating cycle and whether another high-consumption appliance should be turned on:
This sample android application allows realtime monitoring whilst charting consumption, generation and net export:
The chart shows recent data over time and is configurable for SMA and Enphase inverters. In both cases the local interface of each inverter is used to pull raw data:
The code is experimental and proof of concept only – it has not been fully tested
The code runs as a Linux service
It features a web UI
It checks home energy consumption and decides whether to turn the plug on or off based on a threshold
For each check interval the code checks the current state of the plug and decides whether to:
Here’s a flowchart showing the decision-making process:
The Web UI
Ability to disable / enable automatic control
This is useful where the plug needs to be manually controlled via its physical button
Configurable Min power threshold
This is useful where it’s acceptable to use some grid power as well as solar (e.g. partly cloudy weekends with cheaper electricity rates)
Minimum on / off buffer periods to reduce switching (e.g. for devices which do not benefit from being powered on and off continually)
Monitoring messages to see how many times the switch has been controlled and its last state
Overall net ( W )
Useful for seeing current net household energy consumption
Automatic recovery if the plug, solar monitoring API or Wifi network goes offline temporarily
So far this solution works great.
On a partially cloudy day, the plug automatically turns on or off once excess solar drops below the min power threshold. Similarly, the plug will turn off when household consumption is high – for example, during the heating cycle of a washing machine / dishwasher or when an electric kettle is used.
We got an interesting email from our electricity retailer after setting up this solution:
The message indicates we have successfully boosted our self-consumption – i.e. more solar energy is being self-consumed rather than being exported to the grid, giving the appearance to the retailer that the solar PV system is underperforming. Success!
This is not quite as good as having a home battery or a dedicated (and much more refined) device like the Zappi, however it comes close. It is a great way to boost self-consumption of excess solar PV energy using software and a low-cost smart plug. With around a year of weekly charging, this solution can pay for the cost of the smart plug by reducing the effective cost of electricity.
This is pretty amazing for EV owners who also have solar PV.
It means that instead of exporting surplus energy at a reduced rate ($0.12/kWh) it is possible to avoid importing energy at a higher rate ($0.25/kWh). This can effectively double the benefit of having solar PV by boosting self consumption.
However as of writing, the Zappi V2 is $1,395 (for example, from EVolution here).
Is it possible to create a software virtual plug to charge an EV using only self-generated solar PV?
Charging the EV using only rooftop solar costs $0.12/kWh. This is the opportunity cost of the feed-in tariff which would would otherwise be earned for feeding energy into the grid.
Charging the EV using grid power alone costs around $0.25/kWh.
Depending on the proportion of PV generation at a given time, the effective cost per kWh may be somewhere in between.
What if we can turn on the charger only at times when the solar is generating 100% or more of what the EV will use?
A custom software program could query net solar export and control a smart plug to generate savings.
Mitsubishi Outlander PHEV
Envoy S Metered Solar house monitor
TP Link HS110 Smart Plug
Cheaper EV charging (approximately 50% savings)
No need to manually enable / disable charging when:
Weather is variable
Household consumption is high (e.g. boiling a kettle or running the dishwasher)
Things to consider
These are also some risks to consider when designing a DIY software control:
The PHEV plug safety instructions say not to plug anything in between the wall socket and charger plug – i.e. where the SmartPlug should go.
The PHEV charger expects to be plugged in and left alone – will it be happy with power being enabled / disabled?
Another thing to consider… is it worth buying a Smartplug to do this?
Assuming the plug can be purchased for a reasonable price (for example $40 including shipping from here) and weekly EV charging from nearly empty, the plug pays itself off in <1 year:
Opportunity cost / lost export ($/kWh):
Saved expense ($/kWh):
Net saving ($/kWh):
kWh savings to pay off:
Average charging session (kWh):
Number of charges:
Back of the envelope calculations
See Part 2 for an approach to implement this solution in Python…
For this demo, home solar PV generation data has been obtained from United Energy’s Energy Easy portal in CSV format. For the sake of convenience in dealing with the raw data which usually comes in half-hourly intervals, this data has been loaded in to a Pentaho data warehouse instance (more details in a later post, perhaps!) and converted to day-by-day figures.
Analysis can help explore whether solar panels are getting less efficient over time, or even determine what a “good” day of production is like in summer vs winter (by looking at the relevant frequency of each in the histogram).
Drag and scroll date region which affects histogram above:
Changeable histogram buckets:
Snap-shotting of one selected date range for visual comparison with another (e.g. summer vs winter comparison):