Skip to content

[Bug]: Error doing job: Fatal error: protocol.data_received() call failed. #1510

@andrewjswan

Description

@andrewjswan

What happened?

2025-10-31 18:22:24.860 ERROR (Thread-3) [homeassistant] Error doing job: Fatal error: protocol.data_received() call failed. (None)

Sensor type

Look like XMOSB01XS

Relevant log output

2025-10-31 18:22:24.860 ERROR (Thread-3) [homeassistant] Error doing job: Fatal error: protocol.data_received() call failed. (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/asyncio/selector_events.py", line 1019, in _read_ready__data_received
    self._protocol.data_received(data)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aioblescan/aioblescan.py", line 1855, in data_received
    self.process(packet)
    ~~~~~~~~~~~~^^^^^^^^
  File "/config/custom_components/ble_monitor/__init__.py", line 598, in process_hci_events
    sensor_msg, tracker_msg = self.ble_parser.parse_raw_data(data)
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/config/custom_components/ble_monitor/ble_parser/__init__.py", line 175, in parse_raw_data
    sensor_data, tracker_data = self.parse_advertisement(
                                ~~~~~~~~~~~~~~~~~~~~~~~~^
        mac,
        ^^^^
    ...<5 lines>...
        man_spec_data_list
        ^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/config/custom_components/ble_monitor/ble_parser/__init__.py", line 264, in parse_advertisement
    sensor_data = parse_xiaomi(self, service_data, mac)
  File "/config/custom_components/ble_monitor/ble_parser/xiaomi.py", line 1590, in parse_xiaomi
    result.update(resfunc(dobject))
                  ~~~~~~~^^^^^^^^^
  File "/config/custom_components/ble_monitor/ble_parser/xiaomi.py", line 865, in obj4852
    (duration,) = struct.unpack("<I", xobj)
                  ~~~~~~~~~~~~~^^^^^^^^^^^^
struct.error: unpack requires a buffer of 4 bytes

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions