[NodeRed] Heat the water heater using solar surplus
[TOC]
Previously, we created a tutorial on using NodeRed to monitor a solar power station Monitor your solar pv system in Nodered - IAMMETER.
This is an advanced tutorial on using NodeRed to control a water heater, utilizing solar surplus to heat water. This maximizes the use of solar power and reduces the reliance on the grid, thus lowering the grid electricity consumption.
Why do this: The main reason is that the feed-in tariff is much lower than the electricity price, so we want to maximize the self-use rate of the solar system. If your feed-in tariff is similar to the electricity price, you don't need to consider this.
Effect
From the above image, you can see that "Grid Power" is fluctuating around 0 W.
"Threshold": The control value of grid power
"Hysteresis": The allowable fluctuation range of grid power
"Grid Power": Real-time value of grid power
"Set Power": Power to control the load (e.g., the power of the water heater rod)
NodeRed's task is to read the "grid power" value in real-time.
- When the "Grid Power" value is higher than "Threshold" + "Hysteresis", reduce the "Set Power" value (lower the heater power) to reduce the demand for grid power.
- When the "Grid Power" value is lower than "Threshold" - "Hysteresis", increase the "Set Power" value (increase the heater power) to make the most of the solar power.
SCR-485: Linear power adjustment for resistive loads
A linear power controller with a maximum power output of 4 kW (220V system). It can linearly adjust the power output within the range of 0-4 kW, recommended for controlling resistive loads (such as boiler heaters), and provides Wi-Fi functionality.
Run SCR-485 in standalone mode
System wiring
The system wiring is shown in the figure below, with the main components as follows: An IAMMETER three-phase power meter is used to measure grid power. Since IAMMETER's power meter is a bidirectional meter, it can measure bidirectional power (power drawn from the grid and power fed back to the grid) and provide an API to read the measurement results in real-time.
NodeRed
Install Palette in NodeRED
node-red-contrib-iammeter, node-red-contrib-esphome
Import flow.json in NodeRED
scr-485-flows.json
Link: Solar-PV-Monitoring/NodeRed/scr-485-flows.json at master · lewei50/Solar-PV-Monitoring (github.com)
Copy the flows.json
Import
Paste and import
Deploy
Make necessary changes in NodeRED
Change the IP address of SCR-485
Change the IP address to your meter's IP
Choose your data source based on your meter type:
WEM3080 Grid Power use
tmp_grid_power = msg.payload[2];
WEM3080T/WEM3050T/WEM3046T Grid Power use
if phase A: msg.payload[0][2]
if phase B: msg.payload[1][2]
if phase C: msg.payload[2][2]
Set your run time
Deploy
At this point, your automation control has been completed. You can see the control effect through debug or NodeRED Dashboard or SCR-485 web.
NodeRED Dashboard
In HAOS: http://yourip:1880/endpoint/ui
In Docker: http://yourip:1880/ui
Reference
Home Assistant: Heat the water heater using solar surplus
The First Customer Feedback-Based Test Report on SCR-485
Quickstart manual for SCR-485, step by step tutorial
Activities - Apply for the Linear Power Controller (SCR-485)