I hope this is not what you decided on the end!
There seems to be an issue with HACS on dietpi-software installed home assistant. I don’t know if it can be fixed easily.
I can’t update HACS from the home assistant itself (previously it was working fine, not sure when it stopped). If I reinstall home assistant using dietpi-software reinstall
, the newest version is put in place correctly. But if home assistant is updated using the script (/home/homeassistant/homeassistant-update.sh
), old HACS remain.
Here’s a journalctl dump after triggering the update from within HACS:
Apr 24 02:05:16 DietPi Home Assistant[271676]: 2023-04-24 02:05:16.155 WARNING (SyncWorker_3) [custom_components.hacs] Could not create backup: [Errno 13] Permission denied: 'integration.py'
Apr 24 02:05:17 DietPi Home Assistant[271676]: 2023-04-24 02:05:17.115 ERROR (MainThread) [custom_components.hacs] <Integration hacs/integration> Download was not completed
Apr 24 02:05:17 DietPi Home Assistant[271676]: 2023-04-24 02:05:17.123 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547410394176] Error handling message: Unknown error (unknown_error) [MY_USERNAME_REDACTED] from 10.9.0.2 (Mozilla/5.0 (Linux; Android 12; [MY_AND_BROWSERDEVICE_REDACTED])
Apr 24 02:05:17 DietPi Home Assistant[271676]: Traceback (most recent call last):
Apr 24 02:05:17 DietPi Home Assistant[271676]: File "/home/homeassistant/.pyenv/versions/3.10.10/lib/python3.10/site-packages/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
Apr 24 02:05:17 DietPi Home Assistant[271676]: await func(hass, connection, msg)
Apr 24 02:05:17 DietPi Home Assistant[271676]: File "/mnt/dietpi_userdata/homeassistant/custom_components/hacs/websocket/repository.py", line 216, in hacs_repository_download
Apr 24 02:05:17 DietPi Home Assistant[271676]: await repository.async_install()
Apr 24 02:05:17 DietPi Home Assistant[271676]: File "/mnt/dietpi_userdata/homeassistant/custom_components/hacs/repositories/base.py", line 899, in async_install
Apr 24 02:05:17 DietPi Home Assistant[271676]: await self.async_install_repository()
Apr 24 02:05:17 DietPi Home Assistant[271676]: File "/mnt/dietpi_userdata/homeassistant/custom_components/hacs/repositories/base.py", line 993, in async_install_repository
Apr 24 02:05:17 DietPi Home Assistant[271676]: await self.hacs.hass.async_add_executor_job(backup.restore)
Apr 24 02:05:17 DietPi Home Assistant[271676]: File "/home/homeassistant/.pyenv/versions/3.10.10/lib/python3.10/concurrent/futures/thread.py", line 58, in run
Apr 24 02:05:17 DietPi Home Assistant[271676]: result = self.fn(*self.args, **self.kwargs)
Apr 24 02:05:17 DietPi Home Assistant[271676]: File "/mnt/dietpi_userdata/homeassistant/custom_components/hacs/utils/backup.py", line 93, in restore
Apr 24 02:05:17 DietPi Home Assistant[271676]: shutil.rmtree(self.local_path)
Apr 24 02:05:17 DietPi Home Assistant[271676]: File "/home/homeassistant/.pyenv/versions/3.10.10/lib/python3.10/shutil.py", line 725, in rmtree
Apr 24 02:05:17 DietPi Home Assistant[271676]: _rmtree_safe_fd(fd, path, onerror)
Apr 24 02:05:17 DietPi Home Assistant[271676]: File "/home/homeassistant/.pyenv/versions/3.10.10/lib/python3.10/shutil.py", line 658, in _rmtree_safe_fd
Apr 24 02:05:17 DietPi Home Assistant[271676]: _rmtree_safe_fd(dirfd, fullname, onerror)
Apr 24 02:05:17 DietPi Home Assistant[271676]: File "/home/homeassistant/.pyenv/versions/3.10.10/lib/python3.10/shutil.py", line 681, in _rmtree_safe_fd
Apr 24 02:05:17 DietPi Home Assistant[271676]: onerror(os.unlink, fullname, sys.exc_info())
Apr 24 02:05:17 DietPi Home Assistant[271676]: File "/home/homeassistant/.pyenv/versions/3.10.10/lib/python3.10/shutil.py", line 679, in _rmtree_safe_fd
Apr 24 02:05:17 DietPi Home Assistant[271676]: os.unlink(entry.name, dir_fd=topfd)
Apr 24 02:05:17 DietPi Home Assistant[271676]: PermissionError: [Errno 13] Permission denied: 'integration.py'
I am sure the whole folder and everything within is owned by user homeassistant.