Hive Integration

Hi @Bobby_Nobble

Just in case you haven’t seen already, v0.61.0 is out with the Hive-R2 release which include the simple boost functionality for heating and hotwater.
I didn’t look like you could specify time or temperature with the climate device, so the way it works for a Hive heating climate device is that is sets the boost to 30 minutes and 0.5c above current temperature. Hive hotwater boost will just set the boost for 30minutes.

This release also include support for the Hive colour bulbs.

1 Like

Hi @rendili, @Dan1

I have looked at this a while ago it does look like it can be done present hive automation as switches. I never took it further than a brief look so I don’t know the ins and outs of using the API to change them. But it definitely looks possible.

Cheers for the heads up, just waiting for the update on hass.io. How you’ve done it sounds perfect for what I wanted.

Thanks again.

1 Like

I’ve just followed these instructions and now see some new icons at the top of my HA web console (see picture), but nothing listed as switches. Can anyone tell me if/how I can change my thermostat from scheduled to manual and set it to a specific temperature?
My system is one of the original British Gas Remote Heating systems, installed in 2013 and migrated to the Hive platform a couple of years ago.

Hi @itm1960

Out of interest, which instructions did you follow?

At a basic level, all you need to do is add the following to your configuration.yaml file:

hive:
 username: YOUR_USERNAME
 password: YOUR_PASSWORD

Try clicking on each icon at the top, one hopefully should be the thermostat, it is here where you can set the temperature and the mode (heat, manual, off)

I followed your very helpful guide from this thread:

(but with the more recent hive.py files from a later post).
If I click one of the icons it pops up a window showing current state and a timeline, but doesn’t give an option to change the state.
I do have that entry in my configuration.yaml:
hive:
username: [email protected]
password: myhivepassword
devices:
- hive_heating
- hive_hotwater
- hive_thermostat_batterylevel
- hive_heating_currenttemperature
- hive_heating_targettemperature
- hive_heating_state
- hive_heating_mode
- hive_heating_boost
- hive_hotwater_mode
- hive_hotwater_state
- hive_hotwater_boost

ah ok.
To be honest, you would be better off just adding those three lines to your config file and not downloading the files embedded in this thread. The files are older versions and the latest and greatest integration for Hive is now included in the home assistant release automatically.
If you have downloaded and copied any hive.py files and added to the custom_components folder structure, then I would advise deleting them, then removing all the -devices: config section and then restart. you should get the latest in the Home Assistant release Assuming you are running 0.61 or later.

Ah OK I’ve done that and now I see the Climate group on my HA console, along with switches - thanks. What I’d like to do is use voice control (Google Home/IFTTT) to switch the operating mode between Scheduled and Manual, and to set a specific target temperature. If I create a script to do that, what commands/syntax should I use?

Hey,

I dont suppose you have the multizone by any chance? Wondering if your HA can see both Thermostats?

I can only see the one at the moment.

Cheers

Hi @KeithMcC

If you are using the Hive integration that is distributed in the latest release of Home Assistant then it supports multizone heating and should show both thermostats
There were some older custom_component files from a long time ago that supported only one zone

Ah! I just noticed an update and you are correct. Now showing both zones. Thanks!

great stuff :slight_smile:

1 Like

Hello, quite new to this. I have HA installed on 2 Win10 machines (one has a full blown Visual Studio on it, the other a new install) and a Ubuntu 17.10. All have the same “problem”. All versions of everything on all machines is the latest. HA installed on top of Python.

In configuration.yaml I have the bare hive: elements (username/password). Everything shows up on the Overview page perfectly (2 lights, heating, hot water and a motion sensor). Porch Sensor as named in the iOS Kasa app gets called binary_sensor.porch_sensor in the Developer tools, States page.

My problem is that HA never receives a on or a off trigger from the sensor. I understand the possible 1:59 second delay but I never receive anything. Nothing in the logs, error or otherwise.

If I “manually” set the state of the sensor in the States page all works as it should,

The sensor is working ok. The Kasa iOS app notifies me instantly of any motion.

For completeness, below is the relevant part of automations.yaml. I don’t think it’s “my code” related rather than something stupid I’m missing in the setup. All firewalls are off and everything involved my end are on the same subnet.

I look forward to learning how daft I’ve been.

Another question, not meaning to distract from the above, is there a way for my iOS (or Android) Kasa app to fire a HA event ? This would solve the <2 minute delay issue.

Thanks, Peter.

- id: porch_sensor_light_on
  alias: Turn on Porch Light when there is movement
  trigger:
    platform: state
    entity_id: binary_sensor.porch_sensor
    to: 'on'
  action:
    service: homeassistant.turn_on
    entity_id: light.ha_porch
- id: porch_sensor_light_off
  alias: Turn off Porch Light 10 minutes after last movement
  trigger:
    platform: state
    entity_id: binary_sensor.porch_sensor
    to: 'off'
    for: 00:10:00
  action:
  - service: homeassistant.turn_off
    entity_id: light.ha_porch

Reading your post it sounds like the motion sensor is a TP-Link one and therefore has nothing to do with Hive?

My mistake, it is a Hive motion sensor. Swap Kasa for Hive above. Kasa/TP-Link confusion caused by me wanting to turn a TP-Link light on from the Hive sensor.

Hello

Hopefully i have this right, @Khole is the expert in this area, but I think this is currently an issue with the version of the current library we have in use with the current version of Home Assistant and that Hive changed the way sensor information is stored and retrieved in the Hive API.

@Khole has made a load of updates to our library so as to handle the new way the sensor data is stored in the API and retrieved from the API.
These updates will be made live in the next release we make of the Hive integration, which hopefully will be with Home Assistant 0.65

2 Likes

Ye @rendili is right hive have changed the way they send motion sensor data to there api. There is a library version in development to fix this issue. We are currently working on putting the last fixes in for this. Sorry I havnt got back to you sooner.

1 Like

Not at all. I look forward to the upgrade. Hopefully this new API will be instant rather than the old way of doing things ?

Just for now I have Hive email me when there’s motion. This email gets picked up by imap_email_content which in turn fires the trigger. It works but the delay Is a couple of seconds. Ok for most uses, not so great for turning on a light…

@peter_h

I’m afraid it won’t be instant we will still be constrained by the default 2 minute wait between api calls. The only way to speed that up is override it in your home assistant hive config and reduce it to a shorter wait time.

Ah, that’s a shame. Is there any way of getting a Hive Sensor to “instantly” turn on a TP-Link bulb ?

Alternatively, is there a TP-Link version of the Hive Motion Sensor that will work instantly with a TP-Link bulb (that costs about the same) ?

I’m trying to do this without adding any more Routers/Switches/Hubs. This means no “z-route”, just WiFI and software.

Changing the light fitting to take a Hive bulb would be the obvious choice. However, I feel this would be far too expensive. The new fitting wouldn’t match the door handles, which wouldn’t match the flooring, which makes the walls and ceiling look tired etc. etc…