Каждый раз когда выходит новая версии HomeAssistant, значит ждите проблем 🙂 Но как правило это так и есть. Поэтому предпочитаю обновляться реже … но с весомым аргументом. Вспомним как необходимо нужно было мигрировать на Python 3.7 для HA, это полный абзадц апосля … заметать следы приходилось весьма трудоемко и долго. Наш случай : это миграция OS Rassbian с Strench на Buster, так как обнова HA 0.97.2 проходила с ошибкой : “
/usr/bin/openssl: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by /usr/bin/openssl)
Далее было уже не весело. В логах HA cыпались туева куча ошибок : “ImportError: /usr/lib/arm-linux-gnueabihf/libssl.so.1.1: version `OPENSSL_1_1_1′ not found (required by /srv/homeassistant/lib/python3.7/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so”.
Для выполнения безстрадального обновления на последний HA, выполняем следующие шаги :
Часть 1. Миграция на версию OS Raspbian Buster. Меняем значения релиза в конфигах stretch
илиjessie
наbuster
в файлах:
/etc/apt/sources.list
/etc/apt/sources.list.d/raspi.list
/etc/apt/sources.list.d/hassbian.list
выполняем :
sudo apt-get update sudo apt-get -y dist-upgrade и после полного обновления (а процесс не быстрый) перегружаемся sudo reboot
Часть 2. Homeassistant
в файле /etc/pip.conf закоментируем строку в секции: [global] # extra-index-url=https://www.piwheels.org/simple далее в командной строке выполним > source /srv/homeassistant/bin/activate > pip uninstall cryptography > pip install --no-cache cryptography==2.7 > deactivate и рестартим наш homeassistant
Последствия и ошибки в логах homeassistant
Setup failed for recorder: libmariadbclient.so.18: cannot open shared object file ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: libmariadbclient.so.18: cannot open shared object file: No such file or directory (retrying in 3 seconds) ERROR (MainThread) [homeassistant.setup] Setup failed for recorder: Integration failed to initialize.
выполняем
sudo apt-get install libmysqlclient-dev cd /usr/lib/arm-linux-gnueabihf/ sudo ln -s libmariadbclient.so libmariadbclient.so.18
Перестал работать вызов версии в cli через python версия HA
python3 -c "import requests; print(requests.get('https://pypi.python.org/pypi/homeassistant/json').json()['info']['ver sion'])" Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'requests'
выполняем
root@hassbian:/home/homeassistant/.homeassistant# pip3 install requests Collecting requests Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests) Using cached https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl Collecting certifi>=2017.4.17 (from requests) Using cached https://files.pythonhosted.org/packages/69/1b/b853c7a9d4f6a6d00749e94eb6f3a041e342a885b87340b79c1ef73e3a78/certifi-2019.6.16-py2.py3-none-any.whl Collecting chardet<3.1.0,>=3.0.2 (from requests) Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl Collecting idna<2.9,>=2.5 (from requests) Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl Installing collected packages: urllib3, certifi, chardet, idna, requests Successfully installed certifi-2019.6.16 chardet-3.0.4 idna-2.8 requests-2.22.0 urllib3-1.25.3