Honeywell CH/DHW via RF - evohome, sundial, hometronics, chronotherm

I’ve updated to this version but now the integration stopped working.
HASS says “was unable to start integration evohome_cc” upon startup.

In the logs I get the following:

Logger: homeassistant.setup
Source: custom_components/evohome_cc/__init__.py:188
First occurred: 8:14:22 AM (1 occurrences)
Last logged: 8:14:22 AM

Error during setup of component evohome_cc
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 213, in _async_setup_component
    result = await task
  File "/config/custom_components/evohome_cc/__init__.py", line 100, in async_setup
    await broker.async_restore_client_state()
  File "/config/custom_components/evohome_cc/__init__.py", line 188, in async_restore_client_state
    await self.client._set_state(**app_storage["client_state"])
KeyError: 'client_state'

That doesn’t look like very useful information. Anything else I can do to provide more clarity?

I’m having the same issue. Was logging it on github:

The Imformation was very useful.

A fix has been pushed - I changed the way I did something at the last minute, sorry.

@phdelodder The delay looking at it has partly been because of the time taken with the big changes I’ve just pushed.

But you have provide no description of what the change does & why I should accept it - could you add that to the PR please.

I apologize for leaving out a description, it was never my intention. Could please have a look again?

Thx for the quick update, updated the integration the error is away.
Ìt took some more time than normal before the climate entities came back.

Maybe - maybe not (perception?) - In any case, it wasn’t saving state before, so had nothing to restore.

After a few minutes, it will have saved state (it does this very 5 minutes), and subsequent restarts will be quicker…

I expect a few teething bugs (I’ve just thought of something I didn’t test) - bear with me.

I think is has to do that i changed the scan interval from 60 to 300

You don’t have to apologise - you should do everything you can to make it a no-brainer for me to accept your PR:

  • it appears it fixes a bug that’s been on my to-do list (if I’d read that in the description…)
  • it appears to address two issues (so it must be two PRs - if I dont want 1/2 of it, I will not any of it merge it)

SO 3 tips:

  • small
  • atomic
  • description explaining/justifying PR

Yes - the think I had just thought to test (mine is 10 secs fro development reasons, but yours shoudl be 300, and I’m intending to make it event-drivien in any case)

So - fixed that. My only ask is please trey post a more useful message?

“It used to update in about 60 seconds, I changed scan_interval to 300 seconds and it seemed to take much longer for teh climate entities to appear - about the 300 seconds?”

1 Like

OK, just pushed again - all the stuff mentioned above since 0.7.7 was first dropped hould be fixed - including @phdelodder’s useful PR(s).

Please be brave & continue to test - I have a day off today!

2 Likes

Looks good, only new error I got so far is this one concerning HomeKit:

2021-04-02 11:03:25 ERROR (MainThread) [homeassistant.components.homekit.type_thermostats] Cannot map hvac target mode: off to homekit as only {1: 'heat', 3: 'auto'} modes are supported

I’m sorry, that’s not very helpful - Perhaps you could explain a little more what you were trying to do?

Was it a controller or a zone - how have you integrated it with Homekit.?

Everything seems to be working fine so far.
When I restart Home Assistant I do get some errors but they don’t seem to be breaking anything.

Logger: evohome_rf
Source: /usr/local/lib/python3.8/site-packages/evohome_rf/__init__.py:127
First occurred: 10:46:22 AM (1 occurrences)
Last logged: 10:46:22 AM

handle_exception(): Caught: Unclosed client session
Logger: evohome_rf.transport
Source: /usr/local/lib/python3.8/site-packages/evohome_rf/transport.py:683
First occurred: 10:46:20 AM (40 occurrences)
Last logged: 10:50:27 AM

PktProtocolQos.send_data(RQ|10:030051|3220|00): boff=0, want=RP|10:030051|3220|00, tout=2021-04-02 08:47:38.934283: EXPIRED
PktProtocolQos.send_data(RQ|10:030051|3220|00): boff=0, want=RP|10:030051|3220|00, tout=2021-04-02 08:47:39.473573: EXPIRED
PktProtocolQos.send_data(RQ|20:000343|10E0|00): boff=0, want=RP|20:000343|10E0|00, tout=2021-04-02 08:47:46.634982: EXPIRED
PktProtocolQos.send_data(RQ|10:030051|3EF1|00): boff=1, want=RQ|10:030051|3EF1|00, tout=2021-04-02 08:50:26.343320: RE-SENT (1/1)
PktProtocolQos.send_data(RQ|10:030051|3EF1|00): boff=1, want=RP|10:030051|3EF1|00, tout=2021-04-02 08:50:27.270824: EXPIRED

