Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S30 will not setup/initialize #356

Open
garyak opened this issue Jan 29, 2025 · 5 comments
Open

S30 will not setup/initialize #356

garyak opened this issue Jan 29, 2025 · 5 comments

Comments

@garyak
Copy link

garyak commented Jan 29, 2025

Describe the bug
One of two s30's not initializing correctly.
To Reproduce
Steps to reproduce the behavior: restart produces various results.

Expected behavior
Both s30's initialize.
Screenshots/Logs

2025-01-28 17:51:28.514 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 192.168.3.124 for lennoxs30
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/lennoxs30/__init__.py", line 345, in async_setup_entry
    await manager.s30_initialize()
  File "/config/custom_components/lennoxs30/__init__.py", line 548, in s30_initialize
    await self.create_devices()
  File "/config/custom_components/lennoxs30/__init__.py", line 670, in create_devices
    z.register_device()
    ~~~~~~~~~~~~~~~~~^^
  File "/config/custom_components/lennoxs30/device.py", line 281, in register_device
    name=self._system.name + "_" + self._zone.name,
         ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
TypeError: can only concatenate str (not "NoneType") to str
2025-01-28 17:52:36.729 ERROR (MainThread) [custom_components.lennoxs30.climate] climate:async_setup_platform exit - no climate entities found
2025-01-28 17:56:10.397 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client_proto.py", line 263, in data_received
    messages, upgraded, tail = self._parser.feed_data(data)
                               ~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "aiohttp/_http_parser.pyx", line 558, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadHttpMessage: 400, message:
  Transfer-Encoding can't be present with Content-Length:

    b'Transfer-Encoding: chunked'
                        ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client_reqrep.py", line 1059, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/streams.py", line 671, in read
    await self._waiter
aiohttp.http_exceptions.HttpProcessingError: 400, message:
  Transfer-Encoding can't be present with Content-Length:

    b'Transfer-Encoding: chunked'
                        ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/lennoxs30api/s30api_async.py", line 374, in logout
    resp = await self.post(url, headers=headers, data=None)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/lennoxs30api/s30api_async.py", line 488, in post
    resp = await self._session.post(url, headers=headers, data=data, ssl=self.ssl)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 730, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client_reqrep.py", line 1061, in start
    raise ClientResponseError(
    ...<5 lines>...
    ) from exc
aiohttp.client_exceptions.ClientResponseError: 400, message="Transfer-Encoding can't be present with Content-Length:\n\n  b'Transfer-Encoding: chunked'\n                      ^", url='https://192.168.3.124/Endpoints/homeassistant_2/Disconnect'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/lennoxs30/__init__.py", line 488, in async_shutdown
    await self.api.shutdown()
  File "/usr/local/lib/python3.13/site-packages/lennoxs30api/s30api_async.py", line 353, in shutdown
    await self.logout()
  File "/usr/local/lib/python3.13/site-packages/lennoxs30api/s30api_async.py", line 384, in logout
    raise s30e from e
lennoxs30api.s30exception.S30Exception: (S30Exception(...), "logout failed due to client response error [https://192.168.3.124/Endpoints/homeassistant_2/Disconnect] ClientResponseError Error while executing request: [Transfer-Encoding can't be present with Content-Length:\n\n  b'Transfer-Encoding: chunked'\n                      ^]: error=<class 'aiohttp.client_exceptions.ClientResponseError'>, resp.status=[400], resp.request_info=[RequestInfo(url=URL('https://192.168.3.124/Endpoints/homeassistant_2/Disconnect'), method='POST', headers=<CIMultiDictProxy('Host': '192.168.3.124', 'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate, br', 'User-Agent': 'Python/3.13 aiohttp/3.11.11', 'Content-Length': '0', 'Content-Type': 'application/octet-stream')>, real_url=URL('https://192.168.3.124/Endpoints/homeassistant_2/Disconnect'))], resp.headers=[None]")

Version

  • Home Assistant: 2025.1.4
  • This Integration: 2024.11.0

**Integration Configuration **

  • Cloud or Local Connection: Local
  • Inverter or Sensor Diagnostics Enabled: No

Additional context
Power failure in the home today. Also updated HAOS to 14.2. Have rebooted S30 and HA server. Multiple restarts yield different errors.

@BeRoyalKC
Copy link

Similar issue here less the power outage. All devices and entities are unavailable.

@PeteRager
Copy link
Owner

What version of software is on the S30? There was a similar issue with the S40 a while back where the call to Disconnect would cause an error and then the controller would be unresponsive. The solution was to update the integration to never call disconnect on the S40 and to reboot the thermostat. It is possible they've migrated this bug into an S30 firmware update.

What I'd like you to try is rebooting the the S30 (power cycle or from the menu on the panel) and see if it reconnects.

@garyak
Copy link
Author

garyak commented Jan 29, 2025

3.95.0146 dated 11/2024 on the 2nd gen s30. Both s30s have connected after a HA restart. It's typically a startup issue that typically occurs on the older, multi-zone s30. This behavior is new to the 2nd gen version. Errors generated at startup vary.

I should note the errors posted occurred while my backup instance of HA was running. Don't know if that would impact the connections.

@PeteRager
Copy link
Owner

It could. The S40s only allow a single connection at a time, while the S30s did not have this limitation. Both this limitation and the Disconnect issue were released simultaneously on the S40 in summer of 2023. It is possible this is now in the 11/2024 release.

Reload the integration on the S30 with the update. That will cause it to call Disconnect. If that error occurs and subsequent reconnects fail, that will confirm the hypothesis and we can fix the integration - as this will occur everytime you restart HA.

@garyak
Copy link
Author

garyak commented Jan 29, 2025

Integration reload on the s30 did not cause an HA log entry. Subsequent restart was error free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants