Drayton Wiser Home Assistant Integration

Actually, thinking about it more, and given you are getting a ‘Connection reset by peer’ error I think what is happening is that the api is querying the hub (and the hub is on the network) but for some reason the hub is closing the conneciton before it gets all the hub data. In this case, the api is only providing a partial set of devices and that is why they go unavailable.

Do you have any complex networking setup ie routers/subnets/firewalls etc between the hub and the HA server? If so, I would look at these to see if some issue. If not, I would start by repowering your hub to give it a clean boot and beyond that, do look at response times from your hub in postman. They should be sub 150ms for the domain endpoint.

I have a pretty straightforward network (well, I think so!) - main plusnet router, TPlink Deco M5 mesh running in AP mode hanging off this, devices all connect to this mesh, so nothing in between the hub and HA. Been like this for 2-3 years… After seeing Duke-box talking about disabling ping and upping the scan interval, I removed my ping sensor for the hub this morning (was set at count 5 interval 160), and my integration scan interval is already at 60 (I set this a long time ago), but I am still getting errors. I power-cycled the hub yesterday… Since the reboot of HA earlier I have had these errors, the first 09:27 timeout “just happened”, then the big one timed 09:37 is in response to me pressing the “boost hot water” button. It spat this out, and did not turn the water on. Pressing it again worked.

When you said “send me a diagnostics file”, what exactly do you mean?

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/wiser/button.py:120
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 09:37:29 (1 occurrences)
Last logged: 09:37:29

