Hive Integration

Very impressed with your work so far thanks, just installed Hive heating and all is working well.

Do you think you’ll be able to add control for the boost function in a newer version?

:slight_smile: thanks @Bobby_Nobble

We have talked about how to implement this, and I would love to add it, do you have a suggestion of how you would like to see it on the webpage?
We were thinking maybe change boost from a sensor to something else which could have a drop down menu to select pre-set boost times (maybe 30, 60, 90, 120 minutes) and when selected it would start the boost for that time.

I don’t know what type of device though could support this or how to implement that though.

Does anyone knows what sort of HA device/component could be used to allow adding setting a boost?

1 Like

If you could add a choice of times that would be perfect!

All the other ways to trigger it that I’ve seen, bar the app, only give a fixed hour and was all I was expecting could be done, then it could just be a simple toggle and I guess a state change to reset it.

If you can do something more advanced, all the fixed one hour boosts also only do a fixed 22 degrees for heating so a temperature choice too would be the icing on the cake. I guess that could look very similar to the existing main control without the graphs.

I will have to research in to what Home Assistant will allow / enable in the interface to allow some sort of boost functionality in Hive.
I think a good option is an InputSelect, but I have no idea how to customise it to be part of the Hive platform.

We are finishing a few code re-writes and adding Hive plug support, which we should be able to release soon ish, after that should be sensors and maybe a couple of tweaks. But I will add the boost functionality to the list for after this :slight_smile:

in the mean time if anyone knows which HA component could be used to enable this and / or how to create a custom InputSelect that could be added to the Hive platform, please let me know?

1 Like

Just want to say that this is working for me after an hour or so’s headscratching. It is the first custom component I have installed though… I had a small problem with a numeric password - our system was installed in September 2015 and originally set up with our BG account number, but quoting the number sends it as a string.
We have a contact sensor on a door which would be useful to be able to monitor so I will have a play with postman to see how it is reported in the API but it might be better being triggered from a Hive recipe rather than being polled.
Deleting __pycache__ in the custom_configurations folder often fixes persistent problems between restarts and saves reinstallation.

hi @sfgreenwood,

Glad to hear you got it working.
With regards to the door sensor, I think the best that could be achieved using HA is to return the status each time the API is polled, which by default is every 2 minutes, but can be set to every 1 minute, and then return whether motion is true or false and the time of the last motion.
The sensor will trigger something in the Hive system and not to HA so I think the only thing we can do is poll and hope we don’t poll too frequently.
(should be able to get battery level from the sensor also I think and add that to an attribute)

Just had a play around with this.

Ive got a combi boiler and the hive system I brought with me from my previous house - only just managed to get it installed this afternoon.
So,
installed in HA - copied all 4 files provided into the correct custom_components seection and restarted HA service
Came back up and picked up a lot of hive sensors
Put them into a group, and displayed them on a card in the front end for easy visibility - great so far

Now the testing
I only have heating installed at the moment, the plan is to get more accessories depending on the success of this test

The mobile app and web app works and they reflect whats true of the system upon changing it. So I know its good

Onto HA:
Schedule mode works, as does manual mode

Boost mode - Doesnt seem to work
I hit the central heatings boost mode, and it says ‘UNKNOWN’ with the following HA errors over and over

2017-06-13 22:02:42 ERROR (MainThread) [custom_components.hive] Heating Mode not found
2017-06-13 22:02:42 ERROR (MainThread) [custom_components.hive] Heating Boost not found

When I turn it off again, the states return to OFF as expected.

Any ideas?

Hi @elPaulio

We moved from a really old Hive API to an old Hive API for the current version released above and found that the data was, although detailed, pretty complex to work with and not as reliable in as many different installations and scenarios. So, we have been working over the last couple of weeks re-writing all the code that interfaces with Hive to use the new / current API used on their website. This API is has a lot less detail, but is much more simpler to work with and so far proven to be more reliable.
We are testing the latest version now and I am hoping that we can post the new version here in the next few days or at least by the end of this week.
This new version will also enabled support for plugs / switches

1 Like

No worries - I’ll keep it on there as its nice to see what its doing and if its going to help me (only just had it installed)

I may look into purchasing some of their door sensors. I already have Philips Hue running, so not too worried about lights

Keep up the great work, its people like you that make HA an already awesome product… even more awesome!

1 Like

Great thanks guys for the continued development of this plugin :slight_smile:

2 Likes

