Humbug modes for Hive heating entities?

I’ve instigated two automations on my hive heating, one for us, and one for our house sitters (looking after the house over winter). 1st is very simple.

  1. for us - quite simply, an automation that runs at 23:00:00 every day, no conditions, switches the Heating mode to auto. With Hive you can tell alexa to set the stat to a higher temp, this puts it in manual mode, and you can forget, go to bed, and wake up boiling with the heating on all night. This simple automation stops that happening by putting the syystem back in full schedule mode (auto) at 23:00.

  2. Bah Humbug!
    Trigger: Thermostat measured temperature changed
    Above: 20.5 c
    Action: change hvac mode on thermostat
    Hvac mode: Auto.

Wondering if there was a more elegant way of doing the 2nd one? It works, but I was wondering if I could say “if stat is changed to above 20.5” instead of monitoring the room temp - I can’t find the device/entity for where the actual “dial”/“temp” is set. LIke I said, it works, but I’d like to know the other way too.

It’s all a convenience thing really, because anyone with the will coudl simply raise the top temp in the heating schedules if they wanted! You can’t lock up the hive stat as far as I’m aware.

I control my Hive completely though HA so it’s in ‘Manual’ mode as far as Hive is concerned (in reality, only ever ‘off’ or ‘on’ with the temp adjusted according to my programme).
I created the following template sensors to make this easy to do:

template:
  - sensor:
 
      # Mode as reported by HIVE (Off, On, Schedule, Boost)
      - name: "Hive heating reported mode"
        unique_id: hive_heating_reported_mode
        state: "{{ states('climate.thermostat') }}"

      # Action as reported by HIVE (idle, Off, on)
      - name: "Hive heating reported action"
        unique_id: hive_heating_reported_action
        state: "{{ state_attr('climate.thermostat','hvac_action') }}"

      # Current temperature as reported by HIVE thermostat
      - name: "Hive heating reported current temp"
        unique_id: hive_heating_reported_current_temp
        device_class: temperature
        unit_of_measurement: °C
        state: "{{ state_attr('climate.thermostat','current_temperature') }}"

      # Target temp as reported by HIVE thermostat
      - name: "Hive heating reported target temp"
        unique_id: hive_heating_reported_target_temp
        device_class: temperature
        unit_of_measurement: °C
        state: "{{ state_attr('climate.thermostat','temperature') }}"

The 3rd one reports the temperature seen by the Hive thermostat.

I set the temp as follows:

- service: climate.set_temperature
  data_template:
    temperature: 20.5
    entity_id: climate.thermostat

Hope this helps.
Note, your have maybe called climate.something_else

[edited for typos and formatting]

1 Like

Interesting! I might look at that once HA has been running a while and I trust it’s reliability. It’s only been up and running about a week.

Incidentally , I had a though this morning and realised by 2) automation has a fundamental flaw. If I turn the heating off (holiday) it’ll switch it back to auto every night! So now a simple condition sorts that.

  1. Bah Humbug!
    Trigger: Thermostat measured temperature changed
    Above: 20.5 c

Condition : hvac mode on thermostat
Mode: heat (which is manual)

Action: change hvac mode on thermostat
Hvac mode: Auto.

So it’ll only put it to auto if it’s on manual , and leave it alone if it’s off, or on auto already.

1 Like

I can share my whole Hive heating/water package which creates all the sensors and helpers for me to manage both water and central heating. You’re also welcome to the dashboards I use to control them (nite: I use HACS for some cards).

Hello @jchh this is my first post!
I’ve set Home Assistant up initially because I want to control my Hive system in a more complex way than the Hive app allows.
Is there any chance that you could share your package with me?
I would be very interested to see how you have set things up.
Thanks

Hi, @gwatuk - we can’t be more than 30 mins apart - I’m not far from Oxford.

I’m away from home right now, but would be happy to share everything when I can.

What sort of things do you want to do with your Hive?

Good to hear from you!
There’s a couple of things I’ve been wanting to do.
Selective heat on demand - so it only happens at certain times of the day.
(So that would be to ditch Hive’s heat on demand and design something similar but more flexible.)
And secondly I’d like to have a kind of group boost option. If I want to boost the temperature of my lounge I need to boost two TRVs and boost the system’s thermostat (which is in the lounge).
Those two things are actually quite similar.

