Closed Stef-90 closed 2 years ago
Maybe I will add it someday ;)
Looking for this as well, I know that someone already managed to do this: https://github.com/matt8707/hass-config/issues/55
I developed this, have a look if you are interested: https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/pull/246 . 😉
I tried to clone the DEV branch, but I don't know why the map didn't appear, it gave errors in functions that had "vacuum_pos.a"
I tried to clone the DEV branch, but I don't know why the map didn't appear, it gave errors in functions that had "vacuum_pos.a"
Mmmm I see, maybe your robot does not provide the orientation. Try replacing a = None
with a = 0
in xiaomi/map_data_parser.py, line 169
I am aware of this issue, it will be addressed 👍
Or you (@rospogrigio) can do it if you want to
I'm a bit busy at the moment, so feel free to fix it the way you find the most suitable...
I tried to clone the DEV branch, but I don't know why the map didn't appear, it gave errors in functions that had "vacuum_pos.a"
Mmmm I see, maybe your robot does not provide the orientation. Try replacing
a = None
witha = 0
in xiaomi/map_data_parser.py, line 169
I try this, but it didn't work, I have a Viomi, I don't know if it affects. The error:
image_handler.py", line 204, in draw_func a1 = (vacuum_pos.a + 104) / 180 * math.pi TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
Nothing is urgent, I was just testing and trying to help, my knowledge is still at the beginning
Then in viomi/map_data_parser.py, line 323, try replacing return Point(x, y)
with return Point(x, y, 0)
in viomi/map_data_parser.py, line 169
@rospogrigio @axcs It should be fixed on dev
now: https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/commit/410aaaf21e448495cb27eacffaa579b1124885e9
@rospogrigio @axcs It should be fixed on
dev
now: 410aaaf
Only with this new fix in DEV it didn't work again. In addition to your fix, it was necessary to change the line that rospogrigio said in viomi/map_data_parser.py didn't you miss implementing the orientation for viomi vacuum cleaners? I just passed the parameter to 0, but is there no way to get the orientation like xiaomi?
@axcs does current version work? d0b1eb3
Yeh it works, thanks @PiotrMachowski . There is no way to implement rotation for viomi. I have the viomi STYJ02YM In the Mi Home application, the rotation works, the image of the vacuum cleaner rotates to the position it is on. And from the little I understand from the code, is there a way to rotate this for xiaomi devices, can't you replicate it for viomi?
It might be possible, I need to take a look at raw map data
Ok thanks,, I will try to understand the code to try to help in some way. However if you can help with tests just answer that I help. I believe it is not difficult to do something the same way as it was done for the xaiomi files
@axcs it's really easy if data is there. Unfortunately right now I don't have much free time
@axcs I have added this feature to viomi 👍
Added in v2.2.0
Added in v2.2.0
It works just by updating and it's bloody awesome! Thanks a lot.
Since it generates predicted path, I assume, direction of the robot is known property. It would be great visually to have picture of the actual robo instead of colored circle.