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

roborock.vacuum.a15 errors #2265

Open
gieljnssns opened this issue Jan 2, 2025 · 3 comments
Open

roborock.vacuum.a15 errors #2265

gieljnssns opened this issue Jan 2, 2025 · 3 comments

Comments

@gieljnssns
Copy link

Device model / 设备型号

roborock.vacuum.a15

Component version / 插件版本

1.0.7

HA core version / HA版本

2025.1.0b5

Integrated mode / 集成方式

Local (本地模式)

The problem / 问题详情

I have some errors with this model

Entity attributes / 实体属性

info: Claptrap
model: roborock.vacuum.a15
did: 
mac: B0:4A:39:40:3B:25
lan_ip: 192.168.79.60
app_link: 
miot_type: urn:miot-spec-v2:device:vacuum:0000A006:roborock-a15:1
available: true
home_room: 
icon: mdi:information
updater: local
updated_at: 2025-01-02 09:09:09.595106+01:00
vacuum.status: 8
vacuum.mode: 102
filter.filter_life_level: 38
brush_life_level-10-2: 53
brush_cleaner.brush_life_level: -7
battery_level: 100
vacuum.fault: 0
vacuum.water_level: 203
vacuum.mop_mode: 300
state_updater: local
vacuum.status_desc: Charging
props: 
msg_ver: 2
msg_seq: 3681
state: 8
battery: 100
clean_time: 2805
clean_area: 44467500
error_code: 0
map_present: 1
in_cleaning: 0
in_returning: 0
in_fresh_state: 1
lab_status: 3
water_box_status: 0
fan_power: 102
dnd_enabled: 0
map_status: 3
is_locating: 0
lock_status: 0
water_box_mode: 203
water_box_carriage_status: 0
mop_forbidden_enable: 0
adbumper_status:
  - 0
  - 0
  - 0
water_shortage_status: 0
dock_type: 0
dust_collection_status: 0
auto_dust_collection: 1
mop_mode: 300
debug_mode: 0
dock_error_status: 0
unsave_map_reason: 0
unsave_map_flag: 0
main_brush_work_time: 1160846
side_brush_work_time: 337331
filter_work_time: 337331
filter_element_work_time: 0
sensor_dirty_time: 337331
dust_collection_work_times: 0
fan_mode: 102
water_level: 203

clean_area: 44.5
clean_time: 46.8
room_mapping: 
- - 20
  - '439001050952'
  - 20
- - 21
  - '439001050811'
  - 21
- - 22
  - '439001050810'
  - 22
- - 16
  - '439001050813'
  - 16
- - 17
  - '439001050815'
  - 17
- - 18
  - '439001050814'
  - 18
- - 19
  - '439001050812'
  - 19

converters: button.info, sensor.filter.filter_life_level, sensor.brush_cleaner.brush_life_level, sensor.brush_life_level-10-2, sensor.battery_level, sensor.vacuum.status, select.vacuum.water_level, select.vacuum.mop_mode, button.vacuum.start_sweep, button.vacuum.stop_sweeping, button.vacuum.start_mop, button.vacuum.start_sweep_mop, button.battery.start_charge, button.identify.identify, sensor.props:clean_area, sensor.props:clean_time
customizes: 
binary_sensor_properties: mop_status
sensor_properties: vacuum.status
select_properties: water_level,mop_mode
number_properties: volume
button_actions: >-
  start_sweep,stop_sweeping,stop_and_gocharge,start_only_sweep,start_mop,start_sweep_mop,pause_sweeping,continue_sweep,start_dust_arrest,start_mop_wash,start_dry,start_eject,stop_mop_wash,stop_dry,back_mop_wash,start_charge,identify,reset_mop_life,reset_brush_life,reset_filter_life,reset_dust_bag_life
configuration_entities: reset_mop_life,reset_brush_life,reset_filter_life,reset_dust_bag_life
chunk_coordinators:
  - interval: 10
    props: status,cleaning_area,cleaning_time,charging_state
    notify: true
  - interval: 15
    props: mode,sweep_mop_type,sweep_type,clean_times
