Please support a image besides camera view
borgqueenx opened this issue ยท 19 comments
Description
The official roborock integration makes constant updating images, does not have a camera view anymore. It would be great if instead of a camera, a image can be used for this card.
Solution
Supporting image view for the map.
Alternatives
No response
Context
No response
You can use image entity instead of camera entity by editing yaml configuration
You can use image entity instead of camera entity by editing yaml configuration
Can you show us how?
i simply tried to change camera into image in the yaml of the lovelace card, but now it says its missing calibration source.
Unfortunately at this moment official Roborock integration doesn't support calibration required for the map card
Why so? If a still image works I would imagine that one generated automatically would as well ๐ค
I would love to do something like that but it does not seem to work:
map_source:
image: image.roborock_s8_pro_ultra_ground_floor
Why so? If a still image works I would imagine that one generated automatically would as well ๐ค
You can try to manually calibrate the map from Roborock integration the same way you can calibrate the static image. It is not trivial though, so I prefer to not include it in the documentation.
The config would be:
map_source:
camera: image.roborock_s8_pro_ultra_ground_floor
Maybe we can ask the Roborock integration guys to make an easily calibrated image. What would it take to make it easier?
That's not so easy. Also he is aware of this problem and we have already discussed potential solutions:
Is there a way to get the coordinates via the roborock custom integration, then switch back to the core integration and put the coordinates back into the card?
@Legromorph potentially you can install the custom integration, copy "calibration points" from the map entity and use them to calibrate the map. Buuuut I don't know if this will work correctly - these maps might be a little bit different
Surprisingly it worked. I just had to change them a bit but it was the same ratio for all points(both x and y coordinates were shifted with the same ratio). So this is a valid strategy. Now I can enjoy the best from both the integration and the fantastic card :D
@Legromorph potentially you can install the custom integration, copy "calibration points" from the map entity and use them to calibrate the map. Buuuut I don't know if this will work correctly - these maps might be a little bit different
@Legromorph can you elaborate on how you achieved this? Some bullets and potentially a screenshot. I would be intersted in replicating the setup.
I am afraid, that I cannot do it with screenshots for 2 weeks because I am on vacation.
But I can list what I did for now.
- I installed the custom integration.
- I used the card to create the room coordinates.
- I used roborock.get_map if the card does not want to give you the coordinates of the rooms.
- I changed to calibration in the card from
camera: true
tocalibration_points:
- I changed that the first template is the rooms template. (So I can always see the icons on the map.)
- I pasted the calibration points from a different github thread.
When you paste them, your room icons will change positions. Note that under vacuum, I changed nothing. You only have to change map coordinates. Either I was just lucky or it is normal that the ratio is on all maps the same. If you change the x coordinate by for example -30 then change every other map x coordinate by -30 too.
On each change you can see your room icons move.
I had to change every y coordinate by +20 and every x coordinate by -120. (so not much different then the example I copied and pasted from a different user).
Just be sure to not change the vacuum coordinates.
Here are my real points, use them for the start.
calibration_coordinates:
- vacuum:
x: 25500
"y": 25500
map:
x: 180
"y": 84
- vacuum:
x: 35500
"y": 25500
map:
x: 380
"y": 84
- vacuum:
x: 25500
"y": 35500
map:
x: 180
"y": -116
- As soon as the room icons were on the same position as they were before I changed the calibration method, I copied the whole yaml of the card.
- I deinstalled the custom integration.
- Restart HA (important).
- I installed the core integration.
- I pasted the code into the card. (Maybe it will remember everything after the vacuum entity is swapped. But I wanted to be sure, that I dont have to reinstall again.)
- I changed to the send_command instead of the homeassistant-roborock. (This I had to do manual because everytime I tried fhe dropdoenmenu of the card it swapped back to homeassistant-roborock). So change the templates to the one liner written in the documentation under templates/send_command.
- For me I had to change alot of entitie names. Just name them with the new name from the integration (or other way around).
And you have to delete for the status the:attribute: status
because the core integration is only using the state of the roborock as status and doesnt have any attribute named status. But the rest is the same. - Everything should work fine!
- PROFIT!
Please tell me if something is not understandable. I am not that good in english, but I tried my best.
@Legromorph waiting for some full yaml and maybe screenshot. Did it all, all contours and icons are in place, yet when I do specific room, Consuela starts to wander to another... ๐
thank you @Legromorph for clear manual, I managed to get right room coordinators to image instead of camera entity. Worse part is that I cant use homeassistant-roborock custom integration platform for room and zone cleaning because it says "command not found", original Roborock integration uses slightly different command according this page . I have to use send command
platform instead witch is not so good integrated. Or I am doing something wrong ?