Drayton Wiser Home Assistant Integration

Thanks both! Not ideal news, but I really appreciate you taking the time to confirm that for me. Saves me a heap of time digging into it! :slight_smile:

@msp1974 just updated to HA 2023.10.2 and the integration wont start

Logger: homeassistant.config_entries
Source: config_entries.py:441
First occurred: 10:09:58 (3 occurrences)
Last logged: 10:23:55

Config entry 'WiserHeat' for wiser integration not ready yet: None; Retrying in background
This error originated from a custom integration.

Logger: custom_components.wiser.coordinator
Source: custom_components/wiser/coordinator.py:153
Integration: Drayton Wiser Integration for Home Assistant (documentation, issues)
First occurred: 10:09:58 (18 occurrences)
Last logged: 10:24:11

Response error trying to communicate with Wiser Hub 192.168.3.8 for url http://192.168.3.8:80/data/v2/status/. Error is 400, message="Data after `Connection: close`:\n\n b'0'\n ^", url=URL('http://192.168.3.8:80/data/v2/status/')
Response error trying to communicate with Wiser Hub 192.168.3.8 for url http://192.168.3.8:80/data/v2/domain/. Error is 400, message="Data after `Connection: close`:\n\n b'0'\n ^", url=URL('http://192.168.3.8:80/data/v2/domain/')
Response error trying to communicate with Wiser Hub 192.168.3.8 for url http://192.168.3.8:80/data/v2/schedules/. Error is 400, message="Data after `Connection: close`:\n\n b'0'\n ^", url=URL('http://192.168.3.8:80/data/v2/schedules/')
Response error trying to communicate with Wiser Hub 192.168.3.8 for url http://192.168.3.8:80/data/v2/network/. Error is 400, message="Data after `Connection: close`:\n\n b'0'\n ^", url=URL('http://192.168.3.8:80/data/v2/network/')

any ideas ?

I’m not seeing that issue after updating to 2023.10.2 last night.

It looks like the integration is making contact with the Hub (or something at that IP address) but isn’t getting a response it expects.

hmm, hub responding ok as I’m getting the {"Error":"Unauthorized"} if i try in web page

I am having the same issue after updating to 2022.10.2. My hub status monitor is showing regular loss of reponse from the hub.

This error originated from a custom integration.

Logger: custom_components.wiser.coordinator
Source: custom_components/wiser/coordinator.py:153
Integration: Drayton Wiser Integration for Home Assistant (documentation, issues)
First occurred: 12 October 2023 at 23:38:25 (344 occurrences)
Last logged: 10:37:28

Response error trying to communicate with Wiser Hub 192.168.0.111 for url http://192.168.0.111:80/data/v2/schedules/. Error is 400, message="Data after `Connection: close`:\n\n b'0'\n ^", url=URL('http://192.168.0.111:80/data/v2/schedules/')
Response error trying to communicate with Wiser Hub 192.168.0.111 for url http://192.168.0.111:80/data/v2/domain/Room/1. Error is 400, message="Data after `Connection: close`:\n\n b'0'\n ^", url=URL('http://192.168.0.111:80/data/v2/domain/Room/1')
Response error trying to communicate with Wiser Hub 192.168.0.111 for url http://192.168.0.111:80/data/v2/domain/Room/6. Error is 400, message="Data after `Connection: close`:\n\n b'0'\n ^", url=URL('http://192.168.0.111:80/data/v2/domain/Room/6')
Response error trying to communicate with Wiser Hub 192.168.0.111 for url http://192.168.0.111:80/data/v2/status/. Error is 400, message="Data after `Connection: close`:\n\n b'0'\n ^", url=URL('http://192.168.0.111:80/data/v2/status/')
Response error trying to communicate with Wiser Hub 192.168.0.111 for url http://192.168.0.111:80/data/v2/network/. Error is 400, message="Data after `Connection: close`:\n\n b'0'\n ^", url=URL('http://192.168.0.111:80/data/v2/network/')

Seeing same issue after updating

and the app is reporting OpenTherm issue


but my OpenTherm Gateway is reporting no such issue.

Its been doing that since the last app update a week ago. Drayton are looking into that one. This one started this morning following the HA Update.

ok good to know thanks.

would you mind sharing that sensor code.

Ok. Looking at the change logs, seems aiohttp was updated. Not sure why this was done in a minor release. Will have to look at this tonight.

2 Likes

thanks, i’ll revert back for now then

Mine seems to of reconnected but worth checking out.

Looking at the HA github issues, seems to be a number of issues relating to the upgrade of aiohttp to 3.8.6. It looks like the plan is to revert it to 3.8.5, probably in HA 2023.10.3.

This is likely also the cause of these issues and i suspect we will have to wait for the 2023.10.3 release to fix it as we do not control the version of aiohttp.

Would recommend not to upgrade HA to 2023.10.2 if you havent already.

2 Likes

I see two solutions

  1. Downgrade
  2. Depending on how you have installed home assistant we might be able to downgrade aiohttp manually. That said I dont know if that would break anything…
pip install --force-reinstall aiohttp==3.8.5

I run HA in a container so i could exec into the container then forceably install the old aiohttp… again not tested but i can try tonight

From looking at the recent PR, they are just downgrading aiohttp without any other changes so i think its ok

1 Like

reverted to HA 2023.10.1, and all working again, i’ll stay in this till it reveted in HA git.

But, WHY did they update this in a minor update, seems to me a stupid thing to do without testing.

It’s a template binary sensor. YAML posted here.

I use it in a lot of automations to make sure the hub is talking to HA. You can also create a ping sensor, as it is complimentary to this and reflects a slightly different scenario i.e. disconnected from the router, rather than just a communication problem.

To use it in an automation, simply put this as your first action (the second sensor is ping sensor):

# Check Wiser Hub is not offline and wait for it to come back online if it is
- wait_template: "{{ is_state('binary_sensor.wiser_hub_status', 'off') and is_state('binary_sensor.wiser_hub', 'on') }}"
1 Like

2023.10.3 has just been released.

2 Likes

installing now to test, thanks.

UPDATE:

yup, all working again.

thats, given me an idea, i could create a sensor that looks at the ARP table from my router and flags when the connection drops.