I got this message during startup, not doing anything with HomeKit. All zones have a matching HomeKit control to set temperature, or set heating/cooling etc but I never use that last part. Once you set a temperature in HomeKit the temperature setpoint is adjusted until the next scheduled setpoint, which is the only use case for me.

Maybe something happened between 0.7.6 and the latest code with respect to schedule settings/mapping of hvac modes that no longer suits the HomeKit integration.

i get this error in my HA log:

Logger: asyncio
Source: helpers/config_entry_oauth2_flow.py:131
First occurred: 9:34:11 (3 occurrences)
Last logged: 9:34:11

Unhandled error in exception handler context: {'message': 'Task exception was never retrieved', 'exception': RuntimeError('No current request in context'), 'future': <Task finished name='Task-9718' coro=<FlowManager.async_init() done, defined at /usr/src/homeassistant/homeassistant/data_entry_flow.py:112> exception=RuntimeError('No current request in context')>}
Unhandled error in exception handler context: {'message': 'Task exception was never retrieved', 'exception': RuntimeError('No current request in context'), 'future': <Task finished name='Task-9720' coro=<FlowManager.async_init() done, defined at /usr/src/homeassistant/homeassistant/data_entry_flow.py:112> exception=RuntimeError('No current request in context')>}
Unhandled error in exception handler context: {'message': 'Task exception was never retrieved', 'exception': RuntimeError('No current request in context'), 'future': <Task finished name='Task-9722' coro=<FlowManager.async_init() done, defined at /usr/src/homeassistant/homeassistant/data_entry_flow.py:112> exception=RuntimeError('No current request in context')>}
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1744, in call_exception_handler
    self._exception_handler(self, context)
  File "/usr/local/lib/python3.8/site-packages/evohome_rf/__init__.py", line 131, in handle_exception
    raise exc
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 133, in async_init
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 216, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 325, in async_step_discovery
    return await self.async_step_pick_implementation()
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 250, in async_step_pick_implementation
    return await self.async_step_auth()
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 274, in async_step_auth
    url = await self.flow_impl.async_generate_authorize_url(self.flow_id)
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 147, in async_generate_authorize_url
    redirect_uri = self.redirect_uri
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 131, in redirect_uri
    raise RuntimeError("No current request in context")
RuntimeError: No current request in context

i see that evohome is involved… but i don’t know what the problem is.

1 Like

The library is catching all exceptions in the loop - AFAICT, the exception is not useful to evohome_rf (not caused by evohome_rf), so it re-raises the exception.

What were you doing when the exception was raised?

Question: whenever I change zone temperature in HA, using the standard thermostat card, that zone switches to permanent override. Is there a way to get it to go to temporary override (ideally until next setpoint)?

BTW, Running 0.7.9 smoothly with eavesdropping enabled, nothing untoward in the logs.

What to do when a zone is in (evohome’s) FollowSchedule mode, and the temperature is changed via HA? Well, (obviously) change the setpoint, but also set the zone mode to one of:

  • PermanentOverride (i.e. forever)
  • CountdownOverride for an hour (I am unsure if all systems support this)
  • TemporaryOverride until an hour from now (seems everything supports this)
  • TemporaryOverride until the next scheduled setpoint (you’d need to know the schedule)
  • AdvancedOverride (which is until next setpoint - I have no evidence that all systems support this)

Each offers pros & cons - in particular, not all systems (e.g. non-evohome systems) support all modes…

…and an hour seems a bit arbitrary too…

For now, you can use the service calls to do anything you like - you can use custom cards to leverage those calls.

I have been hesitant to add too many presets to the climate entities (I am fearful of having breaking changes in the future), but I think I will extend them out & we will accept any breaking changes as they come.

  • You can expose the presets nicely with the simple-thermostat card, as described above.