Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | Home Assistant: Further install enhancements and add workarounds for external bugs #3231

Merged
merged 11 commits into from
Nov 18, 2019

Conversation

MichaIng
Copy link
Owner

@MichaIng MichaIng commented Nov 15, 2019

Status: Ready

  • Changelog

Reference: #2374

  • Python is still freshly compiled to assure most current and matching versions, but abstraction level reduced for now (no virtualenv).

Commit list/description:

  • DietPi-Software | Home Assistant: Skip pyenv virtualenv. pyenv itself is installed locally for the "homeassistant" user already, hence another virtualenv is overkill. This simplifies install and pyenv activation and reduces disk usage overhead.
  • DietPi-Software | Home Assistant: Add workaround to install home-assistant-frontend prior to first HA start: Unable to set up dependencies of default_config. Setup failed for dependencies: config, frontend, history, logbook, map, mobile_app home-assistant/core#28361 (comment)
  • DietPi-Software | Home Assistant: Remove obsolete $ha_srvroot from DietPi pre-v6.27 until we do a forced reinstall via dietpi-update where we can remove it via patch_file
  • DietPi-Software | Home Assistant: Since we don't use virtualenv, install bare pyenv manually instead of using installer, which pulls certain additional plugins. Git is hence not required anymore.
  • DietPi-Software | Home Assistant: Massively reduce dependencies to a minimum of current requirements to succeed build and eliminate all warnings as well. Do not install SQLite, FFmpeg and MariaDB support by default, which is not used by our setup: SQLite binary is only required if one wants to access the default SQLite database directly. FFmpeg for AV integrations. MariaDB as SQLite replacement generally makes sense for larger setup, but must be setup by user manually currently anyway. We'll add some info to our online docs about how to add additional Python modules into the Home Assistant pyenv.
  • DietPi-Software | Home Assistant: Eliminate pip version warning
  • DietPi-Software | Home Assistant: Since some components and setups (e.g. MariaDB for database) require additional Python modules or even Python build dependencies, it makes sense to allow users maintaining a custom deps list via dietpi.txt. This allows easy reinstalls and server migrations without the need to recheck, run pip installs manually and in cases redo the long taking Python build if some developer library was missing for a certain HA component/integration.
  • DietPi-Software | Home Assistant: Move the pyenv activation into its own script, to be sourced from originating script/shell. Check for correct user navigate to its home, which assures correct Python version to be loaded automatically as well.

+ DietPi-Software | Home Assistant: Skip pyenv virtualenv. pyenv itself is installed locally for the "homeassistant" user already, hence another virtualenv is overkill. This simplifies install and pyenv activation and reduces disk usage overhead.
+ DietPi-Software | Home Assistant: Add workaround to install home-assistant-frontend prior to first HA start: home-assistant/core#28361 (comment)
+ DietPi-Software | Home Assistant: Install aiohttp_cors manually as well due to similar error faced with Python 3.8.0 outside of virtualenv
@MichaIng MichaIng added this to the v6.27 milestone Nov 15, 2019
@MichaIng MichaIng changed the title v6.27 DietPi-Software | Home Assistant: Further install enhancements and add workarounds for external bugs Nov 15, 2019
+ DietPi-Software | Home Assistant: Remove obsolete $ha_srvroot from DietPi pre-v6.27 until we do a forced reinstall via dietpi-update where we can remove it via patch_file
+ DietPi-Software | Home Assistant: Since we don't use virtualenv, install bare pyenv manually instead of using installer, which pulls certain additional plugins. Git is hence not required anymore.
+ DietPi-Software | Home Assistant: Revert to Python 3.7.5 as Python 3.8.0 fails with a lot of additional "module not found" errors when adding certain modules from within HA web UI. The version dependencies are obviously not yet read for what is available for Python 3.8.0 by default.
+ DietPi-Software | Home Assistant: Remove pre-v6.27 service dir as well on uninstall
+ DietPi-Software | Home Assistant: Install workaround Python modules with specific required version as otherwise colliding dependency versions can be pulled which in cases break further modules install through the Home Assistant web UI.
+ DietPi-Software | Home Assistant: Massively reduce dependencies to a minimum of current requirements to succeed build and eliminate all warnings as well. Do not install SQLite, FFmpeg and MariaDB support by default, which is not used by our setup: SQLite binary is only required if one wants to access the default SQLite database directly. FFmpeg for AV integrations. MariaDB as SQLite replacement generally makes sense for larger setup, but must be setup by user manually currently anyway. We'll add some info to our online docs about how to add additional Python modules into the Home Assistant pyenv.
+ DietPi-Software | Home Assistant: Eliminate pip version warning
+ CHANGELOG | Home Assistant: Setup enhancements
+ DietPi-Software | Home Assistant: Python v3.8.0 does work perfectly well and aiohttp_cors workaround is not required. The service only needs to be restarted one time, if web UI access fails or if it contains a notification about certain components were unable to load. For some reason it by times fails to install certain Python modules ondemand after being started the first time. We'll add an info about this to our online docs.
+ DietPi-Software | Home Assistant: Since some components and setups (e.g. MariaDB for database) require additional Python modules or even Python build dependencies, it makes sense to allow users maintaining a custom deps list via dietpi.txt. This allows easy reinstalls and server migrations without the need to recheck, run pip installs manually and in cases redo the long taking Python build if some developer library was missing for a certain HA component/integration.
+ DietPi-Software | Home Assistant: Move the pyenv activation into its own script, to be sourced from originating script/shell. Check for correct user navigate to its home, which assures correct Python version to be loaded automatically as well.
+ DietPi-Software | Home Assistant: Add settings for optional Python modules and build dependencies to dietpi.txt, to allow user easier migration and reinstall when using certain custom setups or special HA components
+ CHANGELOG | Home Assistant: Added APT/pip deps dietpi.txt settings and pyenv activation via dedicated script to source from originating shell
@MichaIng MichaIng added the External bug 🐞 For bugs which are not caused by DietPi. label Nov 18, 2019
@MichaIng MichaIng merged commit 1dd80b3 into dev Nov 18, 2019
@MichaIng MichaIng deleted the homeassistant branch November 22, 2019 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement 💨 External bug 🐞 For bugs which are not caused by DietPi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant