Hive Heating via Zigbee2MQTT, many features do not work

Good afternoon!

I’ve got my Hive heating set up, and it work perfectly with the paired Hive thermostat, but setting the temperature in Home Assistant does nothing, it always bounces back to 1°c.

I’ve tried debugging this by changing the settings in the Zigbee2MQTT add-on web UI, and also by publishing various payloads to Mosquitto as per the documentation, but the only feature that works is system_mode; attempting to set occupied_heating_setpoint, temperature_setpoint_hold or temperature_setpoint_hold_duration does nothing.

I’ve tried (using both the HA MQTT-Publish service and the progam MQTT Explorer):

zigbee2mqtt/FRIENDLY NAME/set
{"occupied_heating_setpoint": 18}

(as per the documentation)
and

zigbee2mqtt/FRIENDLY NAME/set/occupied_heating_setpoint
17

(which is what HA does)
and none of them work, the state of the entity doesn’t change (except for last_seen), and neither do the settings on the physical Hive thermostat.

Any help in this matter would be appreciated.

Had the exact same experience myself with the temperature always bouncing back to 1°C when I switched the heating either on/auto.

The trick here is if the system_mode is off then temperature_setpoint_hold should be off. When system_mode is on then temperature_setpoint_hold should be on. With the key thing being that the temperature_setpoint_hold setting should be toggled on at the same time as the heating switched on or off (see below in automation how one payload is sent with multiple parameters to all being triggered together).


To accomplish this I set up a ‘heating toggle’ automation triggered by three different state changes.

Triggers
State change to ‘heat’
State change to ‘auto’
State change to ‘off’

Label them with trigger id’s so you can use them as part of a choose option.

I then have a choose with three call service (MQTT: Publish) options for each of the triggers.

Choose Options
State change to ‘heat’
Topic - zigbee2mqtt/FRIENDLY NAME/set
Payload - {“system_mode”:“heat”,temperature_setpoint_hold:“1”,occupied_heating_setpoint:“21”}

State change to ‘auto’
Topic - zigbee2mqtt/FRIENDLY NAME/set
Payload - {“system_mode”:“auto”,temperature_setpoint_hold:“1”,occupied_heating_setpoint:“21”}

State change to ‘off’
Topic - zigbee2mqtt/FRIENDLY NAME/set
Payload - {“system_mode”:“off”,temperature_setpoint_hold:“0”}

Change ‘FRIENDLY NAME’ to whatever you have your heating named as.

You can choose whatever occupied_heating_setpoint value you would like as a default which it will automatically go to whenever the heating is switched to On/Auto. When you switch the heating off it will default back to a 1°C as the temperature_setpoint_hold is now false.


If any of that was confusing or you find yourself lost give me a shout and I will happily share my automation code when I am back at home later today.

I am sure there are more elegant/efficient ways of doing this however I have found it working very robustly for my needs and makes the unit act completely as normal operation as if it was directly connected/controlled by the hive hub/system only with now the hub in storage and the Hive app permanently deleted.

1 Like

Thanks for the info, as a quick test before jumping into an automation, I tried publishing

{
  "system_mode": "heat",
  "temperature_setpoint_hold": true,
  "occupied_heating_setpoint": 21
}

to zigbee2mqtt/FRIENDLY NAME/set in MQTT Explorer & HA Dev Tools, and it didn’t work; as before it only changed the last_seen & system_mode values. I even tried adding "temperature_setpoint_hold_duration": 65535 just to see if that helped, but it did not.

I will happily share my automation code when I am back at home later today.

I’d really appreciate that! Thank-you

Oh no that’s really odd, just to make sure covering as much as I can think of what model of heating controller and thermostat do you have? Just in case there’s any subtle differences.

Automation below obviously with ‘zigbee2mqtt/Heating/set change ‘Heating’ to your friendly name. Really hope this helps lead you to sorting out your headache.


alias: Heating Toggle
description: Toggles heating on/off state and sends correct mqtt commands
trigger:
  - platform: state
    entity_id: climate.heating
    to: heat
    id: Heating On
  - platform: state
    entity_id: climate.heating
    to: auto
    id: Auto
  - platform: state
    entity_id: climate.heating
    to: 'off'
    id: Heating Off
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: Heating On
        sequence:
          - service: mqtt.publish
            data:
              topic: zigbee2mqtt/Heating/set
              payload: >-
                {"system_mode":"heat","temperature_setpoint_hold":"1","occupied_heating_setpoint":"21.5"}
      - conditions:
          - condition: trigger
            id: Auto
        sequence:
          - service: mqtt.publish
            data:
              topic: zigbee2mqtt/Heating/set
              payload: >-
                {"system_mode":"auto","temperature_setpoint_hold":"1","occupied_heating_setpoint":"21.5"}
      - conditions:
          - condition: trigger
            id: Heating Off
        sequence:
          - service: mqtt.publish
            data:
              topic: zigbee2mqtt/Heating/set
              payload: '{"system_mode":"off","temperature_setpoint_hold":"0"}'
    default: []
mode: single

Thanks for that John, that didn’t work, but one thing I noticed in MQTT Explorer was that the “temperature_setpoint_hold” for my heating device was set to 1 instead of true/false which I thought was sus, so I tried “reconfiguring” the device in Zigbee2mqtt and now it all works!

Thanks again for your input, your automation looks to be very useful now my heating is working!

What a result, great investigating and uncovering. Nice work, really happy you managed to get to the bottom of it and now have heating working as you envisaged.

Hopefully now thats put to bed and one more thing that just works and is forgotten about.

