Skip to content

SmartThings integration intermittently fails - with TransferEncodingError / incomplete response payload #158874

@Pau1yMichigan

Description

@Pau1yMichigan

The problem

The SmartThings integration intermittently fails during normal operation, logging errors such as:

RuntimeError: Session is closed
TransferEncodingError: Response payload is not completed

After this occurs, SmartThings entities stop receiving updates until the integration is reloaded. Reloading the integration restores normal operation temporarily.

What version of Home Assistant Core has the issue?

2025.12.3 and previous versions

What was the last working version of Home Assistant Core?

Unknown – issue has been present across multiple recent versions

What type of installation are you running?

Home Assistant OS

Integration causing the issue

SmartThings

Link to integration documentation on our website

https://www.home-assistant.io/integrations/smartthings/

Diagnostics information

SmartThings integration does not provide a “Download diagnostics” option in my setup.

The integration intermittently logs:
pysmartthings subscribe TransferEncodingError: 400
Response payload is not completed

The integration continues to function but loses event subscriptions.
Reloading the SmartThings integration restores functionality temporarily.

I can provide full Home Assistant logs and enable debug logging if requested.

Example YAML snippet

I cannot trigger the HTTP 400 / incomplete payload error on demand.
The issue does not appear to be caused by a specific automation, script, or YAML configuration.

Anything in the logs that might be useful for us?

Excerpt from home-assistant.log:

2025-12-04 04:06:43.252 ERROR (MainThread) [pysmartthings] Connection error occurred while subscribing to events
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client_proto.py", line 144, in connection_lost
    uncompleted = self._parser.feed_eof()
  File "aiohttp/_http_parser.pyx", line 508, in aiohttp._http_parser.HttpParser.feed_eof
aiohttp.http_exceptions.TransferEncodingError: 400, message: Not enough data to satisfy transfer length header.

The above exception was the direct cause of the following exception:
...
aiohttp.client_exceptions.ClientPayloadError: Response payload is not completed:
<TransferEncodingError: 400, message='Not enough data to satisfy transfer length header.'>

I cannot reproduce on demand. It occurs intermittently. In the attached log range, it appears twice (2025-12-04 and 2025-12-08). I use a daily SmartThings reload automation as mitigation.

Additional information

• The SmartThings integration continues to function after the error, but event subscriptions appear to drop and entities stop updating until the integration is reloaded.
• Reloading the SmartThings integration restores normal behavior temporarily.
• Issue occurs intermittently and cannot be triggered on demand.
• I am running Home Assistant OS with Supervisor; no reverse proxy in front of Home Assistant.
• Network connectivity is stable; affected devices remain reachable and responsive.
• DHCP reservations are in place for SmartThings and Harmony Hub devices.
• Daily reload automation is used as a mitigation.

By the way I had AI help me trouble shoot this and we know how that is. most of this info is from ChatGPT from all the troubleshooting i went through on this and i had it log what we were doing. Thanks for any attention on this.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions