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

Error MapData #24

Open
OlafKocanda opened this issue Jun 20, 2023 · 18 comments
Open

Error MapData #24

OlafKocanda opened this issue Jun 20, 2023 · 18 comments
Labels
bug Something isn't working

Comments

@OlafKocanda
Copy link

OlafKocanda commented Jun 20, 2023

Device brand

Tesvor

Device model

X500

Smartphone application

WeBack

Component version

1.1.4

HA core version

2023.6.2

Describe the problem

Hi there,

I still get the following error every 5 seconds:

2023-06-20 13:07:30 | 2023-06-20 13:07:30.774 ERROR (Thread-29578 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Error during on_message (map_data) (details='MapData')
2023-06-20 13:07:35 | 2023-06-20 13:07:35.769 ERROR (Thread-29578 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Error during on_message (map_data) (details='MapData')
2023-06-20 13:07:40 | 2023-06-20 13:07:40.779 ERROR (Thread-29578 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Error during on_message (map_data) (details='MapData')
2023-06-20 13:07:45 | 2023-06-20 13:07:45.807 ERROR (Thread-29578 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Error during on_message (map_data) (details='MapData')
2023-06-20 13:07:50 | 2023-06-20 13:07:50.825 ERROR (Thread-29578 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Error during on_message (map_data) (details='MapData')

I have a map in the app but not in HomeAssistant. Why does it say map data then?
Am I missing anything or doing anything wrong?
Thanks for the help!

Home Assistant Logs


Logger: custom_components.weback_vacuum.webackapi
Source: custom_components/weback_vacuum/webackapi.py:607
Integration: WeBack/Tesvor Vacuum (documentation, issues)
First occurred: June 15, 2023 at 1:10:49 PM (81127 occurrences)
Last logged: 1:12:11 PM

WebackApi (WSS) Error during on_message (map_data) (details='MapData')````
@Jezza34000 Jezza34000 added the bug Something isn't working label Jun 20, 2023
@Jezza34000
Copy link
Owner

Hi,
Can you set HA logs in "debug" and give me full Weback log ?

logger:
   default: error
   logs:
     custom_components.weback_vacuum: debug

@OlafKocanda
Copy link
Author

Hi there,

this is an excerpt of the debug when starting up:

2023-06-20 14:26:00.867 INFO (MainThread) [custom_components.weback_vacuum] Creating new Weback Vacuum Robot component
2023-06-20 14:26:00.868 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi __init__
2023-06-20 14:26:00.868 DEBUG (MainThread) [custom_components.weback_vacuum] Weback vacuum robots: login started
2023-06-20 14:26:00.870 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi checking token validity : 2023-06-20 15:19:29.924045
2023-06-20 14:26:00.880 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi token is valid
2023-06-20 14:26:00.880 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi use cached creds.
2023-06-20 14:26:00.880 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi ask : robot list
2023-06-20 14:26:00.880 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] Send HTTP request Url=https://user.grit-cloud.com/prod/api Params={'json': {'opt': 'user_thing_list_get'}, 'headers': {'Token': 'XXX', 'Region': 'eu-central-1'}}
2023-06-20 14:26:06.403 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi : Send HTTP OK, return=200
2023-06-20 14:26:06.404 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi : HTTP data received = {'msg': 'success', 'code': 1, 'data': {'thing_list': [{'is_admin': True, 'create_timestamp': '1657792821569', 'app_name': 'WeBack', 'sub_type': 'ty-x500', 'tag': 1, 'user_account': '[email protected]', 'room_id': '6c1c4e643664444cbd16fb7cdcf080e9', 'is_common': True, 'thing_name': 'ty-x500-ec-fa-bc-9c-c4-66', 'thing_nickname': 'Name of Robot', 'hardware_version': '0.0', 'batch_num': '0', 'mac': 'ec-fa-bc-9c-c4-66', 'firmware_version': '6.0.8', 'thing_status': {'Voicebox_Source': 'null', 'battery_level': 100, 'chassis_hardware_version': '01', 'clean_time': None, 'cliff_detect': 'enable', 'config_app': 'WeBack', 'connected': 'true', 'device_2_app_proto_info': {'direction_ctl': 'user_topic', 'mapdata_info': 'es_yw_2.0', 'mapdata_src': 's3'}, 'device_2_app_proto_version': '1.1', 'error_info': 'NoError', 'fan_status': 'Normal', 'final_edge': 'on', 'firmware_version': '6.0.8.0422s', 'left_water': -1, 'offset_hours': -1, 'offset_minutes': -1, 'optical_flow': 'on', 'point_num': None, 'robot_x': None, 'robot_y': None, 'upgrade_logic': '1.0', 'uv_lamp': 'unsupport', 'vendor_firmware_version': '5122', 'voice_switch': 'on', 'water_level': 'None', 'working_status': 'Hibernating', 'yugong_software_version': '6.0.8'}, 'brand_icon': 'https://www.grit-cfg.com/device/brand/ty-x500.png'}]}}
2023-06-20 14:26:06.414 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi get robot list OK : [{'is_admin': True, 'create_timestamp': '1657792821569', 'app_name': 'WeBack', 'sub_type': 'ty-x500', 'tag': 1, 'user_account': '[email protected]', 'room_id': '6c1c4e643664444cbd16fb7cdcf080e9', 'is_common': True, 'thing_name': 'ty-x500-ec-fa-bc-9c-c4-66', 'thing_nickname': 'Name of Robot', 'hardware_version': '0.0', 'batch_num': '0', 'mac': 'ec-fa-bc-9c-c4-66', 'firmware_version': '6.0.8', 'thing_status': {'Voicebox_Source': 'null', 'battery_level': 100, 'chassis_hardware_version': '01', 'clean_time': None, 'cliff_detect': 'enable', 'config_app': 'WeBack', 'connected': 'true', 'device_2_app_proto_info': {'direction_ctl': 'user_topic', 'mapdata_info': 'es_yw_2.0', 'mapdata_src': 's3'}, 'device_2_app_proto_version': '1.1', 'error_info': 'NoError', 'fan_status': 'Normal', 'final_edge': 'on', 'firmware_version': '6.0.8.0422s', 'left_water': -1, 'offset_hours': -1, 'offset_minutes': -1, 'optical_flow': 'on', 'point_num': None, 'robot_x': None, 'robot_y': None, 'upgrade_logic': '1.0', 'uv_lamp': 'unsupport', 'vendor_firmware_version': '5122', 'voice_switch': 'on', 'water_level': 'None', 'working_status': 'Hibernating', 'yugong_software_version': '6.0.8'}, 'brand_icon': 'https://www.grit-cfg.com/device/brand/ty-x500.png'}]
2023-06-20 14:26:06.415 DEBUG (MainThread) [custom_components.weback_vacuum] Weback vacuum robots: [{'is_admin': True, 'create_timestamp': '1657792821569', 'app_name': 'WeBack', 'sub_type': 'ty-x500', 'tag': 1, 'user_account': '[email protected]', 'room_id': '6c1c4e643664444cbd16fb7cdcf080e9', 'is_common': True, 'thing_name': 'ty-x500-ec-fa-bc-9c-c4-66', 'thing_nickname': 'Name of Robot', 'hardware_version': '0.0', 'batch_num': '0', 'mac': 'ec-fa-bc-9c-c4-66', 'firmware_version': '6.0.8', 'thing_status': {'Voicebox_Source': 'null', 'battery_level': 100, 'chassis_hardware_version': '01', 'clean_time': None, 'cliff_detect': 'enable', 'config_app': 'WeBack', 'connected': 'true', 'device_2_app_proto_info': {'direction_ctl': 'user_topic', 'mapdata_info': 'es_yw_2.0', 'mapdata_src': 's3'}, 'device_2_app_proto_version': '1.1', 'error_info': 'NoError', 'fan_status': 'Normal', 'final_edge': 'on', 'firmware_version': '6.0.8.0422s', 'left_water': -1, 'offset_hours': -1, 'offset_minutes': -1, 'optical_flow': 'on', 'point_num': None, 'robot_x': None, 'robot_y': None, 'upgrade_logic': '1.0', 'uv_lamp': 'unsupport', 'vendor_firmware_version': '5122', 'voice_switch': 'on', 'water_level': 'None', 'working_status': 'Hibernating', 'yugong_software_version': '6.0.8'}, 'brand_icon': 'https://www.grit-cfg.com/device/brand/ty-x500.png'}]
2023-06-20 14:26:06.415 INFO (MainThread) [custom_components.weback_vacuum] Found robot : ty-x500-ec-fa-bc-9c-c4-66, nickname : Name of Robot
2023-06-20 14:26:06.415 DEBUG (MainThread) [custom_components.weback_vacuum.vacdevice] WebackApi RobotController __init__
2023-06-20 14:26:06.416 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi __init__
2023-06-20 14:26:06.416 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi WSS Control __init__
2023-06-20 14:26:06.418 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi checking token validity : 2023-06-20 15:19:29.924045
2023-06-20 14:26:06.418 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi token is valid
2023-06-20 14:26:06.419 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi use cached creds.
2023-06-20 14:26:06.419 DEBUG (MainThread) [custom_components.weback_vacuum] Starting vacuum robot components
2023-06-20 14:26:07.260 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi (WSS): adding a new subscriber
2023-06-20 14:26:07.260 INFO (MainThread) [custom_components.weback_vacuum.vacuum] Vacuum initialized: Name of Robot
2023-06-20 14:26:07.261 DEBUG (MainThread) [custom_components.weback_vacuum.vacuum] Vacuum: available=True
2023-06-20 14:26:07.263 DEBUG (MainThread) [custom_components.weback_vacuum.vacuum] Vacuum: state(from mapping)=idle
2023-06-20 14:26:07.261 DEBUG (MainThread) [custom_components.weback_vacuum.vacuum] Adding Weback Vacuums to Home Assistant: [<entity None=idle>]
2023-06-20 14:26:07.264 INFO (MainThread) [custom_components.weback_vacuum.camera] Vacuum Camera initialized: Name of Robot Map
2023-06-20 14:26:07.264 DEBUG (MainThread) [custom_components.weback_vacuum.camera] Adding Weback Vacuums Maps to Home Assistant: [<entity None=idle>]
2023-06-20 14:26:07.264 DEBUG (MainThread) [custom_components.weback_vacuum.vacdevice] VacDevice: starting state watcher for= ty-x500-ec-fa-bc-9c-c4-66 (ty-x500)
2023-06-20 14:26:07.264 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Start refresh_handler
2023-06-20 14:26:07.265 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Not connected, connecting...
2023-06-20 14:26:07.265 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Checking credentials...
2023-06-20 14:26:07.265 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi checking token validity : 2023-06-20 15:19:29.924045
2023-06-20 14:26:07.265 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi token is valid
2023-06-20 14:26:07.265 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Credentials are OK
2023-06-20 14:26:07.265 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Addr=wss://user.grit-cloud.com/prod/wss / Region=eu-central-1 / Token=XXX
2023-06-20 14:26:07.268 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Thread was init
2023-06-20 14:26:07.273 DEBUG (MainThread) [custom_components.weback_vacuum.vacuum] Vacuum: (vacuum mode) fan_speed_list=['Quiet', 'Normal', 'Strong']
2023-06-20 14:26:07.285 DEBUG (MainThread) [custom_components.weback_vacuum.vacuum] Vacuum: (vacuum mode) fan_speed_list=['Quiet', 'Normal', 'Strong']
2023-06-20 14:26:07.286 DEBUG (MainThread) [custom_components.weback_vacuum.vacuum] Vacuum: available=True
2023-06-20 14:26:07.286 DEBUG (MainThread) [custom_components.weback_vacuum.vacuum] Vacuum: state(from mapping)=idle
2023-06-20 14:26:07.286 DEBUG (MainThread) [custom_components.weback_vacuum.vacuum] Vacuum: battery_icon battery_level=100, charging=False
2023-06-20 14:26:07.286 DEBUG (MainThread) [custom_components.weback_vacuum.vacuum] Vacuum: (vacuum mode) fan_speed=Normal
2023-06-20 14:26:07.563 DEBUG (Thread-3 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) connection established OK
2023-06-20 14:26:07.866 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Refreshing...
2023-06-20 14:26:07.866 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) update_status = ty-x500-ec-fa-bc-9c-c4-66
2023-06-20 14:26:07.867 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Publishing message : {"topic_name": "grit_tech/notify/server_2_device/ty-x500-ec-fa-bc-9c-c4-66", "opt": "sync_thing", "sub_type": "ty-x500", "topic_payload": {"notify_info": "sync_thing", "cmd_timestamp_s": 1687263967}, "thing_name": "ty-x500-ec-fa-bc-9c-c4-66"}
2023-06-20 14:26:07.874 DEBUG (MainThread) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Msg published OK
2023-06-20 14:26:08.429 DEBUG (Thread-3 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Msg received {'notify_info': 'thing_status_update', 'thing_status': {'Voicebox_Source': 'null', 'battery_level': 100, 'chassis_hardware_version': '01', 'clean_time': None, 'cliff_detect': 'enable', 'config_app': 'WeBack', 'connected': 'true', 'device_2_app_proto_info': {'direction_ctl': 'user_topic', 'mapdata_info': 'es_yw_2.0', 'mapdata_src': 's3'}, 'device_2_app_proto_version': '1.1', 'error_info': 'NoError', 'fan_status': 'Normal', 'final_edge': 'on', 'firmware_version': '6.0.8.0422s', 'left_water': -1, 'offset_hours': -1, 'offset_minutes': -1, 'optical_flow': 'on', 'point_num': None, 'robot_x': None, 'robot_y': None, 'upgrade_logic': '1.0', 'uv_lamp': 'unsupport', 'vendor_firmware_version': '5122', 'voice_switch': 'on', 'water_level': 'None', 'working_status': 'Hibernating', 'yugong_software_version': '6.0.8', 'clean_area': 0.0}, 'thing_name': 'ty-x500-ec-fa-bc-9c-c4-66'}
2023-06-20 14:26:08.430 DEBUG (Thread-3 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) adapt for : {'Voicebox_Source': 'null', 'battery_level': 100, 'chassis_hardware_version': '01', 'clean_time': None, 'cliff_detect': 'enable', 'config_app': 'WeBack', 'connected': 'true', 'device_2_app_proto_info': {'direction_ctl': 'user_topic', 'mapdata_info': 'es_yw_2.0', 'mapdata_src': 's3'}, 'device_2_app_proto_version': '1.1', 'error_info': 'NoError', 'fan_status': 'Normal', 'final_edge': 'on', 'firmware_version': '6.0.8.0422s', 'left_water': -1, 'offset_hours': -1, 'offset_minutes': -1, 'optical_flow': 'on', 'point_num': None, 'robot_x': None, 'robot_y': None, 'upgrade_logic': '1.0', 'uv_lamp': 'unsupport', 'vendor_firmware_version': '5122', 'voice_switch': 'on', 'water_level': 'None', 'working_status': 'Hibernating', 'yugong_software_version': '6.0.8', 'clean_area': 0.0}
2023-06-20 14:26:08.431 DEBUG (Thread-3 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) > Set refreshing to 5s
2023-06-20 14:26:08.431 DEBUG (Thread-3 (run_forever)) [custom_components.weback_vacuum.webackapi] New update from cloud ->> push update
2023-06-20 14:26:08.431 DEBUG (Thread-3 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS): Calling subscriber (schedule_update_ha_state)
2023-06-20 14:26:08.450 DEBUG (Thread-3 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Msg received {'notify_info': 'map_data', 'map_data': 'XXX', 'thing_name': 'ty-x500-ec-fa-bc-9c-c4-66'}
2023-06-20 14:26:08.451 DEBUG (Thread-3 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Map data received
2023-06-20 14:26:08.556 ERROR (Thread-3 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Error during on_message (map_data) (details='MapData')
2023-06-20 14:26:08.571 DEBUG (Thread-3 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) adapt for : {'Voicebox_Source': 'null', 'battery_level': 100, 'chassis_hardware_version': '01', 'clean_time': None, 'cliff_detect': 'enable', 'config_app': 'WeBack', 'connected': 'true', 'device_2_app_proto_info': {'direction_ctl': 'user_topic', 'mapdata_info': 'es_yw_2.0', 'mapdata_src': 's3'}, 'device_2_app_proto_version': '1.1', 'error_info': 'NoError', 'fan_status': 'Normal', 'final_edge': 'on', 'firmware_version': '6.0.8.0422s', 'left_water': -1, 'offset_hours': -1, 'offset_minutes': -1, 'optical_flow': 'on', 'point_num': None, 'robot_x': None, 'robot_y': None, 'upgrade_logic': '1.0', 'uv_lamp': 'unsupport', 'vendor_firmware_version': '5122', 'voice_switch': 'on', 'water_level': 'None', 'working_status': 'Hibernating', 'yugong_software_version': '6.0.8', 'clean_area': 0.0}
2023-06-20 14:26:08.571 DEBUG (Thread-3 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) > Set refreshing to 5s
2023-06-20 14:26:08.571 DEBUG (Thread-3 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS): Calling subscriber (schedule_update_ha_state)

Then it starts again with

2023-06-20 14:26:08.872 DEBUG (MainThread) [custom_components.weback_vacuum.vacuum] Vacuum: (vacuum mode) fan_speed_list=['Quiet', 'Normal', 'Strong']
2023-06-20 14:26:08.873 DEBUG (MainThread) [custom_components.weback_vacuum.vacuum] Vacuum: available=True
2023-06-20 14:26:08.873 DEBUG (MainThread) [custom_components.weback_vacuum.vacuum] Vacuum: state(from mapping)=idle
...

@Jezza34000
Copy link
Owner

👍 i investigate...

@Jezza34000
Copy link
Owner

Hi,
I will not fix this BUG. I just learned WeBack has stopped it activity.
I will publish an information soon about this in repo's landing page.

@Jezza34000 Jezza34000 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 21, 2023
@OlafKocanda
Copy link
Author

Did you realize at what point of the code the bug was? Maybe I will then do it individually, as the Error is spamming up logging...

@Jezza34000
Copy link
Owner

Quick fix to remove error message :
In "webackapi.py" file change these lines :

_LOGGER.error(
    "WebackApi (WSS) Error during on_message (map_data) (details=%s)",
    msg_excpt,
)

by

pass

This will not fix map problem, but it will remove error message.

@zlymeda
Copy link

zlymeda commented Feb 12, 2024

Jezza - can you please provide an example message for the map data?

I have a similar issue as Olaf and I would try to fix it, but I need to see the expected map data format.
Mine is a bit different:

{'notify_info': 'map_data', 'map_data': 'eNrt111u2kAUgNG93Ge3wtCI1ltByBrBREHBP7LdEoTYe90AaV+6ghydF8bGZriCT/IlmtTX+zSlqC6xO+bU1mnI82qzWRTAJ7UtFAAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAUAAFAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFAAUQAFAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABTgP0q/AhTgUxdAA1AA/39QAE8BoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAKIApgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAKYAqgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACgAKYAigAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACgAKYACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoACiAKYACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoACmAKoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAoACmAIoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAoACmAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAH8LsC1id8yprfs0vUS1ucRbfWifu6jK5bqI88fiexFN6uvp3OeoVtftbTnkdp+H+9H42b623amN6+OmacipbpZRfSkfh6ZDk+sxqm+3Gxz283XlerFeP/1YLVZRxDilYXp/2/yq6efPfpydL+nT7jVP86b2+W0+U8SvPIyHrr1vM5ZfF3HfWXeK6qlc3la77nhfjcfUPPab/yzi3y8W51Odx7j+BpmS6L4=', 'thing_name': 'concept-3000-...'}"

thanks

@Jezza34000
Copy link
Owner

@zlymeda did you try the last release ? 1.1.7

@zlymeda
Copy link

zlymeda commented Feb 13, 2024

yes, I did. however, my map data has a different shape, eg map_data vs MapData. and map data is a dictionary with 3 fields (like clean_path, clean_area), not base64 string as the code expects.

so, if I can get an example of an expected map data message, I can convert my data to the expected one and support other devices as well.

@Jezza34000
Copy link
Owner

Ok i'll take a look a this point during the day

@Jezza34000 Jezza34000 reopened this Feb 13, 2024
@Jezza34000
Copy link
Owner

Ok @zlymeda so I just took a look at the problem and I must admit that it's complicated for me to find the reason. (I no longer have a WeBack robot)
Could you provide me with the full message you talk about in your previous post?

my map data has a different shape, eg map_data vs MapData. and map data is a dictionary with 3 fields (like clean_path, clean_area), not base64 string as the code expects.

And last but not least, the code which allows you to decode the map data was written by @talss89
Perhaps @talss89 could provide your expertise on this subject if you still have your robot and you are available?

@zlymeda
Copy link

zlymeda commented Feb 13, 2024

@Jezza34000 I posted my message above, if you decode it, you will see the shape of the object.

I mean if anyone (who can see their map correctly rendered) is willing to turn on the DEBUG mode and share their message. example of my log line:

homeassistant  | 2024-02-13 16:27:02.473 DEBUG (Thread-106 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Msg received {'notify_info': 'map_data', 'map_data': 'eNrt2lGOmlAUgOG9nGfaiHZqy1aMITd6m5oRJEDrGOPey1RN+tAFNOXL9+JFRDzBP2q8RpO6ep/GFNU1dsec2jr1eVptNosCmKltoQCgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACAAoAKACgAIACgAIoACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACAAgAKACgAoACgAAoACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAIACgAoAKAAgAL845YT1wEKMN8ClBNXAgowV+8F8DkABVAAUIB5FsD3ABRAAUABFAAUQAFAAeZUAA1AAeZcAP8MQgEUABRAAUAB5lcAVwMK4JdAUAAFAAWY1/tfAVAABQAFUABQAAUABVAAUAAFAAVQAFCA/7cC5oACePeDAigAKIACgALMoQGuAxQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABQAFMABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUABTAFEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUABTAFUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAUABTAEUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAUABTAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFAAUwBRAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFABQAUABAAQAFAAUwBVAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAEABQAUAFAAQAFAAUwBFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAEABAAUAFABQAODvBdgWsTvm1NZdGr9HtbnGW31ov52iKsuyiMtzsVoU0aSuHi9djmp1296XfW73uX9sjR/ta3s6t3F7HjT1OdXNMqoP5XPTeGhyPUT18nI/wmE/PbBcL9ZfVuuvnz9FEcOY+vH3ftOtppue/Hnv9JAu7V7zOJ3VPr9NByniZ+6Hw6l9nGcsPy7icWqn87RDubyvdqfjYzUcU/M84fy+iD9fWVzOdR7i9gvy7Olq', 'thing_name': 'concept-3000-2c-f4-32-5a-7a-fc'}
homeassistant  | 2024-02-13 16:27:02.473 DEBUG (Thread-106 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Map data received
homeassistant  | 2024-02-13 16:27:02.708 ERROR (Thread-106 (run_forever)) [custom_components.weback_vacuum.webackapi] WebackApi (WSS) Error during on_message (map_data) (details='MapData')

@Jezza34000
Copy link
Owner

OK i've try and i understand the problem...
Unfortunately i don't have any expected map data for you
May someone in the community could provide his map data from his robot ?

@talss89
Copy link
Contributor

talss89 commented Feb 13, 2024

Hi @zlymeda,

It does look like your device is using a completely different map format, like you spotted.

I haven't had a chance to take another look into the format, but this is what I can remember:

The format I decoded for the current map implementation is a 2-bit bitmap, whereas yours seems to be a JSON array. The 2-bit bitmap was base64 encoded to a string. IIRC, we then convert this 2-bit image into a scaled full colour image for HA.

The origin, map scale and charger point was set in JSON as coordinates.

The path I believe was a byte stream, which packed the x,y and path type (ie cleaning or moving) into a byte (or perhaps multiple bytes).

Your packet looks very different - the map appears to be blank and there is no path. There's also no mention of an origin, scale or charger point.

I think for this to work, we need to implement some kind of map interface (perhaps that just accepts a final bitmap) - as it looks like your map will need entirely different logic to render an image.

If we convert your map into a 2-bit image, then run it through the existing pipeline, we're still missing origin, charger and scale, plus paths.

Just putting your decoded base64 + zlib string here for convenience:

{
  "map_data": {
    "clean_area": [["...512x512 array of ints - all zeroes"]],
    "clean_path": [
      {
        "x_info": 127,
        "y_info": 128,
        "map_type": 3
      }
    ],
    "map_render_type": "unknown"
  },
  "clean_area_m2": -1,
  "clean_time_s": 4,
  "map_id": "1707759303",
  "start_timestamp": 1707759304,
  "packet_index": 1,
  "version_info": "2.0",
  "map_row": 512,
  "map_col": 512,
  "slam_type": "eslam",
  "map_type": "yw_es"
}

@talss89
Copy link
Contributor

talss89 commented Feb 13, 2024

Here's the original post I wrote when I first looked at this. It contains the data my vacuum was producing.

I can't see the path data I mentioned previously though. Hopefully this is useful?

https://community.home-assistant.io/t/weback-cloud-integration-testers-and-help-required/186155/248

@talss89
Copy link
Contributor

talss89 commented Feb 13, 2024

Sorry to spam - one last observation. My vacuum uses LiDAR to map (yw_ls). Your is using ESLAM (yw_es), aka cameras.

Perhaps we could switch processing logic on that map_type value if we find out that this is in fact the standard ESLAM format?

@Jezza34000
Copy link
Owner

Jezza34000 commented Feb 13, 2024

Hi @talss89

How about this in vacmap.py:

MAP_FORMAT_YW_LASER = "yw_ls"
MAP_FORMAT_YW_VISUAL = "yw_vs"
MAP_FORMAT_GYRO = "gyro"
MAP_FORMAT_YW_ES = "yw_es"
MAP_FORMAT_YW_ES_OLD = "yw_es_old"
MAP_FORMAT_BV_LASER = "bv_ls"
MAP_FORMAT_BV_VISUAL = "bv_vs"

Where did you find the information about these formats? Do you have a source ?
Maybe we could find out more about this...?

@talss89
Copy link
Contributor

talss89 commented Feb 13, 2024

Those constants were obtained from dumping symbols from the Android Weback app APK. So they should be a pretty exhaustive list of what map types to expect.

I completely forgot about those!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants