Optimizing the energy consumption

27.09.2023

Nowadays energy prices are constantly changing. Of course you can bypass this problem by investing in fixed price agreement, but it comes with price. I took another route. Usually highest prices are located in “rush hours” 7AM in morning and 5PM in afternoon. Following the pricing manually can be tedious task so I decided to do something about it.

Energy usage

When figuring out where the most energy consumption is coming from, usually the suspect number one is the heating. In my case, water boiler is quite big (560 liters) and it takes 6 kW of power for several hours, every day. Short calculation: 4190 J/kg*K x 560 kg x (60-10) K = 117 320 000 Joules. With heating power of 6000 W (J/s) –> 19 553 seconds = 5,43 hours. This equals the energy of 32,6 kWh (kilowatthours).

Second source of consumption is HVAC heating function (especially in mid winter). According to HVAC energy monitor roughly 40-50kWh of energy is used in typical winter day (24h).

Optimization strategy

Since energy price is variable, we should focus moving to the consumption to “cheap hours” as much as possible. So the plan is to pick up cheapest 6 hours from Nordpool day-ahead -prices. At least for water heater it does not matter when it is heated.

Device setup

Previously, water heater was automatically turned on for every night (between 12AM to 6AM). We need another control apparatus if we want to control heater by individual hours.

Easiest solution by far is to use intelligent relay that receives control signal through ethernet connection. I used Shelly Pro 4PM since it has MQTT support. MQTT messages are simple way to communicate since we only need to give ON/OFF status for it to work. Note: Shelly has also internal power monitor capability, but since we are using separate 3-phase relay to cut power, shelly only “sees” the current from relay coil (which is around 5 Watts).

Second problem was to acquire the Nordpool information and pass the switching information to the relay. I decided to use raspberry to and get the prices using javascript (there was an API available). Everything is running on top of Node-Red envinronment.

HVAC from Mitsubishi also supports remote operation, so adding it to the same control loop was easy. Passing the message was also done using proprietary API.

Shelly Pro 4 PM smart relay

Hardware:

Raspberry Pi

Shelly Pro 4PM

Software:

Raspberry OS

Node-red

Nordpool API

Mitsubishi Melcloud API

Cloud server: SQL lite + Grafana

How the data looks

Device has now been running for 1 month already and after few tweaks, it is working flawlessly. Below you can see that heater is only turned ON for cheapest hours, and they are not necessarily in a row. Even negative price hours were experienced during testing period. All the control data with pricing is information is passed into cloud -database and visualised using grafana.

Some nodered flows: trigger every hour –> get lates pricing –> read information to 24h array –> sort array –> set price limit according to 6th cheapest hour –> trigger relay when condition is met. Repeat every hour.

Summary

  • Use the 6 most cheapest hours
  • With minimal investments, take advantage of existing equipment. Payback is more likely to happen.
  • Future development ideas? Planning to add battery and charger. Use of other appliances like dishwasher and laundry. Requires bigger investments so need to calculate it first.
  • Electricity price history is recorded.