But it’s very early days for me. I’ve only created one automation so far - making a temperature sensor boost a TRV. But I was really pleased when I’d made it work!

OK, so I don’t have heat-on-demand (I have no smart TRV’s). I got one for Christmas to play with, but haven’t tried it out yet. If I understand you correctly, you want the TRV to call for heat within certain time-windows? That’s sounds possible but I haven’t programmed that.

Basically, I put a calibrated Hue temp sensor (any make will do) into each room and then load-balanced my radiators. That is to say, I adjusted each (manual) TRV until I got the right temp in each room for a given temp at the Hive thermostat.

My concern with on-demand TRV’s is that one may call for heat, then the next, then the next such that your boiler is always on but only ever servicing one radiator at a time. I’m not sure if that is a real concern or not, but I have no experience with them.

My use of the smart TRV’s would only be to turn upstairs radiators down when house_mode: awake (i.e. during the day). It would then turn the upstairs TRVs on (back to the balanced point) when outside_light: dark (i.e. in the evenings). …something like that, anyway.

My heating spec is as follows (let me know if you still want to have it):


Basic modes:

  • Heating: [off, on, scheduled, boost]

    • Scheduled windows override house_mode but not presence.
      • This means I can set the heating at 6:30am before I get up (house_mode: asleep).
      • I set this window to the default day temp setting so, when I do get up, nothing changes
        • This effectively means I can set the time when house_mode is awake) as house_mode: awake is currently triggered on first movement downstairs after 7am.
        • Now I think about it, I should add a time component to waking the house up.
      • Outside of the scheduled windows (which sets a specific temp), the temp goes back to the default (based on house_mode and presence).
      • I have 4 scheduled windows (but easy to make more)
    • On:
      • has 3 temp defaults based on house_mode and presence so:
      • home and awake
      • home and asleep
      • away.
      • …but I have never had to use ‘On’.
    • Off:
      • I personally set the ‘Off’ temp default to be my anti-frost temp.
    • Boost
      • Pushing the ‘boost’ button temperature increases relative temp by an amount (according to a default setting) for a duration (according to a default setting).
  • Hot water: [off, on, scheduled, boost]

    • follows the same principles as heating but without any temp defaults and so not influenced by house_mode or presence.
    • The only default setting is boost duration.

In reality, the Hive heating is always on, but the temp setting varies according to the mode (above) and the influences (below). I typically leave the system in ‘scheduled’ mode all year round and rarely have to adjust the defaults.

Influences:

  • House mode: {Awake, Asleep, Manual}
    ‘Awake’ is automated
    ‘asleep’ is set by a ‘good night button’
    house_mode can be manually set in my dashboard
  • Presence: {home, away}
    Both ‘home’ and ‘away’ are automated based on user and zone.home

Each mode and influence has a default temp setting for heating (which can be adjusted) and a boost setting for heating and duration.

After a couple of days getting the defaults right (and setting the schedule windows), I’ve been able to leave it almost completely alone. …hope that all makes sense.

Future

  • My Hive is currently working via the Hive integration (which uses the Hive online account). Now that I have got it working as I want, I will changeover to using completely local control (without the modem device) using Zigbee2MQTT. I am only waiting for it to become warmer outside to make the switch.
  • Integrate the single smart-TRV as mentioned above to see if I want to add this is as a proper influence.

Here are some screen shots of the control dash so you can get an idea…

Main dash button
Screenshot 2023-02-04 at 10.12.21

Pushing that button takes you to the control screen…

  • You can see:
    • I am in ‘schedule mode’
      • 4 scheduled windows are set and active
      • We are in the 2nd scheduled window right now
    • The boiler is heating right now
    • The graph:
      • The grey bars on the graph show when the boiler has been actually heating.
      • the temp changes last night show when HA was being upgraded and some other docker-related updates so Hive defaulted to ‘off’ which for me is set to 12 °C.
  • The default settings are hidden behind a drop-down so I don’t modify them by accident.
    • The most important defaults (to me) are displayed on the screen but tapping them does nothing so I can’t change them by accident.
    • I have to look in the drop-down to change them.

So, homing in on the ‘default settings’ drop-down…

Away defaults:
Screenshot 2023-02-04 at 10.16.41

