With todays electrical prices I figured I want to be able to halt my heat-pump from running during peak prices over the day. This should save me a few bucks as I can prevent it from running when the price is high...
My heat-pump, an IVT HEE11, has something called "External Control" which is a on/off contact where "on" means the contact is closed and "off" means the contact is open.
You can use "Day Average" price as well for the cut off, in hat case the heat-pump will be allowed to run only when the price is below the days average.
The contact will be a relay-board controlled by a RaspberryPI running node-red
and using the UI.
In the IVT control settings I can choose what the "External Control" does, and in my case I'm going to set it to block heating and warm water, thus make the heat-pump just sit there waiting until the contact is opened again.
node-red
and have GPIO (a "B" or Zero model basically)
mqtt
or api
based, e.g. ShellyYou can of course also build something similar using Home Assistant, Homey or similar "home automation" controller with a simple RF relay switch (Shelly, Nexa, or similar) so don't go invest in all this stuff if you have other stuff at home already!
PEL
card where my connectors are on at terminal 10-C
)We have to use the Entsoe API which is public and free (at least for now). See separate instructions in Entsoe-API-Setup.md.
I've built the solution on node-red
which is installed on all RaspberryPI's from start but you can of course use any other platform that supports node.js and node-red.
The node-red flow is added as a separate file here and you'll need to set an environment variables by using, e.g:
export ENTSOE_SECURITY_TOKEN=u-u-i-d
(ENTSOE_SECURITY_TOKEN, the security token for Entsoe API)
Add the export to the
.bashrc
of the user running the node-red process (normally you, so located in your home directory). You will have to startnode-red
after you have exported the variable!
NB! If you run the node-red instance as a service you have to add the env. var to the node-red service config:
sudo systemctl edit nodered
# Add the below
[Service]
Environment="ENTSOE_SECURITY_TOKEN={your u-u-i-d token}"
# Save the file (^o) and close it (^x)
# You can restart your Pi, or run:
sudo systemctl daemon-reload
node-red-stop
node-red-start
The flow will run on every hour (on the hour) and request the current price for the hour and then, based on the given cut-off price, pull or release the relay (to block or allow heating).
The node-red
ui (e.g. http://localhost:1880/ui/) will show the status and you can set the cut-off price as well as a "main switch".
You'll need to install a few extra modules for node-red. In the "Manage palette" menu (from the three lines (hamburger) in the top right corner).
(I'm using a Xiaomi Bluethooth temperature sensor and will need node-red-contrib-xiaomi-ble
as well)
Once you've installed those you can import my flow from the same menu (chose "Import" obviously)
Offers a bit more control with Day average as the cut-off and a "max average" as a "protection" in case the average becomes very high. Note though that setting Max average might block the heat-pump all day!
I'm working on implementing the temperature control so I can force the heat-pump to run if the room temperature goes below a certain point and I am also pondering on adding a sensor on the warm water tank to see if the water goes too cold and then also override and start, even if the price is high...