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

On large number of Dynamic components, not all are retrived #674

Open
renemoller opened this issue Sep 29, 2024 · 0 comments · May be fixed by #722
Open

On large number of Dynamic components, not all are retrived #674

renemoller opened this issue Sep 29, 2024 · 0 comments · May be fixed by #722

Comments

@renemoller
Copy link

Hi all,

Had an issue on a shelly 3rd gen, where I had added 2 Bluetooth devices and 2 number components for local scripting.
But the number components didn't show up in HomeAssistant.

Found that the method Shelly.GetComponents use paging, but this is not implemented in shelly device initialize in this library.

Example response from Shelly.GetComponents:
{'id': 4, 'src': 'shelly1pmminig3-', 'dst': 'aios-139794151391312', 'result':
{'components': [
{'key': 'bthomedevice:200', 'status': {'id': 200, 'rssi': None, 'battery': None, 'packet_id': None, 'last_updated_ts': 0}, 'config': {'id': 200, 'addr': '
', 'name': 'Window_Bathroom_Up', 'key': None, 'meta': {'ui': {'view': 'regular', 'local_name': 'SBDW-002C', 'icon': None}}}},
{'key': 'bthomedevice:201', 'status': {'id': 201, 'rssi': -33, 'battery': 96, 'packet_id': 48, 'last_updated_ts': 1727518506}, 'config': {'id': 201, 'addr': '', 'name': 'Humidity-bathroom', 'key': None, 'meta': {'ui': {'view': 'regular', 'icon': None}}}},
{'key': 'bthomesensor:200', 'status': {'id': 200, 'value': None, 'last_updated_ts': 0}, 'config': {'id': 200, 'addr': '
', 'name': None, 'obj_id': 1, 'idx': 0, 'meta': None}},
{'key': 'bthomesensor:201', 'status': {'id': 201, 'value': None, 'last_updated_ts': 0}, 'config': {'id': 201, 'addr': '', 'name': None, 'obj_id': 5, 'idx': 0, 'meta': None}},
{'key': 'bthomesensor:202', 'status': {'id': 202, 'value': None, 'last_updated_ts': 0}, 'config': {'id': 202, 'addr': '
', 'name': None, 'obj_id': 45, 'idx': 0, 'meta': None}},
{'key': 'bthomesensor:203', 'status': {'id': 203, 'value': None, 'last_updated_ts': 0}, 'config': {'id': 203, 'addr': '', 'name': None, 'obj_id': 63, 'idx': 0, 'meta': None}},
{'key': 'bthomesensor:204', 'status': {'id': 204, 'value': 96, 'last_updated_ts': 1727518506}, 'config': {'id': 204, 'addr': '
', 'name': None, 'obj_id': 1, 'idx': 0, 'meta': None}},
{'key': 'bthomesensor:205', 'status': {'id': 205, 'value': 20.82, 'last_updated_ts': 1727518506}, 'config': {'id': 205, 'addr': '', 'name': None, 'obj_id': 2, 'idx': 0, 'meta': None}},
{'key': 'bthomesensor:206', 'status': {'id': 206, 'value': 62.41, 'last_updated_ts': 1727518506}, 'config': {'id': 206, 'addr': '
', 'name': None, 'obj_id': 3, 'idx': 0, 'meta': None}},
{'key': 'bthomesensor:207', 'status': {'id': 207, 'value': 2.869, 'last_updated_ts': 1727518378}, 'config': {'id': 207, 'addr': '', 'name': None, 'obj_id': 12, 'idx': 0, 'meta': None}},
{'key': 'bthomesensor:208', 'status': {'id': 208, 'value': True, 'last_updated_ts': 1727518378}, 'config': {'id': 208, 'addr': '
', 'name': None, 'obj_id': 16, 'idx': 0, 'meta': None}}
],
'cfg_rev': 66, 'offset': 0, 'total': 14}
}
Only 11 components are returned, but there is totally 14 components.
The remaining can be retrived with another call to Shelly.GetComponents by setting the offset parameter.

@bieniu bieniu linked a pull request Nov 25, 2024 that will close this issue
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 a pull request may close this issue.

1 participant