Closed carefulcomputer closed 8 months ago
@carefulcomputer if you use Valetudo you need to specify the topic in your card configuration an example is in this:
internal_variables:
topic: valetudo/your_topic
this should solve the problem you are facing right now.. that by the way is under work, there is a PR for that. you might have interest also on this https://github.com/sca075/valetudo_vacuum_camera if you want to experience cloud free.
thank you will give it a try. and thanks again for pointing out valetudo camera. I am using that right now and it is awesome. Do not need additional docker or any other cloud.
unfortunately.. it didn't work. i tried both with a trailing slash and without but nothing happened. i don't see any error. there is no error generated in browser console and there is no rest call made.
@carefulcomputer if you go on the main page of Valetudo Vacuum Camera (and please start the project if you like it) on the read me there is the full explanation of how to put the lines I show you. Be careful that actually you use the correct topic the one it was up was just an example.. basically in the camera attributes the same topic must be in the card.
Thanks for trying again.
I just starred the repo. :) i double checked the topic and looks okey. still it did not work. Here is my card config.. What else can I do to debug the issue ?
type: custom:xiaomi-vacuum-map-card
map_source:
camera: camera.rosievaccumrobot_camera
calibration_source:
camera: true
entity: vacuum.valetudo_rosietherobot
vacuum_platform: Hypfer/Valetudo
two_finger_pan: true
map_locked: true
internal_variables:
topic: homeassistant/myVaccumRobot
map_modes:
- template: vacuum_clean_segment
predefined_selections:
- id: '2'
icon:
name: mdi:broom
x: 3142
'y': 3520
label:
text: Family Room
x: 3142
'y': 3520
offset_y: 35
outline:
- - 2990
- 3345
- - 3295
- 3345
- - 3295
- 3695
- - 2990
- 3695
- id: '3'
icon:
name: mdi:broom
x: 3010
'y': 3310
label:
text: Lobby
x: 3010
'y': 3310
offset_y: 35
outline:
- - 2695
- 2990
- - 3325
- 2990
- - 3325
- 3430
- - 2695
- 3430
- id: '4'
icon:
name: mdi:broom
x: 2487
'y': 3222
label:
text: Kitchen
x: 2487
'y': 3222
offset_y: 35
outline:
- - 2350
- 3095
- - 2625
- 3095
- - 2625
- 3350
- - 2350
- 3350
- id: '5'
icon:
name: mdi:broom
x: 2530
'y': 3525
label:
text: Dining Room
x: 2530
'y': 3525
offset_y: 35
outline:
- - 2370
- 3355
- - 2690
- 3355
- - 2690
- 3695
- - 2370
- 3695
- id: '7'
icon:
name: mdi:broom
x: 2545
'y': 2927
label:
text: Kitchen Extension
x: 2545
'y': 2927
offset_y: 35
outline:
- - 2375
- 2765
- - 2715
- 2765
- - 2715
- 3090
- - 2375
- 3090
- template: vacuum_clean_zone
- template: vacuum_goto
Try this config:
type: custom:xiaomi-vacuum-map-card
map_source:
camera: camera.rosievaccumrobot_camera
calibration_source:
camera: true
entity: vacuum.valetudo_rosietherobot
vacuum_platform: Hypfer/Valetudo
two_finger_pan: true
map_locked: true
internal_variables:
topic: homeassistant/myVaccumRobot
map_modes:
- template: vacuum_clean_segment
id_type: number
predefined_selections:
- id: '2'
icon:
name: mdi:broom
x: 3142
'y': 3520
label:
text: Family Room
x: 3142
'y': 3520
offset_y: 35
outline:
- - 2990
- 3345
- - 3295
- 3345
- - 3295
- 3695
- - 2990
- 3695
- id: '3'
icon:
name: mdi:broom
x: 3010
'y': 3310
label:
text: Lobby
x: 3010
'y': 3310
offset_y: 35
outline:
- - 2695
- 2990
- - 3325
- 2990
- - 3325
- 3430
- - 2695
- 3430
- id: '4'
icon:
name: mdi:broom
x: 2487
'y': 3222
label:
text: Kitchen
x: 2487
'y': 3222
offset_y: 35
outline:
- - 2350
- 3095
- - 2625
- 3095
- - 2625
- 3350
- - 2350
- 3350
- id: '5'
icon:
name: mdi:broom
x: 2530
'y': 3525
label:
text: Dining Room
x: 2530
'y': 3525
offset_y: 35
outline:
- - 2370
- 3355
- - 2690
- 3355
- - 2690
- 3695
- - 2370
- 3695
- id: '7'
icon:
name: mdi:broom
x: 2545
'y': 2927
label:
text: Kitchen Extension
x: 2545
'y': 2927
offset_y: 35
outline:
- - 2375
- 2765
- - 2715
- 2765
- - 2715
- 3090
- - 2375
- 3090
- template: vacuum_clean_zone
- template: vacuum_goto
type: custom:xiaomi-vacuum-map-card
map_source:
camera: camera.rosievaccumrobot_camera
calibration_source:
camera: true
entity: vacuum.valetudo_rosietherobot
vacuum_platform: Hypfer/Valetudo
two_finger_pan: true
map_locked: true
internal_variables:
topic: valetudo/RosieTheRobot <=== check in the topic of the camera attributes and replace this.
map_modes:
- template: vacuum_clean_segment
predefined_selections:
- id: '2'
icon:
name: mdi:broom
x: 3142
'y': 3520
label:
text: Family Room
x: 3142
'y': 3520
offset_y: 35
outline:
- - 2990
- 3345
- - 3295
- 3345
- - 3295
- 3695
- - 2990
- 3695
- id: '3'
icon:
name: mdi:broom
x: 3010
'y': 3310
label:
text: Lobby
x: 3010
'y': 3310
offset_y: 35
outline:
- - 2695
- 2990
- - 3325
- 2990
- - 3325
- 3430
- - 2695
- 3430
- id: '4'
icon:
name: mdi:broom
x: 2487
'y': 3222
label:
text: Kitchen
x: 2487
'y': 3222
offset_y: 35
outline:
- - 2350
- 3095
- - 2625
- 3095
- - 2625
- 3350
- - 2350
- 3350
- id: '5'
icon:
name: mdi:broom
x: 2530
'y': 3525
label:
text: Dining Room
x: 2530
'y': 3525
offset_y: 35
outline:
- - 2370
- 3355
- - 2690
- 3355
- - 2690
- 3695
- - 2370
- 3695
- id: '7'
icon:
name: mdi:broom
x: 2545
'y': 2927
label:
text: Kitchen Extension
x: 2545
'y': 2927
offset_y: 35
outline:
- - 2375
- 2765
- - 2715
- 2765
- - 2715
- 3090
- - 2375
- 3090
- template: vacuum_clean_zone
- template: vacuum_goto
@carefulcomputer I'm not sure if your topic is what I input above but please check it and save it correctly "myVaccumRobot" is sample name in the camera attributes: vacuum_topic: valetudo/ModelS5 (this is my vacuum, on Developers Tools States, search "camera" and you should see camera.rosievaccumrobot_camera on the attributes you simply copy what come after vacuum_topic and replace it where is the arrow above.
hope this more clear ;) thanks once again.
@PiotrMachowski you can move this to discussion's as per it isn't a bug.. would advise we chat about the possibility to update the card as you can see this modification looks to be required ;)
i did more debugging and found that card uses the valetudo segment ids. if the id changes due to map edit (in my case map was slightly edited which changed the segment ids and this card stopped working), the card won't work since it send the old ids. Ideally there would be some checks in this card to make sure that valetudo sensor has same ids as encoded in card, and it will show a message to regenerate the card.
i did more debugging and found that card uses the valetudo segment ids. if the id changes due to map edit (in my case map was slightly edited which changed the segment ids and this card stopped working), the card won't work since it send the old ids. Ideally there would be some checks in this card to make sure that valetudo sensor has same ids as encoded in card, and it will show a message to regenerate the card.
@carefulcomputer The camera was structured to work 100% with this card. I would advise you to follow the following steps: 1) delete the old card/create a new card (start from scratch). 2) select vacuum entity, Hypfer firmware, camera. 3) edit the card (show code editor) and put there the internal variables and topic as we suggested earlier. 4) test that the vacuum move to the destination (point that you select on the map) there should be a flag and then the predicted path and the vacuum should move to the point you select. If you get this working as it should be (else I can prepare a video to show you how to do it) then.. 5) create the segments by the function in the card "generate rooms config".
At this point everything should work as it is working, for instance.. and I can ensure you, for quite a lot of users.
If you are using the old coordinates of the vacuum before it was converted to Valetudo it can't work as you wrote, Valetudo is using a different method to assign the coordinates to the vacuum this why the camera is providing the segments Valetudo coordinates to the card along with the calibration points. If this isn't working please open an issue or discussion on the camera GitHub page, will do my best to support you and let it work.
Apologies. I was not clear in my previous post. I was able to make it work after changing the ids. The issue I was pointing out that ID's are not automatically picked up from the sensor. So if a user creates the card, then makes edit to map in valetudo, making ids change in valetudo (home assistant gets new values in sensor). However card is still using the old ids, and hence when it sends the command, valetudo will not recognize the old id and will ignore it.
BTW, I really appreciate you spending time to help debug the issue and provide suggestion.
The problem is that room outlines most probably change as well, which breaks the map controls anyway and there's no easy way to adjust it
Not sure if valetudo itself publishes the segments and name , if yes can we use that ? If not, please close out this issue.
Not sure if valetudo itself publishes the segments and name , if yes can we use that ? If not, please close out this issue.
Valetudo publish the segments names but when you do change them on the vacuum you need to manually update the card (generate a new card). It's normally a simple process that hopefully works also in your case. The camera will update the segments once it reboots / reloads, then on a new card you can "generate the rooms configuration" and new ID's you configured in the vacuum will be used.
Valetudo publish the segments names but when you do change them on the vacuum you need to manually update the card (generate a new card).
My question is, can we somehow do it automatically ? that will lead to less breakage. If not that is fine, maybe we can make it more explicit in documentation that any changes in map may make the controls unresponsive.
Valetudo publish the segments names but when you do change them on the vacuum you need to manually update the card (generate a new card).
My question is, can we somehow do it automatically ? that will lead to less breakage. If not that is fine, maybe we can make it more explicit in documentation that any changes in map may make the controls unresponsive.
To be honest I never tested this scenario, I mean why you need to edit the rooms several times? Anyhow I will add it to the docs of the camera ;)
when furniture in the room moves, i rearrange the cut lines, that causes the segment numbers to change.
when furniture in the room moves, i rearrange the cut lines, that causes the segment numbers to change.
okay can you move this to the camera Github page.. we can discuss there how we can eventually improve it, by the way the the furniture is moving I guess the easy way (as the walls are still walls) should be to set and eventually change the no_go areas instead to move the rooms, what do you think about this idea? ;)
Checklist
The problem
I am using this card with Valetudo/dreame d9 max. When I select a segment on map , it selects the segment, and click on 'play' button on right side (next to repeat count), I get a toast saying 'success' but nothing happens. The robot doesn't start. I don't see any error in browser console or in home assistant. However if I press the main clean button (whole house) it works fine.
What version of a card has described problem?
v2.2.2
What was the last working version card?
No response
What vacuum model do you have problems with?
dreame d9 max/valetudo
Which integration do you use to control your vacuum (link)?
https://www.home-assistant.io/integrations/xiaomi_miio/
What browser (browsers/apps) does have this problem?
Chrome
What version of Home Assistant do you use?
2024.2.2
What type of installation are you running?
Home Assistant Core
Card's configuration
Javascript errors shown in the browser's console (if applicable)
Additional information
For maps I am using Valetudo Vacuum's Camera and map shows up fine.