[546936916096] [Errno 104] Connection reset by peer
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1808, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1845, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 686, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 961, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 726, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/button/__init__.py", line 116, in _async_press_action
    await self.async_press()
  File "/config/custom_components/wiser/button.py", line 120, in async_press
    await self._data.wiserhub.hotwater.boost(boost_time)
  File "/usr/local/lib/python3.10/site-packages/aioWiserHeatAPI/hot_water.py", line 165, in boost
    return await self.override_state_for_duration(TEXT_ON, duration)
  File "/usr/local/lib/python3.10/site-packages/aioWiserHeatAPI/hot_water.py", line 220, in override_state_for_duration
    return await self._send_command(
  File "/usr/local/lib/python3.10/site-packages/aioWiserHeatAPI/hot_water.py", line 43, in _send_command
    result = await self._wiser_rest_controller._send_command(
  File "/usr/local/lib/python3.10/site-packages/aioWiserHeatAPI/rest_controller.py", line 192, in _send_command
    return await self._do_hub_action(method, url, command_data)
  File "/usr/local/lib/python3.10/site-packages/aioWiserHeatAPI/rest_controller.py", line 102, in _do_hub_action
    await getattr(self._session, action.value)(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 899, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
  File "/usr/local/lib/python3.10/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
aiohttp.client_exceptions.ClientOSError: [Errno 104] Connection reset by peer



Logger: custom_components.wiser.coordinator
Source: custom_components/wiser/coordinator.py:147
Integration: Drayton Wiser Integration for Home Assistant (documentation, issues)
First occurred: 09:27:06 (1 occurrences)
Last logged: 09:27:06

Connection timeout trying to communicate with Wiser Hub 192.168.1.129 for url http://192.168.1.129:80/data/v2/domain/

On devices & services page, 3 dots on wiser integration, download diagnostics. Fyi it’s anonomised for any sensitive info but PM it to me.

Hi All,

Just switched our heating to Wiser and integrated with HA. Great to see such an active community around the integration and especially the engagement with the Schneider guys, fantastic!

There are a couple of things I can’t work out; hopefully someone can point me in the right direction…
(1) How can I test the current state of a zone and work out when it last changed? I use this to decide whether or not to heat the towel rails electrically. When I add a zone (e.g. sensor.wiser_heating) to an automation, the only options offered for the ‘from’ and ‘to’ state values are ‘unknown’ and ‘unavailable’. I was expecting to find ‘on’ and ‘off’ there too!
(2) My fire alarm triggers some logic that turns things off; one of those things previously was the boiler. How can I tell the Wiser hub to switch off everything? I don’t mind if it needs a command per zone, that’s fine, but all I can see on the actions list is to switch modes, no ‘off’.

Thanks!

@jefft4 welcome to the Wiser HA integration!

In answer to your questions.

  1. When you talk about a zone, do you mean a room in Wiser nomanclature? If so, you need to be using the zone(room) device ie. Wiser Lounge. Within the automations you will then see a starts/stops heating trigger available. The sensor.wiser_heating is a sensor to show if the boiler is firing (not whether an individual zone is calling for heat). In HA, the drop downs will only show unknown/unavailable (this is a HA function I believe) but you can just type on or off.

  2. You have a couple of options here. 1, for each zone, set the hvac mode to off. 2, you can enable Away mode and set the away mode temp to 5C. This way, unless it is very cold, unlikely the heating will activate.

To set each HVAC mode to off use something like this in the automation action:

entity_id: climate.wiser_lounge
type: set_hvac_mode
hvac_mode: "off"

Out of desperation today I have moved the hub off the mesh back on to the main router and despite it having been on the mesh for the past couple of years or more, and the main router signal now being reported by the hub as poor 36% (which was one of the main drivers for getting the mesh in the first place), it seems to be working fine, no errors at all yet… So I am now tending towards thinking the last hub firmware update (3.12.1) has done something which is making the behaviour on the mesh much worse for me, but I have no idea why. There are dozens of devices on this mesh network - multiple Alexa’s, smart plugs, cameras, esp8266 devices running esphome and tasmota, TV, firestick, laptops, phones etc., nothing else is showing any problems. It’s bizarre.

My hub was originally connected to a Mesh network but the Hub was reconfigured a few months back at the request of Schneider support because of the wifi issues.
My Router is configured with a dedicated SSID for the Wiser hub and has a wifi repeater connected to this. The repeater is within 3 feet of the hub and the hub is connected to the repeater. Nothing else is connected to that SSID or repeater.
HA is connected directly to the Router via Gb ethernet LAN.
According to the Hub/Integration, the signal is Very Good with 100% wifi strength as below. The image also shows some disconnects. The disconnect times are roughly the polling time of the integration.

Here is the wiser cloud sensor showing the same disconnects.

image

Although I believe they are not wifi disconnects but API failures as Mark says.
My use of Postman shows sub 100ms responses when I get a response but I usually experience no response at all. I must be doing something wrong. From your image Mark, it looks like you might have a payload in the body which I don’t.

Since I stopped trying to communicate with the hub with Postman, I have no more errors in the log and since these disconnects are for such a short period I am inclined to just live with it.

Mark, I can PM you my diags file if you want.

That should not be the case. Do you get a timeout in postman when you get no response or are you getting an empty response?

Feel free to PM some screenshots to show this more

Feel free to PM me a diagnostics. It did show network related issues (from the hubs perspective) for @blunderingabout and probably reenforces that these hubs do not like mesh wifi. However, as you say, yours is not mesh connected.

This is the screenshot from postman when I get a response

And this is one when I don’t.

And whilst I was merrily clicking on send in postman, this popped into the log in HA

image

I’ll get the diags and PM it to you

Thanks
Mike

1 Like

Ok lets start with getting postman configured properly.

You need to set you headers correctly.

You should have a header of SECRET with your secret key as the value and a Content-Type of application/json

1 Like

Thanks Mark,

Configured correctly now. I’ve PM’d some screenshots to you.

Thanks for your help

Here is my cloud sensor, you can see how it is solid connected for the past 4 hours since I switched the hub to the main router wifi from the mesh. And NOTHING in the logs. It is definitely happier.
wiser cloud 2

Thanks Mark!

My ‘zone’ = CH zone / Hub channel, rather than Wiser room. Sounds like wiser_heating would do the job well enough - either that or I’ll have to ‘or’ all 5 rooms in the CH zone that matters. I was wary of typing in state values that it didn’t offer; good to know that’s okay!

The ‘zone’ in your second answer example is the Wiser room, right? So I need to poke all the rooms to get the system to be off. I feel my first loop in a script coming on :wink: Presumably there’s an equivalent for the hot water that I’ll need to use too?

J.

@jamiebennett British Summer Time not working???

Today I discovered that BST is not working on my hub. In order to get the correct time showing on System Settings I had to change my timezone to “+01:00 Central European Time”.

Is this correct or do I have a problem with my hub?

I have the same problem with the hub not switching to BST. I appreciate its not a HA problem, but was just starting here before heading to the Drayton Wiser help pages.

Have you got daylight saving enabled?

I’ve had the same behavior yesterday in France.
My shutters close one hour too early, when I move the "daylight saving " to disabled, they open until the right time.
This morning they stayed closed … before I enable again the “daylight saving”.

@jamiebennett
This behavior has nothing to see with the integration, but I think there is something wrong in the hub firmware. It 's the same with a hub first generation and a hub second generation.

Where in the Wiser app do you enable daylight savings?

Never mind - found it in HA settings (so its not exposed in Wiser app).

@LOGO44 and @dabb1er

You should check what you have for these settings on your Wiser Hub. The Timezone can be checked via “Settings” → “System Setings”.

“TimeZoneOffset”: 0
“AutomaticDaylightSaving”: true

If you see a time from your hub that is different to what you expect it’s probably one or both that are incorrect. These values do not change on the switch from winter to summer time.

You can also look at the UnixTime field which is always UTC. The value below is 09:07 UTC or 10:07 BST or 11:07 CEST on 27th March 2023. It can be verified at https://www.epochconverter.com/

“UnixTime”: 1679908020

I’m not convinced that “AutomaticDaylightSavings” should be exposed for update via the HA app. The option is not an indicator of summer time in operation but rather that the time presented by the hub should take allowance of DST. Hence there should be no requirement to modify.