[APP][Pro] Heating Controller with utility prices

The ‘Heating Controller’ is a device for easily controlling temperatures and modes for thermostats and sockets for heating.

To switch between ‘Comfort’ and ‘ECO’ modes, just two flows are necessary:

  • one ‘Comfort’ flow with comfort temperatures and modes,
  • and one ‘ECO’ flow with ECO temperatures and modes.

Each ‘HeatingController’ device has its own schedule that can be changed from ‘Advanced settings’. Several devices can be used, each with their own schedule.

The app has support for public holidays for several countries, and utility prices for Austria, Belgium, Germany, Luxembourg, France, Netherlands, Nordic and Baltic countries.

Install

To install the device:

  1. Add the ‘Heating Controller’ device.
  2. Go to ‘Advanced settings’ and adjust the schedule.
  3. Select ‘Price area’ and ‘Currency’ for utility prices.
  4. Select ‘Country for holidays’ for public and bank holidays.

Default schedule

Default schedule:

  • Comfort mode for working days: 05:00 - 22:30
  • Comfort mode for weekends and holidays: 07:00 - 23:00
  • Work hours: 07:00 - 14:00

Modes

The device has modes for:

  • Home / Away
  • Night / Day
  • At work / Not at work
  • Home override

The device can be turned ‘On’ / ‘Off’ to switch between ‘Home’ and ‘Away’ - modes. If going away for a few days or on a holiday the device can be switched off to enable energy saving mode. The device must be switched on again to switch back to ‘Home’ mode, or the ‘Set away, and automatically switch to home mode on next schedule’ action can be used to automatically go back to ‘Home’ mode when the next ‘Night / Day’ or ‘At work / Not at work’ modes triggers.

It is not neccessary to switch to ‘Away’ mode if going to work, ref. the ‘At work’ - mode.

The ‘Night’ and ‘At work’ modes are automatically set based on time, day of week and public holidays. The start and end hours can be configured for both ‘Night’ and ‘At work’.

The ‘Home override’ mode can be used to keep comfort mode on, even if ‘At work’. The ‘Set home override on, and automatically off on next schedule’ action can be used to automatically turn the ‘Home override’ mode off when the next ‘Night / Day’ or ‘At work / Not at work’ modes triggers.

Comfort and ECO mode triggers

The ‘Comfort mode’ and ‘ECO mode’ triggers can be used to turn heaters on / off, or set the thermostat temperatures or thermostat modes, and will trigger if the ‘Home’, ‘Night’, ‘At work’ or ‘Home override’ modes changes.

Rules

  • ‘Comfort mode’: ‘Home’ and ‘Day’ and ‘Not at work’ or ‘Home override’ and ‘Day’
  • ‘ECO mode’: otherwise

Example

Adjust the target temperature for thermostats based on comfort / ECO modes. The target temperature for a thermostat is set to 22 ℃ for the period between 05:00 - 07:00 and 14:00 - 22:30, and 19 ℃ in the period from 07:00 - 14:00 and 22:30 - 24:00.

Needs two flows:

  • Flow 1: WHEN: Comfort mode is enabled
    THEN: Set thermostat temperature to 22 ℃.
  • Flow 2: WHEN: ECO mode is enabled
    THEN Set thermostat temperature to 19 ℃.

Utility price changed trigger

The ‘Utility price changed’ will trig every hour, based on utility prices in the Nordpool area. The price area and currency can be configured.

‘Current price is among the X hours of lowest between START and END’ condition

The ‘Current price is among the X hours of lowest between START and END’ condition can be used to find the X lowest prices in a period of the day.

Example

Charge the car for four hours between ‘22:00’ and ‘06:00’ with the lowest prices.

Needs one flow:

  • Flow: WHEN: Utility price changed
    AND: Current price is among the 4 hours of lowest between ‘22:00’ and ‘06:00’
    THEN: Start charging
    ELSE: Stop charging

‘The following X consecutive hours have the lowest total price between START and END’ condition

Use the ‘The following X consecutive hours have the lowest total price between START and END’ condition to find a period of X consecutive hours with the lowest total price in a given period.

Example

Start the washing machine for four hours with the lowest total price between ‘20:00’ and ‘08:00’ the next day.

Needs one flow:

  • Flow: WHEN: Utility price changed
    AND: The washing machine is not running
    AND: The following 4 consecutive hours have the lowest total price between ‘20:00’ and ‘08:00’
    THEN: Start the washing machine

Average price condition

The ‘Current price is X percent above / below today’s average’ conditions will compare the current price to the average price for the whole day.

Example

