I was in same position. Just enable 2fa, remove the integration, restart and then re add the integration.
I am using 2fa, removing integration, restarting and re-adding is not working for me. What am I missing?
You are using the account owner account? You are on home assistant 2022.7.0 +
Yes and yes
core-2022.7.5
I’ve just updated Home Assistant to the latest version 2022.9.2 and took the liberty of changing from my custom hive component in HACS to the core one. This means that I needed to switch on 2FA which I’ve done.
Everything has authenticated and I can see some sensors coming in ok. All the hue lights came through too but in terms of the core bits of hive I’ve only got 3 sensors now:
climate.thermostat_1
sensor.thermostat_1_battery_level
switch.thermostat_1_heat_on_demand
I’ve lost all my sensors such as boiler state, demand temperature e.g. sensor.thermostat_1_state
I’ve removed and re-added a few times with restarts between and still no joy.
What have I done wrong?
Turns out there are values under the climate.thermostat_1 entity as I can see them in the database. Don’t understand why they are not exposed in Home Assistant though but that’s probably a lack of understanding on my part rather than it not working.
The question is though if they are not exposed how do I write say an automation depending on the boiler state or temperature?
I can’t help with using the data in automations but I have finally managed to get some useful Hive thermostat data into InfluxDB via Hive. The data shows up as climate.thermostat_2, and these are the fields I have access to:
I can now display current temperature and target temperature in a graph, but not the idle/heating state changes.
The fields all have measurement type of value, and the values are a mixture of text and numeric.
The boiler state field is hvac_action_str (idle|heating) and agree with you that it’s not visible as a condition when trying to write a HA script. Sorry, I’m not sure what you’re trying to achieve with an automation, so this probably isn’t helpful!
Thanks Sian. Yes I do the same thing - Using InfluxDB with Grafana.
Regarding automations I can’t see how to write one that fires when the boiler comes on or goes off as an example?
Not sure if this will help but together with the Hive integration you can install the Hive custom component by Khole
This will give you all the necessary services and sensors to write automations with Hive.
For example, this is what you get with the Hive integration and custom component for the main thermostat.
It’s the same for radiator TRVs if you have them.
For example what I have is an automation where if a window is open, I turn off the TRV in that room. In that same automation, I check whether the main thermostat off and if it is (in summer) I don’t take any action on the TRV.
I hope this helps!
I’ve switched to that and I can those coming through now.
Thanks a lot.
Hopefully this will replace the version included in HA soon.
I’ve just had an Hive installed - but the HA Integration is failing with:
Invalid type for parameter AuthParameters
Whats the current state of play with this integration? Should it work? Do I need to use another one?
Edit: Answering my own question - this is down the 2FA it seems… I downloaded an older version of the Android software and turned it on “properly”… it now works…
Just need to learn how to best display data in HA now… any suggestions as to what I should try?
seems the custom hive config is broken? not updated since Oct '22
i don’t see any of the new entities when installed (and reinstalled many times)
i see errors in logs:
Error while setting up hive platform for sensor
23:43:03 – (ERROR) Sensor
Error while setting up hive platform for binary_sensor
23:43:03 – (ERROR) Binary Sensor
Logger: homeassistant.components.sensor
Source: components/hive/init.py:157
Integration: Sensor (documentation, issues)
First occurred: 23:43:03 (1 occurrences)
Last logged: 23:43:03
Error while setting up hive platform for sensor
Traceback (most recent call last): File
"/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/hive/sensor.py", line 49, in async_setup_entry entities.append(HiveSensorEntity(hive, dev, description)) File "/usr/src/homeassistant/homeassistant/components/hive/sensor.py", line 58, in __init__ super().__init__(hive, hive_device) File "/usr/src/homeassistant/homeassistant/components/hive/__init__.py", line 157, in __init__ model=self.device["deviceData"]["model"], KeyError: 'model'
is there an issue with the paths? ie /components instead of /custom_components?
does anyone have instructions on how to set up the new sensors manually?
particularly the current temp
Is anyone else having trouble with this integration ?
I have had the integration working for months and yesterday, integration said “failed to set up” on HA restart.
Tried, reloading and restarting. Nothing in logs.
EDIT - no idea why this occurred !
Finally tried reinstalling but “An unknown error occurred” appears on the integration setup page
Hub is online and working fine in the Hive App
EDIT - after turning off my VPN on my router, I was able to get it set up again
FWIW, I now have this same issue and can no longer use the integration. I suspect it has something to do with Hive exiting the US market and also viewing my public IP as non UK. For some reason when I go to Hive website (from my PC) I am presented with the US page. If Change to UK and try to login I get the following JSON message.
{"message":"Forbidden"}
I suspect that this is tripping up the setup of the integration.
Hive support are no help, so next port of call is my ISP to se if they have any ideas why Hive thinks I am not in the UK. FTR, I am not using a VPN.
If your hive integration just seems to stop working it could be because your 2fa token expired… If that is the case you need to remove and setup the integration. I just had to do this now ha
This is what you might see in the logs
Logger: homeassistant.config_entries
Source: config_entries.py:402
First occurred: 11:13:46 AM (2 occurrences)
Last logged: 11:24:06 AM
Error setting up entry Your EMAIL for hive
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/apyhiveapi/api/hive_auth_async.py", line 548, in refresh_token
result = await self.loop.run_in_executor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/botocore/client.py", line 535, in _api_call
return self._make_api_call(operation_name, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/botocore/client.py", line 980, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.NotAuthorizedException: An error occurred (NotAuthorizedException) when calling the InitiateAuth operation: Refresh Token has expired
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/hive/__init__.py", line 89, in async_setup_entry
devices = await hive.session.startSession(hive_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/apyhiveapi/session.py", line 502, in startSession
await self.getDevices("No_ID")
File "/usr/local/lib/python3.11/site-packages/apyhiveapi/session.py", line 425, in getDevices
await self.hiveRefreshTokens()
File "/usr/local/lib/python3.11/site-packages/apyhiveapi/session.py", line 304, in hiveRefreshTokens
result = await self.auth.refresh_token(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/apyhiveapi/api/hive_auth_async.py", line 562, in refresh_token
raise HiveInvalid2FACode from err
apyhiveapi.helper.hive_exceptions.HiveInvalid2FACode
@Khole and @Randilio1 I opened a ticket but I guess it’s more of a feature request so feel free to just close it. Thanks again for all your hard work
I want to hire someone to set up a Hive automation for me.
I am currently using IFTTT to turn the boiler on and off at specific times (that vary depending on the season and weather). However, Hive have discontinued the IFTTT integration so I need a new solution.
I used to be a developer, but no longer have time to work out this solution. Given that HA can work with Hive, I just want someone to make it work for me and share a solution that has already been created so that I can automate the control of my heating.
If you already know this, and can assist, please let me know.