core
core copied to clipboard
iAquaLink integration failing after latest Core update
The problem
Up until a core update about a month ago, the iAqualink integration was stable and worked all the time. Since a recent update (I don't know exactly which) it starts up ok and runs for a few minutes and then starts to throw the error below. It will start to work again after a system restart, and will run successfully for a few mins before failing again with the same error. Nothing else has changed on my system, or my network. All other integrations appear to work normally.
Any help would be much appreciated. Home Assistant really is an awesome product.
Thanks,
Ian
What version of Home Assistant Core has the issue?
2023.2.5
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
iAqualink
Link to integration documentation on our website
https://www.home-assistant.io/integrations/iaqualink
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
2023-02-18 17:42:16.121 DEBUG (MainThread) [iaqualink] -> GET https://p-api.iaqualink.net/v1/mobile/session.json?actionID=command&command=get_home&serial=QDS5V6MRVD9V&sessionID=5M0HX8ANGIXNI2XTJ9ME7OKFE9JBOWZL {}
2023-02-18 17:42:16.129 WARNING (MainThread) [homeassistant.components.iaqualink] Failed to refresh system QDS5V6MRVD9V state: <ConnectionTerminated error_code:ErrorCodes.NO_ERROR, last_stream_id:965, additional_data:None>
2023-02-18 17:42:21.128 DEBUG (MainThread) [iaqualink] -> GET https://p-api.iaqualink.net/v1/mobile/session.json?actionID=command&command=set_spa_heater&serial=QDS5V6MRVD9V&sessionID=5M0HX8ANGIXNI2XTJ9ME7OKFE9JBOWZL {}
2023-02-18 17:42:21.141 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547765263312] <ConnectionTerminated error_code:ErrorCodes.NO_ERROR, last_stream_id:965, additional_data:None>
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/h2/connection.py", line 224, in process_input
func, target_state = self._transitions[(self.state, input_)]
KeyError: (<ConnectionState.CLOSED: 3>, <ConnectionInputs.SEND_HEADERS: 0>)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http2.py", line 106, in handle_async_request
await self._send_request_headers(request=request, stream_id=stream_id)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http2.py", line 203, in _send_request_headers
self._h2_state.send_headers(stream_id, headers, end_stream=end_stream)
File "/usr/local/lib/python3.10/site-packages/h2/connection.py", line 766, in send_headers
self.state_machine.process_input(ConnectionInputs.SEND_HEADERS)
File "/usr/local/lib/python3.10/site-packages/h2/connection.py", line 228, in process_input
raise ProtocolError(
h2.exceptions.ProtocolError: Invalid input ConnectionInputs.SEND_HEADERS in state ConnectionState.CLOSED
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
yield
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request
raise exc
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
response = await connection.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 90, in handle_async_request
return await self._connection.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http2.py", line 139, in handle_async_request
raise RemoteProtocolError(self._connection_error_event)
httpcore.RemoteProtocolError: <ConnectionTerminated error_code:ErrorCodes.NO_ERROR, last_stream_id:965, additional_data:None>
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 200, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1787, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1824, 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 680, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 968, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 720, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/iaqualink/__init__.py", line 192, in wrapper
await func(self, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/components/iaqualink/switch.py", line 64, in async_turn_off
await await_or_reraise(self.dev.turn_off())
File "/usr/src/homeassistant/homeassistant/components/iaqualink/utils.py", line 14, in await_or_reraise
await awaitable
File "/usr/local/lib/python3.10/site-packages/iaqualink/systems/iaqua/device.py", line 134, in turn_off
await self._toggle()
File "/usr/local/lib/python3.10/site-packages/iaqualink/systems/iaqua/device.py", line 126, in _toggle
await self.system.set_switch(f"set_{self.name}")
File "/usr/local/lib/python3.10/site-packages/iaqualink/systems/iaqua/system.py", line 165, in set_switch
r = await self._send_session_request(command)
File "/usr/local/lib/python3.10/site-packages/iaqualink/systems/iaqua/system.py", line 72, in _send_session_request
return await self.aqualink.send_request(url)
File "/usr/local/lib/python3.10/site-packages/iaqualink/client.py", line 98, in send_request
r = await self._client.request(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1533, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1620, in send
response = await self._send_handling_auth(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1648, in _send_handling_auth
response = await self._send_handling_redirects(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects
response = await self._send_single_request(request)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1722, in _send_single_request
response = await transport.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 352, in handle_async_request
with map_httpcore_exceptions():
File "/usr/local/lib/python3.10/contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.RemoteProtocolError: <ConnectionTerminated error_code:ErrorCodes.NO_ERROR, last_stream_id:965, additional_data:None>
2023-02-18 17:42:31.122 DEBUG (MainThread) [iaqualink] -> GET https://p-api.iaqualink.net/v1/mobile/session.json?actionID=command&command=get_home&serial=QDS5V6MRVD9V&sessionID=5M0HX8ANGIXNI2XTJ9ME7OKFE9JBOWZL {}
2023-02-18 17:42:31.130 WARNING (MainThread) [homeassistant.components.iaqualink] Failed to refresh system QDS5V6MRVD9V state: <ConnectionTerminated error_code:ErrorCodes.NO_ERROR, last_stream_id:965, additional_data:None>
Additional information
No response
Hey there @flz, mind taking a look at this issue as it has been labeled with an integration (iaqualink
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of iaqualink
can trigger bot actions by commenting:
-
@home-assistant close
Closes the issue. -
@home-assistant rename Awesome new title
Change the title of the issue. -
@home-assistant reopen
Reopen the issue. -
@home-assistant unassign iaqualink
Removes the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
iaqualink documentation iaqualink source (message by IssueLinks)
Just want to +1 this issue. I have been running HA with iAqualik for years and as stated by OP after updates it will not stay connected.
Logger: homeassistant.components.iaqualink Source: components/iaqualink/init.py:151 Integration: Jandy iAqualink (documentation, issues) First occurred: February 17, 2023 at 7:50:36 PM (8868 occurrences) Last logged: 10:35:55 AM
Failed to refresh system QKB3PEVBZS68 state: Failed to refresh system QKB3PEVBZS68 state: <ConnectionTerminated error_code:ErrorCodes.NO_ERROR, last_stream_id:961, additional_data:None>
I was having issues on 2023.2.4 but saw the 2023.2.5 notes mentioning iaqualink so was hopeful that it was fixed but sadly it is not fixed for me. It works on restart but after a while stops working.
Same here…iAquaLink doesn’t even work after restarting the service now after the latest HA update.
There's another thread going on this, as well. First noticed on 2023.2.3 and continues to persist for others on 2023.2.5. Still waiting for a permanent fix.
I was having issues on 2023.2.4 but saw the 2023.2.5 notes mentioning iaqualink so was hopeful that it was fixed but sadly it is not fixed for me. It works on restart but after a while stops working.
There was a fix in 2023.2.4 but the problem remain as the dev missed one of the exceptions and has acknowledged that he needs to fix it. There was no mention of another fix in 2023.2.5.
Same here. Been using HA and iaqualink for 4 years no issues. fingers crossed it gets fixed soon
+1 on this. I am hoping this can be fixed soon; I rely on automations in HA both to monitor status and to control scheduling, and would hate to have to revert to the Jandy web site.
+1 to what everyone else has said. Has been pretty stable up until recently
Same issue. I now have hourly job to refresh device. Just upgraded to 2023.5 and seems to be more stable.
I think this can be closed at this point.
Still an issue with me. Aux devices not working. iaqualink debug.txt
I just installed the latest version of HA Core, and this is now working.