Turn the socket for the water heater ‘Off’ when the price is 3 % higher than the average for the whole day, and ‘On’ otherwise.

Needs one flow:

  • Flow: WHEN: Utility price changed
    AND: Current price is 3 percent above today’s average
    THEN: Turn socket off,
    ELSE: Turn socket on

High prices trigger

The ‘High prices X hours of the day’ trigger can be used to turn heaters off or lower the thermostat temperatures if ‘ECO mode’ is enabled and the utility prices are high. The number of hours for high prices can be selected.

Rules

  • Only hours where ‘ECO mode’ is enabled are controlled
  • The selected number of hours with the highest prices are found
  • If there are two consecutive hours with high prices the second hour is skipped, to avoid having heaters turned off too long, or having thermostat temperatures to low too long

Example

Set the target temperature for a thermostat to 22 ℃ during daytime, not at work and not away, 19 ℃ during the night, at work or away, and 17 ℃ when prices are high and at night, at work or away.

Needs three flows:

  • Flow 1: WHEN: High prices 6 hours of the day
    AND: Logic ‘Heating’ is Yes
    THEN: set thermostat temperature to 22 ℃.
  • Flow 2: High prices 6 hours of the day
    AND: Logic ‘Heating’ is No
    AND: Logic ‘High price’ is No
    THEN: set thermostat temperature to 19 ℃.
  • Flow 3: High prices 6 hours of the day
    AND: Logic ‘Heating’ is No
    AND: Logic ‘High price’ is Yes
    THEN: set thermostat temperature to 17 ℃.

Low prices trigger

The ‘Low prices X hours of the day’ trigger can be used to keep a heater on if the utility price is low and off if the utility price is high. The ‘Comfort mode’ / ‘ECO mode’ is not taken into consideration for this trigger.

Example

Turn the socket for the water heater ‘On’ during the 18 hours with the lowest prices of the day, and ‘Off’ the other 6 hours.

Needs one flow:

  • Flow: WHEN: ‘Low prices 18 hours of the day’
    AND: Logic ‘low price’ is Yes
    THEN: Turn socket on
    ELSE: Turn socket off

Mode triggers

The ‘Home mode set to on’, ‘Home mode set to off’, ‘Home override set to on’ and ‘Home override set to off’ will trigger based on changes to ‘Home’ and ‘Home override’ modes.

The ‘Night starts’, ‘Night ends’, ‘At work starts’ and ‘At work ends’ will trigger based on changes to the ‘Night’ and ‘At work’ modes.

Price areas

  • Austria: AT
  • Belgium: BE
  • Denmark: DK1, DK2
  • Estonia: EE
  • Finland: FI
  • France: FR
  • Germany and Luxembourg: DE-LU
  • Latvia: LV
  • Lithuania: LT
  • Netherlands: NL
  • Norway: Oslo, Kr.sand, Bergen, Molde, Tr.heim, Tromsø
  • Sweden: SE1, SE2, SE3, SE4

Currencies

  • EUR, DKK, NOK, SEK

Flow cards

Device: HeatingController

Triggers

  • Comfort mode is enabled
  • ECO mode is enabled
  • Home mode is disabled
  • Home mode is enabled
  • Home override is disabled
  • Home override is enabled
  • Workday starts
  • Workday ends
  • Night starts
  • Night ends
  • Utility price changed (tokens: price, heating, price ratio, min price, max price)
  • High prices X hours of the day (tokens: heating, high price)
  • Low prices X hours of the day (tokens: heating, low price)

Conditions

  • Is home / away
  • Is home override on / off
  • Is night / day
  • Is at work / not at work
  • Is comfort mode / ECO mode
  • Is current price below / above
  • Current price is among / is not among the X hours of the days lowest prices
  • Current price is among / is not among the X hours of the days highest prices
  • Current price is among / is not among the X hours of lowest between START and END
  • Current price is among / is not among the X hours of highest between START and END
  • Current price is / is not X % above today’s average
  • Current price is / is not X % below today’s average
  • Current price is / is not X % above the average of the next Y hours
  • Current price is / is not X % below the average of the next Y hours
  • Current price is / is not lower than prices next X hours
  • Current price is / is not higher than prices next X hours
  • Difference between highest and lowest price is less / more than X %
  • Difference between highest and lowest price is less / more than X
  • The following X hours are among / are not among the Y hours of today’s lowest prices
  • The following X hours are among / are not among the Y hours of today’s highest prices
  • The following X consecutive hours have / have not the lowest total price between START and END
  • The following X consecutive hours have / have not the highest total price between START and END
  • Is public holiday today / yesterday / tomorrow.
  • Is bank holiday today / yesterday / tomorrow.
  • Is observance holiday today / yesterday / tomorrow.
  • Is holiday (public, bank or observance) today / yesterday / tomorrow.
  • Is working day today / yesterday / tomorrow.

Actions

  • Set home
  • Set away
  • Set away, and automatically switch to home mode on next schedule
  • Set home override on
  • Set home override on, and automatically off on next schedule
  • Set home override off
  • Set holiday today. Holiday can be overridden with this action.

Capabilities

  • On / off (home / away)
  • Home override (true/false)
  • Night (true/false)
  • At work (true/false)
  • Heating (true/false)
  • Price (per kWh)
  • Price ratio (calculated from all hours on a day, with 1 for the lowest price and 0 for the highest price)

Feedback:

Please report issues on the community forum page.

Release Notes:

1.9.0

  • Added condition: ‘Difference between highest and lowest price is less / more than X’
  • Added conditions: ‘Current price is / is not lower / higher than prices next X hours’
  • Added ‘Min price’ and ‘Max price’ tags to ‘Utility price changed’ trigger

1.8.0

  • Added condition: ‘Difference between highest and lowest price is less / more than X %’

1.7.0

  • Added condition: ‘The following X consecutive hours have / have not the lowest total price between start and end’
  • Added condition: ‘The following X consecutive hours have / have not the highest total price between start and end’

1.6.1

  • Adjustments to the two new conditions ‘Current price is among / not amount the X hours of lowest between start and end’ and ‘Current price is among / not amount the X hours of highest between start and end’

1.6.0

  • Added condition: ‘Current price is among / not amount the X hours of lowest between start and end’
  • Added condition: ‘Current price is among / not amount the X hours of highest between start and end’

1.5.12

  • Added ‘heating’ token to ‘Utility price changed’ trigger

1.5.11

  • Fix for timezone

1.5.10

  • Fixed date handling

1.5.9

  • Updated price ratio calculation

1.5.8

  • Added price ratio, which is a number between 0 and 1 for today’s prices
  • Updated flow titles

1.5.7

  • Reduced memory consumption

1.5.6

  • Fixed bug in settings

1.5.5

  • Fixed issues with ‘High prices hours of the day (tokens: heating, high price)’ and ‘Low prices hours of the day (tokens: heating, low price)’ triggers
  • Fixed issues “Utility price changed” trigger
  • Reduced memory consumption

1.5.4

  • Fixed issue with timezones
  • Reduced memory consumption

1.5.3

  • Reduced memory consumption

1.5.2

  • Fixed bug when changing settings
  • Fixed bug in ‘The following hours are !{{|not}} among the [y] hours of today’s lowest prices’ condition

1.5.1

  • Utility prices for more countries
  • Added ‘The following X hours are among the Y hours of today’s lowest prices’ condition
  • Added ‘The following X hours are among the Y hours of today’s highest prices’ condition

1.5.0

  • SDK3 - changes
  • “Presence for modes” option removed
  • Updated holidays
  • Fixed decimals for Insights
  • Fixed issue with timezones

1.4.0

  • Added ‘Current price is among / is not among the hours of the days highest prices’ condition
  • Added ‘Current price is / is not % above the average of the next [y] hours’ condition
  • Added ‘Current price is / is not % below the average of the next [y] hours’ condition
3 Likes

Many thanks balmli. If I understand correctly, the app powers the boiler/heating on and off according to the scheduling that you created. Nice work. Can it be used for multi-zone / multi-device heating? (I have 14 zones)?

The app does not automatically switch devices on and off, but can be used to easily find the “comfort” and “eco” modes based on home, day/night, at work states. So you might reduce the number of flows a lot.

To use the HeatingController you can use the “Comfort” and “ECO” triggers to easily switch between comfort and ECO. Or you can use the more advanced triggers that also take the utility price into consideration. This last thing is only useful if your utility invoice is based on hourly prices, and you live in Nordic or Baltic countries.

Check this link for screenshots and examples:

https://balmli.github.io/no.almli.heatingcontroller/

1 Like

I think this app is a great idea, but I have some questions:

  1. Say I want ´Start hour working days´ to be at 06.30. How do I write that in Advanced settings? I guess the correct would be 6.5 However, I only get the numerical keypad, and there is no ´.´ there, only ´,´ which seems to be ignored.
    Can I write 0630?

  2. For End hour not working days, I would like to set the time 01.00. Will this work, since it is the next day?

  3. How does the Home override work? I cant´t find a way to turn it on.

  4. Where do you fetch the energy price? I use Tibber, and the price in the app does not match the Tibber price.

