Hive Integration

Hi @rendili

I have just upgraded to HA 89 and it seems all the entities relating to this custom component have disappeared again. Is there a new version coming that will deal with the latest changes in HA.

Many thanks

Hi

With the release of 0.89.0 the way Custom Components are handled is very different. AS far as I understand it, no longer are we able to create a custom component for just one aspect of an integration, we have to replace the entire integration.

What this means for the Hive Component / Platform and Custom Component is that the way we have all be using the Custom Component in the passed, including the new directory structure from the 0.88.0 release will no longer work. We cant just override the sensor integration with a custom sensor.py file, we have to override everything, heating, hotwater, lights, switches and the main hive hub code too.

If you do this though, what will happen is that when you upgrade HA to the latest version, if there is any change in Hive code then you will not pick this up automatically, you will need to re-copy the latest files for all Hive files again, then re-copy the custom component.

As far as the code in the Hive custom component goes, I don’t think any change is needed, and I don’t think any code has changed (I will check) in the main Hive code files.

To get this working now, I think you have to copy all the files below, except sensor.py to your custom components directory:

Then copy the custom component sensor.py file from below to your custom components directory:

This hopefully should then work again. but you will need to re-copy the none sensor.py files again each time there is a change to Hive code

I have not had time to test, hopefully Monday I will get some time to do this.

2 Likes

Many thank @rendili , I’ll give it a go and see if that works.

1 Like

Hi @rendili

I have tried the above but it doesn’t seem to like it.
I get a notification after restarting as follows:

'The following components and platforms could not be set up:

hive.sensor

Please check your config’

Exact same my end

Hi @GuruPG & @grom.m20b25, thanks for the feedback.

I managed to find some time to look more closely in to this and thanks to pnbruckner have come up with a solution that at least works on my DEV setup.

What this does is make all of Hive a custom component, but for all components except sensor will redirect to the built-in Hive code and for the sensor component use the custom component code.
In the future if there are any Home Assistant releases that have updated Hive code, then this will automatically be picked up in the usual way of upgrading Home Assistant.
If there is an update to the custom component code, then the latest code will still need to be downloaded from the above location.

It pretty much the same as before, except we need to copy more files for the initial setup, and for each component there will be a warning in the log to say it is a custom component, which except for sensor, it really isn’t.

2019-03-08 22:42:07 WARNING (MainThread) [homeassistant.loader] You are using a custom component for hive which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-03-08 22:42:09 WARNING (MainThread) [homeassistant.loader] You are using a custom component for hive.sensor which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-03-08 22:42:09 WARNING (MainThread) [homeassistant.loader] You are using a custom component for hive.climate which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-03-08 22:42:09 WARNING (MainThread) [homeassistant.loader] You are using a custom component for hive.light which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

You will get one warning entry for each Hive component you use. I don’t have any switches or hive sensors, so my setup does not try and load those components, so I don’t get those warnings.

please let me know if this does not work for you, and I will take another look.

2 Likes

so far it looks good to me thanks.

1 Like

Excellent, thanks for the feedback

@rendili, thank you for getting this sorted so quickly.
All works perfectly again. :grin:
Many thanks for your hard work.

1 Like

Great stuff, glad it works, thanks for the feedback :slight_smile:

Hi @rendili, I can confirm that the update works for me as well. Thank you for the quick response.

1 Like

Hi @yakox. good to hear that it works for you too, thanks for the feedback :slight_smile:

Hi Fellow Hive’ers,

I’m trying to get to grips with automating my hive central heating, but I’m kinda falling at the first hurdle.

There are a couple of things that I want to do:

  1. Create a simple button/switch/toggle in lovelace to boost the heating for an hour
  2. Build an automation to turn the heating on between times.

Do you guys have any examples that you provide??

I have also provided some failing code below (not sure how to set the target temp??):

- id: 'Heating_boost_night'
  alias: 'Heating Boost Night'
  trigger:
    - platform: numeric_state
      entity_id: sensor.house_temperature
      below: '18'
      for:
        minutes: 30
  condition: 
    - condition: time
      after: '21:00:00'
      before: '05:00:00'
    - condition: state
      entity_id: group.family
      state: 'home'
  action:   
    - service: climate.set_operation_mode
      data:
        entity_id: climate.heating
        operation_mode: 'heat'
#        temperature: '24'
    - service: notify.gmail_notify
      data:
        title: 'Heating Boost Cold Night'
        message: ''

@Martin_Granger

Regarding point one this not possible yet but we are trying to create a custom boost service for hive to allows this.

With regards to the automation set operation doesn’t support setting temperature. If you use the set temperature service you should be able to achieve what you need see docs

Many thanks for this information!

I have managed to build a boost button of sorts by using an input boolean and an automation. I then just added the switch to lovelace. See the code below:

- id: 'heating_boost'
  alias: 'Heating Boost'
  initial_state: true
  trigger:
    - platform: state
      entity_id: input_boolean.heating_boost
      to: 'on'
  condition:
  action:
    - service: climate.set_operation_mode
      data:
        entity_id: climate.heating
        operation_mode: 'heat'
    - service: climate.set_temperature
      entity_id: climate.heating
      data_template:
        temperature: '25'
    - service: notify.gmail_notify
      data:
        title: 'Heating Boost'
        message: ''
    - delay: '01:00:00'
    - service: homeassistant.toggle
      entity_id: input_boolean.heating_boost

Hi, thank you for your tutorial, Im new here so please bear with me if my question sounds silly.

I’ve done a fresh install of Hass.io on Ubuntu Server 18.0 with docker. I’ve followed your steps. However the trouble im having is, there is no folder named Custom_component and when i use my FTP software to try and make the folder under homeassistant it just wont let me. Im logged in as root on the server if that makes any difference?

I look forward to your reply.

Many Thanks!

@shabz, install the samba share addon.

Hello Hive users.

I’ve been using HA with Hive for about a month now across Heating/Water and a few lights too. I also have installed several Hive GU10 bulbs in my kitchen however, when I trigger a scene or automation through HA it takes 3/4 seconds for each bulb to execute the required action sequentially and across a bunch of kitchen downlighters it is painfully slow to complete :o(

Interestingly if I setup a scene in Homekit (hive is exposed there by HA) all the bulbs come on almost instantly as if all the requests are sent in parallel. Unfortunately, there does not seem to be a way yet in HA to call a Homekit Scene directly.

I have also tried putting all the bulbs into a single group (on Hive) so they can be actioned and managed as a single light. Whilst I can reference this group/light in HA, all calls to it are just ignored.

I was wondering if the smart folk on this forum could help guide me to a solution…

Hi, I’ve just installed hass.io on a Raspberry pi. My Hue lights were found straight away and the next step was to add my Hive heating.

I’ve added the following to my configuration.yaml
hive:
username: MyEmailAddress
password: MyPassword

And then… nothing. When I check the configuration it says:
Configuration invalid
Component not found: hive

I’ve restarted hass.io a few times but still the same thing. I’m feeling quite silly as this should be the easy part. Any suggestions on how to troubleshoot this?

edit: I was going to give it another go today. Started the Raspberry Pi and Hassio and it all worked. Not sure why but works for me :wink:

Have you placed the ymal files in the custom folder as well?