Except I set it to 21.5 while testing, and forgot to turn it off … what a toasty night we had :smiley:

Hey there. So glad you guys discussed this topic! I’ve been trying to a while to get this working and it’s driving me insane! My SLR2b is running in dual mode, and I can see the zigbee2mqtt is receiving the changes, but it won’t budge out of “idle” state. If I manually turn them either CH or water to “on”, I can’t turn them off via z2m.

Example payload:
mosquitto_pub -h mqtt -t 'zigbee2mqtt/Boiler Control/set' -m '{"system_mode_water":"off","temperature_setpoint_hold_water":0,"running_state_water":"off"}'

mosquitto_pub -h mqtt -t 'zigbee2mqtt/Boiler Control/set' -m '{"system_mode":"heat","temperature_setpoint_hold":"1","occupied_heating_setpoint":"21.5"}'

Any help would be greatly appreciated!

Try “reconfiguring” the device in Zigbee2mqtt. Also, temperature_setpoint_hold should be true/false, not "1"/"0".

Even with true/false, no joy. Could you tell me what firmware version you’re running? Mine could be old (potentially buggy?). And, which version of zigbee2mqtt? I’ve upgraded as a long shot to 1.27.2 but no dice.

Another questions… If you turn on the thermostat manually, what happens? Does it show up in z2m?

    "device": {
        "applicationVersion": 50,
        "dateCode": "20190618",
        "friendlyName": "x",
        "hardwareVersion": 1,
        "ieeeAddr": "x",
        "manufacturerID": 4153,
        "manufacturerName": "Computime",
        "model": "SLR2b",
        "networkAddress": 23208,
        "powerSource": "Mains (single phase)",
        "stackVersion": 2,
        "type": "Router",
        "zclVersion": 1
    }

OK, one disclaimer… I’m not running a thermostat, so literally just the relay on its own. I can’t see it being an issue within the docs.

Hi everyone
i
first of all thanks to everyone so far for their suggestions. I’ve looked into the problem with the temperature jumping back to 1 degrees and it looks as though it’s because of the thermostat receiving invalid commands. Mainly HA publishing data that is incompatible with the remote.

I’ve created an alternative config to get round the problem to more closely match how the hive remote works. It’s here if anyone finds it useful

1 Like

HI, I haven’t checked @greeeny101’s solution yet, but I will try, but in the meantime I can start the Hive, but any duration I input resets to 65535. Is there anyway round this?

1 Like

Hi,

Thanks for the effort, but do you think it would be possible to write up some instructions? I genuinely don’t even know where to start with this. I am learning this all the hard way as I migrate to Zigbee2MQTT.

Thanks again!

Edit: I figured it out with some trial and error. I will write a short tutorial in future.

2 Likes

Hi,
I’m having similar issues was wondering if you’d managed to write some instructions or had some tips?
Thanks

Fairly sure this is the most recent firmware.

I’m looking into this now myself, bit of a minefield with lots of different ideas / device.

Based on this thread simply being more recent I’ll try some of the ideas here.

This is a rough guide because I meant to do this sooner, but was busy and I can’t remember everything perfectly.

  1. Pair up your Hive stuff to Z2M and (for the sake of ease) name your thermostat (the one next to the boiler not the remote one) ‘heater’
  2. Add the hive.yaml to your config folder
  3. Add this to your config.yaml - mqtt: !include hive.yaml
  4. Add the code from this to your automations.yaml
  5. Add this to your config.yaml
  6. Copy the thermostat configs for your pages

I can’t remember if I missed anything, but that’s how its setup looking at mine. Also, those links are for the SLR2 same process for SLR1 just use those configs instead.

This is not an optimal layout for this. You’d ideally want to split your MQTT stuff out differently, but this gets the general gist across, which is where I was initially lost.

My overall recommendation is to move away from Hive because even with this very useful script, it’s still a bit finicky. I got some Drayton Wiser stuff and will be switching soon instead. But in the meantime its functioned well enough for me.

Also, just want to say Hive sucks for their e-waste hub scam. Absolute nerds.

1 Like

Thanks - it was the formatting of the main yaml file that threw me. Throws a lot of errors in VS Code so I assumed there was something else needed.

I’ll take a look at your instructions and report back.

What I found interesting is the zigbee payload messages include weekday information on mine.

Be interesting to see if there’s anything that can be done with that (I tried a few publish messages but they definitely don’t take hold).

When i copy in the config_input_number i seem to get loads of errors. Can anyone help?

I’m not sure if this is greeny’s setup, or a similar one I found. Seems to work for me. Plan to improve the boost setup at some stage if I can (I’d love for them to add a “boost” to their thermostat integration to be honest!).

It’s very much in progress haha.

configuration.yaml

mqtt: 
  !include_dir_merge_named hive/mqtt

#Load automations
automation ui: !include automations.yaml #UI designed Automations
automation hive_down: #Hive Automations
  !include hive/automation/Hive_Downstairs.yaml
automation hive_up: #Hive Automations
  !include hive/automation/Hive_Upstairs.yaml

#Load custom packages
homeassistant:
  packages: 
    !include_dir_merge_named hive/integrations
    !include_dir_named packages/

Created a folder called hive in config with the below subdirectories:

  • automation - contains config_automation yaml files, renamed as I have two.
  • integrations - will contain the config_input_number yaml files, but I’ve renamed it as I have two.
  • mqtt - contains config_mqtt file, as per above has been renamed.

I’m having issues with the multiple files / multiple stats right now FYI.