It’s been brilliant, the new light integration works perfectly! Looking forward to the motion sensor update even if it doesn’t bring much functionality

1 Like

Don’t forget now you have Home Assistant there’s a whole world of ‘smart’ products out there that may well be cheaper/better than the Hive ones and the Home Assistant interface makes them all appear as one family.

Yeah, I always do my research before I buy.
Have been caught out by Z-wave though, bought a Vera Home unit before I discovered HA and a few door sensors. They would always be unreliably reporting (or not) all the time. SO in the end, after 6 months of on and off Im ready to give them up.
Have been running HA, Hue lights/motion detection, cameras, Pi’s with sensors on them… and various others for over a year with good success.
This addition of Hive is a bonus, because I was looking to get it anyway (Good Wife Acceptance factor)

From now on, I’ll only be using devices that are definitely supported in HA :slight_smile:

Ahh…I read “installed HA” like you’d just started the journey, rather than “installed IN HA”, so assumed you were a newbie :slight_smile:

Good Evening,

I am pleased to report that we have finished re-writing the Hive API code to work with the new API and added a few new features.

Thanks to @Khole for re-writing the Lights API code and for adding support for Hive Active Plugs and @benhuson1 & @morning_call for testing the latest changes.

The following features have been added:

  • Added support for Hive Active Plugs
  • Device data syncing. When one device gets new data from the Hive API it caches it then triggers an event which then causes all devices to update their data from the cached data. Keeping all devices in sync with each other.
  • All devices now support multiple instances
  • Heating and Hotwater state attributes. Clicking on the heating or Hotwater state or mode sensors will show now and next in the schedule, if in scheduled mode

The setup is the same as at the beginning of this post, but with the addition of the Hive Plugs / switch:

  • Download and copy the hive_main.yaml (79.7 KB)
    file to “/custom_components/hive.py” taking care to change the file name from hive_main.yaml to hive.py
  • Download and copy the hive_climate.yaml (5.9 KB) file to “/custom_components/climate/hive.py” taking care to change the file name from hive_climate.yaml to hive.py
  • Download and copy the hive_sensor.yaml (18.6 KB) file to “/custom_components/sensor/hive.py” taking care to change the file name from hive_sensor.yaml to hive.py
  • Download and copy the hive_light.yaml (5.6 KB) file to “/custom_components/light/hive.py” taking care to change the file name from hive_light.yaml to hive.py
  • Download and copy the hive_switch.yaml (3.1 KB)
    to “/custom_components/switch/hive.py” taking care to change the file name from hive_switch.yaml to hive.py

@elPaulio
This should fix the errors you see in the previous version where Heating Mode and Heating Boost were not found

@PianSom
This version supports multiple versions of all supported devices types now. You should hopefully see both heating zones, but I think that there is still a bit more work to give them nice and unique names, ideally the name from the Hive data as with the lights and plugs.
I would be pleased to work with you to try and get this working. Let me know if you would like to progress this.

@sfgreenwood
Now that this version is released, we (probably @Khole) will look to add Hive Sensor integration to be supported next.

@Bobby_Nobble
Again, now that this version is released and all the API interface code is re-written for the new API I will pick up again and try to see if it is possible to enable setting boost for Heating and Hotwater.

2 Likes

Excellent work - well done! Both zones and water now appear (see attachment), although I have lost the previous sensors. I assume this is expected behaviour?

Yes I am very happy to help with naming as and when you wish.

@PianSom
Excellent, I am pleased it picks up both zones.
The sensors should still be available as before. Did you download and copy all the files? There are updates to all files to implement the device data syncing and multiple devices support.
Are you getting any errors in the log about the sensors?

Doh - no I didn’t grab the sensors file. That’d do it! :slight_smile:

One slightly odd thing - as you’ll see from the screen shot above, one zone seems very keen on having a minimum temp of 10 degs. Notwithstanding the fact that I keep resetting it to 7 …

:slight_smile:

I wonder where it is getting 10c from? Are you resetting to 7c using the HA device or the Hive app or website?
Are there any errors in the log?
I think if you are able to send me and export of the hive API Json data for the products and devices then it should help with this and also the naming

Hi

For reasons now lost in the mists of time I have the frost protection of one thermostat (Upstairs) set at 7 degs and the other (Downstairs) set at 10 degs. These setting can only be changed physically at the thermostat (ie not even using Hive’s app). So I imagine they are not accessible through the API, which would explain why chaing the setting in Hass has no lasting effect.

Happy to send the json for naming purposes, and will dm.