On defaults:
Screenshot 2023-02-04 at 10.17.41

Schedule defaults (1st scheduled window showing):

‘Boost’ defaults:
Screenshot 2023-02-04 at 10.18.48

[edited for content, typos and clarity - I posted too early by accident]

2 Likes

I’ve got Hive TRVs everywhere except the hall. On the whole I think they are pretty good. But the problem with all TRVs is that they are responding to the temperature as measured right next to the radiator which is bonkers really (although I think Hive claim that they have some kind of algorithm to beat this). So with HA I’m planning to put a temperature sensor in each room at some distance from the rad and let them control the TRV target temperature settings. I’ve bought some cheap Tuya sensors from eBay (£5 each!) and they seem to be pretty good. (They’re within about 0.2 degrees of the Hive thermostat and are also consistent with some other sensors I have from SensorPush.)

If you fit your Hive TRV in your bedroom without using heat on demand and set its schedule to heat in the evening just before you go to bed then there’s a reasonable chance that the main Hive thermostat will have the boiler turned off. And if you use heat on demand to deal with this you will then burn lots of gas heating the rest of the house when you don’t need to :laughing:.

The Hive TRVs are quite expensive but I’ve always thought that they would pay for themselves. (This is the second property where I’ve installed them - we only recently moved to Oxford and installing the Hive system was one of the first things I did.)
If I can get HA to control them it takes things to a whole new level and should have a significant impact on our gas bills :smiley:.

Hi John, is there any chance you could post your YAML files, this is exactly what im looking for ( but not got the knowelege to get it running) please :slight_smile:

A word of warning the messages zigbee sends for climate devices appears to be in the wrong format for Hive.

I’m considering raising a github ticket on it to see if they’ll change what is posted or not.

(It’s small things like 1 and 0 vs true and false, and missing parameters when things are changed - you seem to need to resend the full message versus just

There’s some other good posts on it but the main thing is you basically need to listen for events on the real Hive device (to read current temp, set temp via Stát and mode) and create a manual mqtt climate device which will send commands from HA for you.

This is a good view of it.

Other device is also there, SLR2, which has slightly different endpoints (basically the same but _heat, _water IIRC).

There’s also this, which is a bit more straight forward.

My own views of the messages, with minimal experience, is that its impossible to sync or update the schedule to/from HA - doesn’t seem to impact you as you’ve created HA only schedules as well?

This is because the schedule is clearly maintained on the Thermostat but all other messages are to the receiver and its unclear if you can change the schedule. I might mess around with it again in summer myself but I got annoyed.

It seems like the stat sends a message for the next day of schedules to the receiver -

Thanks, but I’m not sure what you mean by this. Are you integrating via the hub (cloud) or via Z2M (local)? When you write ‘zigbee sends’, which direction are you referring to?

I am currently via the hub but intend to change to Z2M (to remove the cloud integration) when it’s so I can play without worrying about it needing to be on. All the comments with Z2M appear to be OK regarding control (I was aware of that thread you posted - very informative).

I’m referring to local, so Hub removed.

I had issues with heating not activating via default zigbee2mqtt messages from HA.

Both threads offer solutions but I’ve temporarily gone back to cloud.

OK, good to know - thanks for the tip!

Hey John,

Any chance you feel comfortable posting some of what you have done above?

I’m back messing with mine and you’ve got some real good stuff.

Do you think my name is John? I dismissed the email notification from you at the time because I assumed you were asking someone else.

So, 2 emails to John now and I’m thinking maybe you guys are referring to me. Let me know and I’d be happy to help.

Please be aware that I am about to change my logic to remove both ‘off’ and ‘on’ as I have found them essentially redundant. I’m then going to try setting it up MQTT (spring is here so I can afford to not have heating for a while) so this means you can have what I have now, wait a bit to have the (better) simplified version and/or wait a bit longer for the MQTT version (if it works).

1 Like

I went off the other poster hahahahaha.

Apologies.

1 Like

No need to apologise!

I’m on Mqtt myself as the Hub disconnected a few times so I lost “remote” control and I figured why the hell not.

At the moment just going with turning it on and off.

jchh , sorry I was using a font that made your user name look like John. I really apologise , yes it was you. could we please have a look at your code :slight_smile: