Homey Community Forum

[APP] 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 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’.

If preferrable, presence can be used for the ‘Home’ / ‘Away’ and ‘At work’ / ‘Not at work’ modes. The users of the Homey must enable ‘Home/Away Detection’ in Settings->Privacy, and presence must be enabled in the device ‘Advanced settings’.

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:

  • Set thermostat temperature to 22 ℃ if comfort mode.
  • Set thermostat temperature to 19 ℃ if ECO mode.

High prices trigger

The ‘High prices 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: set thermostat temperature to 22 ℃ if comfort mode.
  • Flow 2: set thermostat temperature to 19 ℃ if ECO mode and low price.
  • Flow 3: set thermostat temperature to 17 ℃ if ECO mode and high price.

Low prices trigger

The ‘Low prices 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:

  • Turn socket on if ‘low price’ and off if ‘high price’

Average price condition

The ‘Current price is 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:

  • When: Utility price changed,
  • And: Current price is 3 percent above today’s average
  • Then: Turn socket off, Else: Turn socket on

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.

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.

Price areas
  • Norway: Oslo, Kr.sand, Bergen, Molde, Tr.heim, Tromsø
  • Sweden: SE1, SE2, SE3, SE4
  • Denmark: DK1, DK2
  • Finland: FI
  • Estonia: EE
  • Latvia: LV
  • Lithuania: LT
Currencies
  • EUR, DKK, NOK, SEK

Flow cards

Device: HeatingController

Triggers

  • Comfort mode
  • ECO mode
  • High prices X hours of the day (tokens: heating, high price)
  • Low prices X hours of the day (tokens: heating, low price)
  • Home mode set to on
  • Home mode set to off
  • Home override set to on
  • Home override set to off
  • Night starts
  • Night ends
  • At work starts
  • At work ends
  • Utility price changed (tokens: price, price area, currency)

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 / 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
  • 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.

Feedback:

Please report issues at the issues section on Github.

Release Notes:

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

1.3.3

  • Fix ‘Is current price below / above’ condition

1.3.2

  • Fixed utility prices.

1.3.1

  • Added README.txt

1.3.0

  • Fixed price capability
  • Use Homey compose
  • Updated Athom api

1.2.0

  • Updated Athom api

1.1.0

  • Updated holidays.
  • Reduced size.

0.8.0

  • Added ‘Current price is percent below today’s average’ condition.
  • Added ‘Current price is percent above today’s average’ condition.

0.7.0

  • 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.

0.6.0

  • Can select country for holidays.
  • Added conditions for holidays (public, bank, observance).

0.5.4

  • Fixed bug for end hours after midnight.

0.5.3

  • Take ‘working day the next day’ into consideration for ‘Comfort’ and ‘ECO’ - modes.
  • Fixed bug for ‘onoff’ capability.

0.5.2

  • Support end hours after midnight.

0.5.1

  • Fixed bug for ‘Set home’ and ‘Set away’ actions.

0.5.0

  • Added triggers for ‘Home’ and ‘Home override’ modes
  • Added ‘Current price among hours of the days lowest prices’ condition

0.4.1

  • Minor bug fixes

0.4.0

  • Presence can be used for Home/Away and At work/Not at work modes
  • Price as EUR/kWh, DKK/kWh, SEK/kWh, NOK/kWh

0.3.1

  • Fix parsing of prices with spaces

0.3.0

  • Added “if current utility price below / above” condition

0.2.0

  • Improved triggers

0.1.0

  • Fetches utility prices

0.0.1

  • Initial version
2 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.