Hi,
I’m interested by the Hive integration.
Not sure where to find the custom components download links though.
Any help will be appreciated.
Thanks
M
Hi,
I’m interested by the Hive integration.
Not sure where to find the custom components download links though.
Any help will be appreciated.
Thanks
M
Central Scotland here - got a hub for sale in origional wrapper!
Scroll up a bit, you can’t miss them.
Yes indeed it was in the July post.
Works like a charm thank you.
Regards,
I think someone may have already suggested - could this code be shared in github? Would be great to track and feedback on bugs, improvements etc. As a new member, It would be great to immediately get to the master ‘version’.
Hello,
Apologies for the silence for the last couple of months, @Khole and I have been very busy with a major update to the Hive custom components.
We have completed a major code re-work of all the Component and Platform files to get it ready, and if all goes well, release as an official distribution in the next home-assistant release, 0.59.0, coming out this weekend.
This will mean that anyone that currently uses the current custom components, and who would like to use the official distribution, will need to delete all of the hive.py
files in all the custom component folders so that they do not override the official release versions.
Anyone new to Home-assistant and Hive will no longer need to download and copy to the custom component folders the hive.py
files, only adding the Hive configuration to the configuration.yaml will be needed.
Going forward in the future all updates to the Hive component and platforms will be made through updating the official release versions with any new versions with updates / fixes / new features automatically being included with new home assistant versions.
Unfortunately for those already using the current hive.py
custom component files, if was not possible to bring across all of the functionality from the custom component to the official distribution as some features did not comply with the general design of home assistant.
The main area which will be missing from the official release is all of the non-hive sensors that automatically were added, such as battery level, heating state, boost state, etc… I have update the sensor custom component to work with the new official files, so once released and switched over to the official release, anyone wishing to continue to use these sensors (I certainly do) can copy the new hive.py
sensor custom component file to the usual sensor custom component folder and it will override the official release with one which includes all the original sensors. (I will post a link to it once hive integration is included in a release of home assistant, again, hopefully this weekend)
Another area which we could not include was the devices
configuration.yaml option which enables you to state which entities you would like included in home-assistant. as this option is missing automatically all entities for all hive devices that are discovered will be added.
There are couple of breaking changes too unfortunately.
minutes_between_updates
, you will need to change this to scan_interval
username
, password
and scan_interval
all other options will need to be removedentity_id
name for each entity so they are all now automatically generated, this will (probably) have an impact on your configurations adding each entity (sensor, heating, hotwater) to different groups, so you will probably need to edit any groups to update the name. Also any automations with any of the hive entities will need to be checked and updated too.SCHEDULE
has been replaced with auto
. Any automations using this will need to be updated.MANUAL
has been replaced with heat
. Any automations using this will need to be updated.ON
has been replaced with on
. Any automations using this will need to be updated.OFF
has been replaced with off
. Any automations using this will need to be updated.On the plus side, it will be easier to distribute the latest version to everyone each time there is an update, and also for new hive users of home assistant to get started and up and running.
@Dan1, Hopefully this has answered the main part of your question regarding distribution and getting the latest / master version?
With regards to hosting on GitHub, the files are now already hosted on the official home assistant GitHub repo and also on my fork of it. On my fork khole and I create new branches to update the hive component and platforms and then create a pull request to the official home assistant repo. we are discussing whether it would be good / beneficial to have a new repo dedicated to just these hive component and platform files to make it easier to track feedback, bugs and improvements specific to the hive integration. Also a new repo would be a good place to host the new sensor custom component to supplement the official hive version.
Sorry for the very long post, but hopefully it all makes sense and that the news is welcomed.
Any questions, feel free to ask
Great to know a more official release is coming - shame we lose a few bits - I’m happy to continue using forked versions. I’ve got most things working - 5 active lights, two plugs, 2 sensors and 1 multi colour light (can’t change colour). Heating will be arriving soon so will plug that in too.
My main purpose was to be able to switch blocks of lights on and off in one click - this is working really well.
I’ll have a hack with the rest api to see if I can get the colours to change on the lamp and feedback any findings (actually I started by writing python code against the rest api before discovering home-assistant).
Hi @Dan1
With regards to the colour not working for you on your bulb. This should be available in the 2nd round of hive changes in the official HA releases. I have the code for the colour bulb ready and working. After finishing it, I decided to focus more on the conversion from custom component to hive officially in HA. But this code will be being moved into the 2nd official HA release.
Thanks @Khole - looking forward to that. Quick question regarding sensors. I’m getting a large lag for the automation to run compared to the native hive app - is this expected?
Hi @Dan1
The hive component in home assistant gets new data from the Hive API by default every two minutes as state changes are not pushed from the Hive API to home assistant. So if your home assistant just got new data and then there was motion detect straight after by one of your sensors, you would have to wait the full two minutes before you would see this new state in home assistant.
Going the other way around is pretty much instant, so if you use home assistant to turn on a Hive switch or Hive light, home assistant will immediately make that command to the Hive API and then update all hive entities in home assistant with the latest data for all devices so you see that result in home assistant straight away.
with the scan_interval
configuration option on the official release (or minutes_between_updates
in the custom component) you can set the time between API calls for new data down to 1 minute to speed it up a bit.
Hi @Dan1
Just a follow up point to @rendili comment that’s worth mentioning. With regards to the motion sensor state going back to no motion. Hive has its own delay there as hive has to detect no physical motion for x amount of minutes before the sensor pushes an state update to no motion.
Thanks @Khole and @rendili. For now i’m relying on hive to react to motion - unfortunately this means I can’t use the sun as a condition to react differently (brightness levels and whether or not to activate). Mainly using assist for scenes (e.g dim lights in lounge and turn all other lights off). I suppose I could spot if a light is on and set brightness according to sun horizon…
Absolute genius, I have been waiting for this you have made my weekend. Any chance of the hive plugs anytime soon ?
glad you like
the Hive plugs should already be included and added automatically
Do they not appear anywhere on the home page in home assistant?
I don’t have any Hive plugs, but my z-wave plugs were automatically added to a group on the home page called “Switches”
Yep got them missed the py file middle of the post, Christmas light ready for full automation !!!
Hi @prgg
When you say you missed the py file are you using hive through the custom component files? We have just added hive so its built into HA in the 0.59 release. see 0.59 release notes for link to documentation
I am using the custom branch as a prefer the integration
As I want to carry on using the heating sensors from before, most useful bits for me, will I just need to replace the hive.py I’m already using or remove it. allow the official one to set itself up and then add the new unofficial one?
Hello
Sorry for the delay.
As you may have noticed, 0.59 has been released, and this includes the Hive integration, so now there is no need for downloading and copying custom component files (well almost depending on preference, see following).
So for those of you who have no need for the extra heating sensors, then all you need to do is delete all custom component hive.py files from your custom_component folder structure, update your configuration.yaml to include only username
and password
(plus optionally scan_interval
) and restart HA. The names of entities will be a bit different (they are no longer prefixed by hive
) so group configurations and automations will need a little update.
The documentation for the official release is here
For those (like me, and I think @Bobby_Nobble whose reply came in whilst I was composing this ) who like the heating sensors, then I have re-written the sensors custom component file to work with the official release. so you need to do as above, but also download the new custom component file and copy it to the custom_component\sensor
folder.
For now I will be storing any custom_component files on GitHub so that it will be just one link and file version so people will not have to hunt around for the latest version in this discussion:
Hive for Home Assistant custom component files
@prgg,
Out of interest, which aspect of the custom component setup do you prefer over the official release?
Does using the official release and adding the sensor custom component bring them inline for you?
Thank you guys for your continued development on Hive.
I have added @rendili hive.py file into my custom_component\sensor. Do I need to do anything else as I can see lots of errors in my log and no sensors exist. I have removed all the previous custom sensors before upgrading to 0.59.
Thanks
2017-12-04 10:58:23 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 126, in _async_setup_platform
self.hass, self.config, self.domain, platform_type)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/setup.py", line 241, in async_prepare_setup_platform
platform = loader.get_platform(domain, platform_name)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/loader.py", line 104, in get_platform
return get_component(PLATFORM_FORMAT.format(domain, platform))
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/loader.py", line 142, in get_component
module = importlib.import_module(path)
File "/srv/homeassistant/homeassistant_venv/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 669, in exec_module
File "<frozen importlib._bootstrap_external>", line 775, in get_code
File "<frozen importlib._bootstrap_external>", line 735, in source_to_code
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/homeassistant/.homeassistant/custom_components/sensor/hive.py", line 7
<!DOCTYPE html>
^
SyntaxError: invalid syntax