GUI Controller for PVOptimize
The project PVOptimize
allows to flexibly manage how a PV rooftop installation charges an EV. However, the only way to make use of the flexibility is through a config.ini
file.
This project provides a GUI to control relevant aspects from a Node-RED Dashboard. This GUI is an optional addition to PVOptimize
. Some familiarity with Node-RED
might be needed to install.
Improvements are welcome - please use Issues and Discussions in Git.
Table of contents generated with markdown-toc
The following depicts the basic architecture:
PVOptimize
is called every minute or so from eg. an appropriatecrontab
entry- it returns a
pvstatus.json
file with three sectionsctrlstatus
(controller status),pvstatus
(PV system status) andwbstatus
(wallbox status). (An additional memberpvcontrol
is used to report current settings to the GUI, in case the GUI is re-started) - this contains sufficient information to initally configure the dashboard (slider lengths, default values, wallbox status to be displayed in rightmost State group)
- upon
Save
of the dashboard settings, agui_config.ini
is created, which containsPVControl
items - on next call of
PVOptimize
, (1) the default config fileconfig.ini
is read, then (2) thegui_config.ini
which overwrites values ofconfig.ini
and thus makesPVOptimize
behave as configured in the dash board
The dashboard flow is basically generic to PVOptimize
in version 2.0, except for a section marked as Hardy Barth specific (for the State group)
- The GUI is enabled in
config.ini
by settingPVControl.enableGUI = 1
. - The files
pvstatus.json
andgui_config.ini
are located in the directoryPVControl.guiPath
, which defauts to~/.node-red/projects/PVControl
Since the above picture shows a loop, it is essential to understand how it is inialized:
- as soon as
PVControl.enableGUI = 1
is set,PVOptimize
starts readinggui_control.ini
and its values will overwrite corresponding values inconfig.ini
in sectionPVControl
. config.ini
contains default values for slider ranges in the GUI:HardyBarth.I_chargeMin
andHardyBarth.I_chargeMax
determine minimum and maximum of sliders in groupCharge Control
PVStorage.minSOC
determines the lower end of the SOC sliders in groupSOC Control
- once
PVOptimize
runs (ie., every minute), these values are written intopvstatus.json
- the Node-RED flow uses these values when deployed to setup the dashboard - hence if changes are needed, a re-deployment (flow re-start) is required
- once
Save
is pressed in the GUI, a newgui_control.ini
is created, which is read by next call toPVOptimize
. - Note that after every dashboard re-deployment (flow re-start), values will initialize as shown below, independent of actual values in
gui_contro.ini
. Hence, one wants to save values immediatly, to gain consistency between display and behind-the-scenes activities.
To bootstrap the flow, default files for pvstatus.json
and gui_config.ini
are provided, but they may not fit every situation.
The GUI dashboard is called with <ip_of_host_running_GUI>:1880/ui
from any browser and should bring up a panel similar to below:
It consists of three groups:
Charge Control
andSOC Control
control the config items as described in PVOptimize documentationState
displays the current state of the wall box and a one-hour history of requested charge current
Charge Control
contains two additional widgets, not described so far:
Delayed charging
delays charging to the timeCharge Start
(further subject of other constraints ofPVOptimize
)Charge Start
sets a starting time for enabling charging. For this to work,Start NOW
obviously needs be disabled. Once the time is reached,Start NOW
is enabled - in other words,Charge Start
expires after latest 24 hours.
The project requires Node-RED on the same host as PVOptimize is installed. It has been developped and seen running with the following versions and components:
Software | Version |
---|---|
Node-RED | v 2.1.4 |
node.js | 16.13.1 (or 17.3.0) |
node-red-dashboard | 3.1.3 |
node-red-contrib-projectdir | 2.0.5 |
Ensure that Node-RED
is restarted at boot time as described here, using pm2
Node-RED
has to be setup to handle projects and the project files reside in ~/node-red/projects/PVControl
. This directory is also used to exchange information with PVOptimize
as described above. Ensure that this project is deployed.
Once the flow is installed (and a manual trial run successfully executed), enable PVControl.enableGUI = 1
in config.ini
of PVOptimize
.
Version | Date | Comment |
---|---|---|
1.0 | January 2022 | Initial release |
1.1 | 2022-07-03 | minor bug-fixes, Start Now switch replaced with Delayed Charging |
The software controls PVOptimize
. Errors in the GUI software can result in PVOptimize
not to perform its desired task - as an example, the EV could remain un-charged in the morning. The author cannot be held liable for this or any other damage caused through the use of this software.
Use at your own risk!
Further warranty limitations are implied by the license. Note that PVOptimize
contains a similar disclaimer.
Distributed under the terms of the GNU General Public License v3.