Hi Ketil,

  1. 06:30 must be entered as 6.5. Do you have the latest version on the Homey mobile app? I think this was a bug that has been fixed.

  2. This will need a fix in the app. I will look into that.

  3. Home override can only be set/cleared from a flow. “Set home override on” and “Set home override off”.

  4. The prices are from Nordpool, with no sales tax (“mva.”) or other fees.

Hi,

  1. I do have the latest version of the app. However, I fixed the problem using copy/paste from the notes app.

  2. Great!

  3. No problem :slight_smile:

  4. I suspected that was the reason.

Anyway, the app is really great! Saves me from having to create a lot of individual flows

1 Like

More questions :slight_smile:

Last night, I noticed that the app went from comfort mode to eco mode just before midnight, which is correct according to my schedule, Sunday being a weekend day. However, wouldn’t it be better if evenings of sundays (and holidays before a working day) were treated the same way as working day evenings. After all, I usually go to bed earlier when the next day is a working day :slight_smile:

Similarly, friday evenings and working day evenings before a holiday should be treated as weekend/holiday evenings, since I will usually go bed later on such evenings (haven’t had the chance to test this yet, so maybe this is already the case).

Another thing: I assume the ‘Home override’ mode remains on until it is explicitly turned off(?)

More questions is good :slight_smile:

Yes, I agree that Friday and Sunday evenings should be handled like that. I have thought about it, but not fixed yet.

And the ‘Home override’ stays on until it’s switched off.

New version in app store now: 0.5.3, with fixes for

  • Added ‘Current price among [ x ] hours of the days lowest prices’ condition
  • Fixed bug for ‘Set home’ and ‘Set away’ actions
  • Support end hours after midnight
  • Take ‘working day the next day’ into consideration for ‘Comfort’ and ‘ECO’ - modes.
  • Fixed bug for ‘onoff’ capability.

This is great!

Just to be sure: If I want comfort mode to end at 01:00 on Not workingdays, I just set the “End hour not workingdays” to 01. Right?

Yes, “End hour not workingdays” to 1.

I think there might be a snag somewhere. As you can see from my schedule, Eco mode starts at 22.30, and Comfort mode starts at 05.00.
However, last night Comfort mode was started again at 00.00, and then it went back to Eco mode at 00.18 (The screenshot on the right is from the Sensibo app on my phone. The temperature setting in Sensibo is controlled by the Heating Controller app).

Yes, you found a bug…

‘End hours after midnight’ was wrong for Thursday night and Sunday night.

I have added a lot of new tests, and I hope this app is stable now… :slight_smile:

In app store soon.

One more thing:
Are the ‘Set home’ and ‘Set away’ actions «permanent» the same way as ‘Set home override’ (that is, remains on until explicitly turned off) or are they turned off at the next change triggered by the schedule?

‘Set home’ and ‘Set away’ is the same as switching the device on / off by clicking on it.

So it stays that way until you click or use the actions.

Would it be possible to add functionality for temporary change of mode?

I have two use cases:

  1. I´m working from home. Then I want the house to remain in comfort mode the whole day, obviously.
  2. I´m going out on a Friday night. Then I want to set the house in eco mode when I leave the house.

In both cases I now need to manually turn off “Home override” in the afternoon and “away mode” when I come home, respectively. It would be great (especially the last case :wink:, where it is easy to forget to turn off the away-mode) if the house automatically returned to it´s normal schedule once that one “special case” was over.
So in case 1, when the house switches to comfort mode in the afternoon, my “Home override” is cancelled. And in case 2, when the house enters eco mode late Friday night, the “away mode” is cancelled.

Of course, if I go away for a longer time, I would need to use the current functionality, so the house stays in “away mode”.

Or could something like this be implemented using a flow?

BTW, I really like the Heating controller. Currently I´m running two instances (different time schedules in different rooms), and there will be more :grinning:

Hi,

Thanks for the feedback. :slight_smile:

I have added two new actions:

  • Set away, and automatically switch to home mode on next schedule
  • Set home override on, and automatically off on next schedule

Version 0.7.0 has also international holidays, and conditions for holidays and working day.

1 Like

You are amazing :grinning:

Thank you!

1 Like

Version v. 0.7.0 is in app store now.

Since 0.5.4:

  • Can select country for holidays.
  • Added conditions for holidays (public, bank, observance).
  • Added ‘Set away, and automatically switch to home mode on next schedule’ action.
  • Added ‘Set home override on, and automatically off on next schedule’ action.
  • Added condition for working day.