sensor_attributes: props:clean_area,props:clean_time

device_class: update
friendly_name: Claptrap Info

Home Assistant Logs / 系统日志

This error originated from a custom integration.
Logger: custom_components.xiaomi_miot.core.device.roborock.vacuum.a15
Source: helpers/update_coordinator.py:379
integration: Xiaomi Miot Auto (documentation, issues)
First occurred: January 1, 2025 at 19:58:50 (1 occurrences)
Last logged: January 1, 2025 at 19:58:50

Unexpected error fetching b0:4a:39:40:3b:25-chunk_1 data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 379, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 280, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/device.py", line 513, in _update
    result = await self.update_miot_status(mapping)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/device.py", line 827, in update_miot_status
    results = await self.miio2miot.async_get_miot_props(self.local, mapping)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/miio2miot.py", line 112, in async_get_miot_props
    return await self.hass.async_add_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        partial(self.get_miot_props, *args, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/xiaomi_miot/core/miio2miot.py", line 120, in get_miot_props
    if dic := self.get_miio_props(device):
              ~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/miio2miot.py", line 78, in get_miio_props
    vls = device.send(c['method'], pms)
  File "/usr/local/lib/python3.13/site-packages/miio/device.py", line 107, in send
    return self._protocol.send(
           ~~~~~~~~~~~~~~~~~~~^
        command, parameters, retry_count, extra_parameters=extra_parameters
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/miio/miioprotocol.py", line 202, in send
    self.__id = payload["id"]
                ~~~~~~~^^^^^^
TypeError: byte indices must be integers or slices, not str
This error originated from a custom integration.

Logger: custom_components.xiaomi_miot.core.device.roborock.vacuum.a15
Source: custom_components/xiaomi_miot/core/device.py:868
integration: Xiaomi Miot Auto (documentation, issues)
First occurred: January 1, 2025 at 14:00:41 (8 occurrences)
Last logged: 03:51:50

Got MiioException while fetching the state: Unable to discover the device 192.168.79.60, mapping: {'vacuum.mode': {'siid': 2, 'piid': 4}}, max_properties: 1/1
Got MiioException while fetching the state: Unable to discover the device 192.168.79.60, mapping: {'vacuum.status': {'siid': 2, 'piid': 1}}, max_properties: 1/1
Got MiioException while fetching the state: Unable to discover the device 192.168.79.60, mapping: {'filter.filter_life_level': {'siid': 11, 'piid': 1}, 'brush_life_level-10-2': {'siid': 10, 'piid': 2}, 'brush_cleaner.brush_life_level': {'siid': 9, 'piid': 2}, 'battery_level': {'siid': 3, 'piid': 1}, 'vacuum.fault': {'siid': 2, 'piid': 2}, 'vacuum.water_level': {'siid': 2, 'piid': 102}, 'vacuum.mop_mode': {'siid': 2, 'piid': 103}}, max_properties: 7/7
This error originated from a custom integration.

Logger: custom_components.xiaomi_miot.core.device.roborock.vacuum.a15
Source: helpers/update_coordinator.py:379
integration: Xiaomi Miot Auto (documentation, issues)
First occurred: January 1, 2025 at 12:19:17 (4 occurrences)
Last logged: 08:39:19

Unexpected error fetching b0:4a:39:40:3b:25-miot_status data
Unexpected error fetching b0:4a:39:40:3b:25-chunk_2 data
Unexpected error fetching b0:4a:39:40:3b:25-chunk_1 data
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/miio/protocol.py", line 198, in _decode
    decoded = quirk(decrypted).decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcc in position 178: invalid continuation byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 379, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 280, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/device.py", line 513, in _update
    result = await self.update_miot_status(mapping)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/device.py", line 827, in update_miot_status
    results = await self.miio2miot.async_get_miot_props(self.local, mapping)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/miio2miot.py", line 112, in async_get_miot_props
    return await self.hass.async_add_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        partial(self.get_miot_props, *args, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/xiaomi_miot/core/miio2miot.py", line 120, in get_miot_props
    if dic := self.get_miio_props(device):
              ~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/miio2miot.py", line 78, in get_miio_props
    vls = device.send(c['method'], pms)
  File "/usr/local/lib/python3.13/site-packages/miio/device.py", line 107, in send
    return self._protocol.send(
           ~~~~~~~~~~~~~~~~~~~^
        command, parameters, retry_count, extra_parameters=extra_parameters
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/miio/miioprotocol.py", line 194, in send
    m = Message.parse(data, token=self.token)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 288, in parse
    return self.parse_stream(io.BytesIO(data), **contextkw)
           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 300, in parse_stream
    return self._parsereport(stream, context, "(parsing)")
           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 312, in _parsereport
    obj = self._parse(stream, context, path)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 2120, in _parse
    subobj = sc._parsereport(stream, context, path)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 312, in _parsereport
    obj = self._parse(stream, context, path)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 2653, in _parse
    return self.subcon._parsereport(stream, context, path)
           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 312, in _parsereport
    obj = self._parse(stream, context, path)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 4295, in _parse
    obj = self.subcon._parsereport(stream, context, path)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 312, in _parsereport
    obj = self._parse(stream, context, path)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 4598, in _parse
    obj = self.subcon._parsereport(stream, context, path)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 312, in _parsereport
    obj = self._parse(stream, context, path)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 704, in _parse
    return self._decode(obj, context, path)
           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/miio/protocol.py", line 204, in _decode
    _LOGGER.debug("Unable to parse json '%s': %s", decoded, ex)
                                                   ^^^^^^^
UnboundLocalError: cannot access local variable 'decoded' where it is not associated with a value
@gieljnssns
Copy link
Author

#2256 (comment)

@gieljnssns
Copy link
Author

I have updated to v1.0.8 and i'm still seeing this errors

This error originated from a custom integration.

Logger: custom_components.xiaomi_miot.core.device.roborock.vacuum.a15
Source: custom_components/xiaomi_miot/core/device.py:868
integration: Xiaomi Miot Auto (documentation, issues)
First occurred: January 2, 2025 at 14:25:14 (2 occurrences)
Last logged: January 2, 2025 at 18:13:16

Got MiioException while fetching the state: Unable to discover the device 192.168.79.60, mapping: {'filter.filter_life_level': {'siid': 11, 'piid': 1}, 'brush_life_level-10-2': {'siid': 10, 'piid': 2}, 'brush_cleaner.brush_life_level': {'siid': 9, 'piid': 2}, 'battery_level': {'siid': 3, 'piid': 1}, 'vacuum.status': {'siid': 2, 'piid': 1}, 'vacuum.fault': {'siid': 2, 'piid': 2}, 'vacuum.mode': {'siid': 2, 'piid': 4}, 'vacuum.water_level': {'siid': 2, 'piid': 102}, 'vacuum.mop_mode': {'siid': 2, 'piid': 103}}, max_properties: 9/9
This error originated from a custom integration.

Logger: custom_components.xiaomi_miot.core.device.roborock.vacuum.a15
Source: helpers/update_coordinator.py:379
integration: Xiaomi Miot Auto (documentation, issues)
First occurred: January 2, 2025 at 18:46:36 (2 occurrences)
Last logged: January 2, 2025 at 20:05:37

Unexpected error fetching b0:4a:39:40:3b:25-miot_status data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 643, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2745, in _render_with_context
    return template.render(**kwargs)
           ~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/jinja2/environment.py", line 1295, in render
    self.environment.handle_exception()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/site-packages/jinja2/environment.py", line 942, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 379, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 280, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/device.py", line 513, in _update
    result = await self.update_miot_status(mapping)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/device.py", line 827, in update_miot_status
    results = await self.miio2miot.async_get_miot_props(self.local, mapping)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/miio2miot.py", line 112, in async_get_miot_props
    return await self.hass.async_add_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        partial(self.get_miot_props, *args, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/xiaomi_miot/core/miio2miot.py", line 135, in get_miot_props
    val = tpl.render({
        'value': val,
    ...<5 lines>...
        'description': prop.list_description(val) if prop.value_list else None,
    })
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 611, in render
    ).result()
      ~~~~~~^^
  File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 456, in result
    return self.__get_result()
           ~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 68, in run_callback
    future.set_result(callback(*args))
                      ~~~~~~~~^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 645, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'
This error originated from a custom integration.

Logger: custom_components.xiaomi_miot.core.miio2miot
Source: custom_components/xiaomi_miot/core/miio2miot.py:83
integration: Xiaomi Miot Auto (documentation, issues)
First occurred: January 2, 2025 at 17:07:05 (10 occurrences)
Last logged: 06:38:46

roborock.vacuum.a15: Got MiioException: byte indices must be integers or slices, not str while get_water_box_custom_mode([])
roborock.vacuum.a15: Got MiioException: byte indices must be integers or slices, not str while get_status([])
roborock.vacuum.a15: Got MiioException: cannot access local variable 'decoded' where it is not associated with a value while get_consumable([])
roborock.vacuum.a15: Got MiioException: cannot access local variable 'decoded' where it is not associated with a value while get_status([])
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:1227
First occurred: January 2, 2025 at 18:36:06 (4 occurrences)
Last logged: 06:38:46

Failed to set state for sensor.claptrap_status, fall back to unknown
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1227, in _async_write_ha_state
    hass.states.async_set_internal(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        entity_id,
        ^^^^^^^^^^
    ...<5 lines>...
        time_now,
        ^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2364, in async_set_internal
    state = State(
        entity_id,
    ...<8 lines>...
        timestamp,
    )
  File "/usr/src/homeassistant/homeassistant/core.py", line 1808, in __init__
    validate_state(state)
    ~~~~~~~~~~~~~~^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 237, in validate_state
    raise InvalidStateError(
    ...<2 lines>...
    )
homeassistant.exceptions.InvalidStateError: Invalid state with length 323. State max length is 255 characters.

@Commifreak
Copy link

Commifreak commented Jan 8, 2025

Installed latest version as well and I see this for an c102gl:

Dieser Fehler stammt von einer benutzerdefinierten Integration

Logger: custom_components.xiaomi_miot.core.device.xiaomi.vacuum.c102gl
Quelle: helpers/update_coordinator.py:379
Integration: Xiaomi Miot Auto (Dokumentation, Probleme)
Erstmals aufgetreten: 03:53:11 (7 Vorkommnisse)
Zuletzt protokolliert: 06:23:36

Unexpected error fetching xxxxx-chunk_1 data
Unexpected error fetching xxxxx-miot_status data
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/miio/protocol.py", line 198, in _decode
    decoded = quirk(decrypted).decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xaf in position 0: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 379, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 280, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/device.py", line 513, in _update
    result = await self.update_miot_status(mapping)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/device.py", line 848, in update_miot_status
    res = await self.local.async_get_properties_for_mapping(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
    )
    ^
  File "/config/custom_components/xiaomi_miot/core/device.py", line 1349, in async_get_properties_for_mapping
    return await self.hass.async_add_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<6 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/xiaomi_miot/core/device.py", line 1342, in get_properties_for_mapping
    return self.get_properties(
           ~~~~~~~~~~~~~~~~~~~^
        properties,
        ^^^^^^^^^^^
        property_getter='get_properties',
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        max_properties=max_properties,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/miio/device.py", line 240, in get_properties
    values.extend(self.send(property_getter, _props[:max_properties]))
                  ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/miio/device.py", line 107, in send
    return self._protocol.send(
           ~~~~~~~~~~~~~~~~~~~^
        command, parameters, retry_count, extra_parameters=extra_parameters
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/miio/miioprotocol.py", line 194, in send
    m = Message.parse(data, token=self.token)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 288, in parse
    return self.parse_stream(io.BytesIO(data), **contextkw)
           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 300, in parse_stream
    return self._parsereport(stream, context, "(parsing)")
           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 312, in _parsereport
    obj = self._parse(stream, context, path)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 2120, in _parse
    subobj = sc._parsereport(stream, context, path)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 312, in _parsereport
    obj = self._parse(stream, context, path)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 2653, in _parse
    return self.subcon._parsereport(stream, context, path)
           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 312, in _parsereport
    obj = self._parse(stream, context, path)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 4295, in _parse
    obj = self.subcon._parsereport(stream, context, path)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 312, in _parsereport
    obj = self._parse(stream, context, path)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 4598, in _parse
    obj = self.subcon._parsereport(stream, context, path)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 312, in _parsereport
    obj = self._parse(stream, context, path)
  File "/usr/local/lib/python3.13/site-packages/construct/core.py", line 704, in _parse
    return self._decode(obj, context, path)
           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/miio/protocol.py", line 204, in _decode
    _LOGGER.debug("Unable to parse json '%s': %s", decoded, ex)
                                                   ^^^^^^^
UnboundLocalError: cannot access local variable 'decoded' where it is not associated with a value

as well as:

Dieser Fehler stammt von einer benutzerdefinierten Integration

Logger: custom_components.xiaomi_miot.core.device.xiaomi.vacuum.c102gl
Quelle: helpers/update_coordinator.py:379
Integration: Xiaomi Miot Auto (Dokumentation, Probleme)
Erstmals aufgetreten: 03:15:01 (25 Vorkommnisse)
Zuletzt protokolliert: 06:19:41

Unexpected error fetching xxxxx-chunk_1 data
Unexpected error fetching xxxxx-chunk_2 data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 379, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 280, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/device.py", line 513, in _update
    result = await self.update_miot_status(mapping)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/device.py", line 848, in update_miot_status
    res = await self.local.async_get_properties_for_mapping(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
    )
    ^
  File "/config/custom_components/xiaomi_miot/core/device.py", line 1349, in async_get_properties_for_mapping
    return await self.hass.async_add_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<6 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/xiaomi_miot/core/device.py", line 1342, in get_properties_for_mapping
    return self.get_properties(
           ~~~~~~~~~~~~~~~~~~~^
        properties,
        ^^^^^^^^^^^
        property_getter='get_properties',
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        max_properties=max_properties,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/miio/device.py", line 240, in get_properties
    values.extend(self.send(property_getter, _props[:max_properties]))
                  ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/miio/device.py", line 107, in send
    return self._protocol.send(
           ~~~~~~~~~~~~~~~~~~~^
        command, parameters, retry_count, extra_parameters=extra_parameters
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/miio/miioprotocol.py", line 202, in send
    self.__id = payload["id"]
                ~~~~~~~^^^^^^
TypeError: byte indices must be integers or slices, not str

And this is also being logged:

Dieser Fehler stammt von einer benutzerdefinierten Integration

Logger: custom_components.xiaomi_miot.core.device.xiaomi.vacuum.c102gl
Quelle: custom_components/xiaomi_miot/core/device.py:868
Integration: Xiaomi Miot Auto (Dokumentation, Probleme)
Erstmals aufgetreten: 04:33:41 (6 Vorkommnisse)
Zuletzt protokolliert: 04:34:11

Got MiioException while fetching the state: Unable to discover the device 192.168.178.116, mapping: {'vacuum_extend.cleaning_time': {'siid': 4, 'piid': 2}, 'vacuum_extend.cleaning_area': {'siid': 4, 'piid': 3}, 'battery.charging_state': {'siid': 3, 'piid': 2}, 'vacuum.status': {'siid': 2, 'piid': 1}}, max_properties: 4/4
Got MiioException while fetching the state: Unable to discover the device 192.168.178.116, mapping: {'vacuum.mode': {'siid': 2, 'piid': 3}}, max_properties: 1/1

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

No branches or pull requests

2 participants