Skip to content

Commit

Permalink
Additional debug information
Browse files Browse the repository at this point in the history
  • Loading branch information
ohshazbot committed Aug 2, 2024
1 parent 923738b commit 40e246e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions BAC0/core/devices/mixins/read_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ def read_objects_list(self, custom_object_list=None) -> t.List:
self.properties.address, self.properties.device_id
),
vendor_id=self.properties.vendor_id,
# list can be large (read: segmented), so give this more time
timeout=30
)

except NoResponseFromController:
Expand Down Expand Up @@ -313,8 +315,8 @@ def _find_propid_index(key):

if len(point_infos) < response_size:
self._log.warning(
"There has been a problem defining {} points. It is sometimes due to busy network. Please retry the device creation".format(
obj_type
"There has been a problem defining {} points for {}-{}. It is sometimes due to busy network. Please retry the device creation. Expected {}, got {}".format(
obj_type, point_type, point_address, prop_list, point_infos
)
)
break
Expand Down Expand Up @@ -459,8 +461,8 @@ def read_multiple(
device.read_multiple(['point1', 'point2', 'point3'], points_per_request = 10)
"""
if not self.properties.pss["readPropertyMultiple"] or force_single:
self._log.warning("Read property Multiple Not supported")
if not self.properties.pss['readPropertyMultiple'] or force_single:
self._log.warning(f"Read property Multiple Not supported for {self.properties.device_id if hasattr(self.properties, 'device_id') else self.properties.device.properties.device_id}")
self.read_single(
points_list, points_per_request=1, discover_request=discover_request
)
Expand Down

0 comments on commit 40e246e

Please sign in to comment.