Skip to content

Conversation

@kimzeuner
Copy link
Contributor

Hello,
It`s me again. I have closed the last pull request for the map feature as i had suddenly issues with the connection (i think because of too many api calls).
This time i have prepared the following:

  1. New Entity "garden size" which reports the garden size and gets updated during update operating data.
  2. The Map feature.
    There is a new service called download_map which has to be used to download the map. It is recommended to use it only once initially or if your map has changed.
    The service will download the map and store it in /config/www/indego_map_serialnumber.svg. If there are multiple mowers the serial number which is used in the download_map service will be used. Otherwise it just takes the already existing serial number of the integration. just as it is with e.g. delete_alerts.
    Afterwards the camera entity will use this svg file and add the position of the mower to it. The position is updated if there is a regular update from _update_state(longpoll), additional it will send an update_state(force=true) every 60 seconds which means that the position in the map will not be in real time but better then nothing. (60 seconds are also used in iobroker or openhab if i saw it right) so i think there should not be too many api calls. The camera entity itself will show idle when the mower is docked and streaming when the mower is mowing. If the mower is docked there are no api calls for a new position.
  3. This PR also contains the changes regarding VacuumActivity.

Regards

kimzeuner added 10 commits May 16, 2025 12:11
Fix for sander1988#258 deprecated constants VacuumActivity.xxx
Added map/download_map functions
Added download_map service
Added Camera and garden_size entity
added ENTITY_CAMERA and ENTITY_GARDEN_SIZE
added svgutils to the requirements
correct some copy & paste mistakes
coorect some copy & paste mistakes
@Stianker1
Copy link

Can you help me find a solution for this?
i have followed all your steps, but im getting this error in the logs. failed to set up.

Logger: homeassistant.config_entries
Source: config_entries.py:749
First occurred: 09:41:53 (3 occurrences)
Last logged: 09:51:48

Error setting up entry Stein (127604418) for indego
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 749, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/indego/init.py", line 248, in async_setup_entry
await indego_hub.start_periodic_position_update()
File "/config/custom_components/indego/init.py", line 708, in start_periodic_position_update
self._unsub_map_timer = async_track_time_interval(
^^^^^^^^^^^^^^^^^^^^^^^^^
NameError: name 'async_track_time_interval' is not defined

again correction of some copy and paste mistakes
@kimzeuner
Copy link
Contributor Author

Sorry, i thought i have corrected all copy & paste mistakes this morning but after you reported the failure i looked in the files once more and there were some more.
i think it is fixed now.

Regards

@Stianker1
Copy link

thanks for doing this.
now i get this error

Logger: homeassistant.config_entries
Source: config_entries.py:749
First occurred: 14:09:56 (1 occurrence)
Last logged: 14:09:56

Error setting up entry Stein (127604418) for indego
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 749, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/indego/init.py", line 258, in async_setup_entry
await indego_hub.update_generic_data_and_load_platforms(load_platforms)
File "/config/custom_components/indego/init.py", line 538, in update_generic_data_and_load_platforms
self._create_entities(device_info)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/config/custom_components/indego/init.py", line 518, in _create_entities
self.entities[entity_key] = IndegoCamera(
^^^^^^^^^^^^
NameError: name 'IndegoCamera' is not defined

@kimzeuner
Copy link
Contributor Author

Did you copy the camera.py file to your custom_component/indego folder ? The IndegoCamera class is defined in the camera.py file and then imported and loaded in the init.py (line 47 "from .camera import IndegoCamera"). seems as the import didn`t work. the only idea i have at the moment is, that the class is missing because of the missing camera.py file

@Stianker1
Copy link

Thank you so much. I got it working. It was a spelling error from my side when i created the camera.py file.

@kimzeuner
Copy link
Contributor Author

Glad to hear that it is working now. It would be great if you could report in some days if it is still working. On my side it was working for some time but since yesterday my mower, mower state and mower state detail entities are suddenly unavailable and i dont know why. My logs say that the update_state took too long or the response was too slow but at the moment i dont know if this is related to the map feature or not.

@suaveolent
Copy link

@kimzeuner could this be related to: #260

@kimzeuner
Copy link
Contributor Author

Thanks for the hint but that was not the problem. I was trying to find some further improvements which caused it. The version here should still work.

@WhyLev
Copy link

WhyLev commented Aug 3, 2025

@sander1988 please add this feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants