Deebot-4-Home-Assistant icon indicating copy to clipboard operation
Deebot-4-Home-Assistant copied to clipboard

Add calibration points

Open PiotrMachowski opened this issue 1 year ago • 5 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and no issue is describing my feature request or idea

Is your feature request related to a problem?

I'm working on adding support for this integration to my Vacuum Map card, it would be great if calibration points were added to your integration as well.

Suggested solution

Add calibration points as an attribute of camera entity or as a separate entity.

About calibration points

Api example request

No response

Alternatives you've considered

No response

Additional information

No response

PiotrMachowski avatar Mar 12 '23 16:03 PiotrMachowski

Are there any requirements on the point itself? The position on the map? Can I take the for example the four corner?

The drawing of the map is done in here

edenhaus avatar Mar 12 '23 17:03 edenhaus

They have to be non-linear. The best results should be achieved with 3 corners of a rectangle, map corners are fine (they don't even have to be within the map boundaries).

PiotrMachowski avatar Mar 12 '23 17:03 PiotrMachowski

@PiotrMachowski Do you really need the calibration points or is a fixed formula also fine? In deebot case the formula would be:

pixel_value = (bot_map_value / 50) + 400 See https://github.com/DeebotUniverse/client.py/blob/66c6bd694c770fdc4bb2bb7bfdcb13cc4e53fa81/deebot_client/map.py#L79

I can also provide you with the points (calculated by the above formula)

edenhaus avatar Mar 22 '23 21:03 edenhaus

I think I'd prefer calibration points over formula - this will allow to avoid vacuum specific code in the card. Buuuut thanks to the formula users will be able to create template sensors by themselves and use them instead of attributes of a camera entity.

Both approaches are fine for me, calibration points would require less actions made by users, but probably just my card would use them.

PiotrMachowski avatar Mar 22 '23 21:03 PiotrMachowski

Hello @PiotrMachowski and @edenhaus,

many thanks to both of you for two great cards for vacuums in general and evovacs specifically.

I would like to kindly ask you if there is any update to the "calibration point" topic? while I do like the "predefined selection" option (which works with the coordinates provided by the"deebot_cleaning_job" event , although not beeing displayed correctly within the "vacuum map card" card) it would be amazing to use the "on demand rectangle drawing" feature.

or maybe @PiotrMachowski could give more details on how to use the above mentioned formula within a template sensor to achieve this?

I am using a deebot N8 pro with deebot4homeassistant (already using the image instead of camera map entity).

thank you!

sero-git avatar Sep 25 '23 13:09 sero-git