Skip to content

Read the node info one property at a time - #171

Merged
michaelarnauts merged 1 commit into
masterfrom
node-info-short-response
Oct 20, 2026
Merged

michaelarnauts merged 1 commit into
masterfrom
node-info-short-response

Conversation

@michaelarnauts

@michaelarnauts michaelarnauts commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

On a ComfoConnect Pro, list-nodes crashes on the node of the Pro itself (product 222), seen by two users in discussion #55:

File ".../aiocomfoconnect/comfoconnect.py", line 490, in get_node_info
    return NodeInfo(*await self.get_properties(props, node_id))
File ".../aiocomfoconnect/comfoconnect.py", line 476, in get_properties
    raise ValueError(f"The response is too short for the value of property {prop.property_id}")

get_node_info asked for all properties in one request, and read them one by one when that failed with an RMI error (a node fails it as a whole when it lacks one, like the model of a bridge). The Pro answers the combined request with fewer values than we asked for, so get_properties raised a ValueError, which list-nodes doesn't catch.

get_node_info now simply reads the properties one by one. That works for every node, without depending on how a node answers the combined request; a property the node doesn't have is None, and when none can be read the ComfoConnectRmiError is raised, as before. It's 7 small requests per node instead of 1: list-nodes with a unit and a LAN C still takes under 3 seconds, of which 2 are waiting for the nodes to be announced.

get_properties stays as it was; nothing else in the library uses it.

Home Assistant will read the node info of every node (michaelarnauts/home-assistant-comfoconnect#236), so without this its setup would fail on a Pro.

Testing

  • test_get_node_info reads every property with its own request; test_get_node_info_with_missing_properties and test_get_node_info_of_unknown_node as before.
  • pytest, pylint (10/10) and black pass.
  • list-nodes against a LAN C with a ComfoAir Q450 shows the same info for both nodes as before.
  • Not tested on a Pro; asked for its debug output in ComfoConnect LAN C end of sale. Compatibility with successor ComfoConnect Pro? #55.

🤖 Generated with Claude Code

@michaelarnauts
michaelarnauts force-pushed the node-info-short-response branch from 33dec65 to 6b6b1ad Compare October 20, 2026 11:22
get_node_info asked for all properties in one request, and read them one by
one when that failed with an RMI error, e.g. for a bridge without a model.
A ComfoConnect Pro answers that request for its own node with fewer values
than we asked for, so get_properties raised a ValueError that nobody
caught, and list-nodes crashed on the Pro. Just read the properties one by
one: it works for every node, without guessing how a node answers the
combined request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michaelarnauts
michaelarnauts force-pushed the node-info-short-response branch from 6b6b1ad to d85410c Compare October 20, 2026 11:24
@michaelarnauts michaelarnauts changed the title Read the node info one by one when the response is too short Read the node info one property at a time Oct 20, 2026
@michaelarnauts
michaelarnauts merged commit ef0005a into master Oct 20, 2026
4 checks passed
@michaelarnauts
michaelarnauts deleted the node-info-short-response branch October 20, 2026 12:03
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

Successfully merging this pull request may close these issues.

1 participant