-
Notifications
You must be signed in to change notification settings - Fork 7
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
Comments
Hi,
|
Hi there, this is an excerpt of the debug when starting up:
Then it starts again with
|
👍 i investigate... |
Hi, |
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... |
Quick fix to remove error message :
by
This will not fix map problem, but it will remove error message. |
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.
thanks |
@zlymeda did you try the last release ? 1.1.7 |
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. |
Ok i'll take a look a this point during the day |
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)
And last but not least, the code which allows you to decode the map data was written by @talss89 |
@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:
|
OK i've try and i understand the problem... |
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"
} |
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 |
Sorry to spam - one last observation. My vacuum uses LiDAR to map ( Perhaps we could switch processing logic on that |
Hi @talss89 How about this in
Where did you find the information about these formats? Do you have a source ? |
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! |
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:
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
The text was updated successfully, but these errors were encountered: