romedtino / simple-wyze-vac

Home Assistant Custom Component for Wyze Vacuum
48 stars 8 forks source link

Device Update Issue #34

Closed hopkinsag1 closed 2 years ago

hopkinsag1 commented 2 years ago

I am able to see 2 of the vacuums, but they show up just as cameras and some of the entities load.

2022-06-09 18:54:43 WARNING (MainThread) [homeassistant.components.local_file.camera] Could not read camera Prof. Dumbledust image from file: www/simple_wyze_vac/Prof. Dumbledust_last_map.jpg
2022-06-09 18:54:43 WARNING (MainThread) [homeassistant.components.local_file.camera] Could not read camera Sir Vacsalot image from file: www/simple_wyze_vac/Sir Vacsalot_last_map.jpg
2022-06-09 18:54:43 WARNING (MainThread) [custom_components.simple_wyze_vac.vacuum] Simple Wyze Vac Polling every 0:10:00. Careful of hitting Wyze servers rate limits.
2022-06-09 18:54:43 WARNING (MainThread) [custom_components.simple_wyze_vac.vacuum] Simple Wyze Vac Polling every 0:10:00. Careful of hitting Wyze servers rate limits.
2022-06-09 18:54:48 ERROR (MainThread) [homeassistant.components.vacuum] simple_wyze_vac: Error on device update!
Traceback (most recent call last):
File "/usr/lib/python3.9/pathlib.py", line 1313, in mkdir
self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'www/simple_wyze_vac'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 736, in async_device_update
await task
File "/config/custom_components/simple_wyze_vac/vacuum.py", line 361, in async_update
await self.get_last_map()
File "/config/custom_components/simple_wyze_vac/vacuum.py", line 394, in get_last_map
Path(f"www/{DOMAIN}").mkdir(parents=True, exist_ok=True)
File "/usr/lib/python3.9/pathlib.py", line 1317, in mkdir
self.parent.mkdir(parents=True, exist_ok=True)
File "/usr/lib/python3.9/pathlib.py", line 1313, in mkdir
self._accessor.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: 'www'
2022-06-09 18:54:49 ERROR (MainThread) [homeassistant.components.vacuum] simple_wyze_vac: Error on device update!
romedtino commented 2 years ago

It looks like it wasn't able to create the directory www/simple_wyze_vac. Do you mind creating that manually then restart HA and see if it loads? You can create the directory using the Studio Code Server/VSCode Addon, doing it manually through a terminal/console mkdir -p <path_to_your_ha_config_directory>/www/simple_wyze_vac. If you do have a www directory, it might have tight permissions that prevents creation of the directory.

hopkinsag1 commented 2 years ago

I switched over to a VM running the full OS and this works great now!