Skip to content

Commit

Permalink
homeassistant update
Browse files Browse the repository at this point in the history
- update dependencies
- adjust service-setup for command line parameters that are not supported anymore (--pid-file, --daemon)
- avoid use of install_python_wheels function, as we want to install whl files from wheelhouse
- abort installation when default_config installation failed (fail fast)
- increase expected installation time up to 60 minutes (it took 55 min. on a DS115j)
  • Loading branch information
hgy59 committed Nov 16, 2022
1 parent 5a2c151 commit 1f6d670
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 50 deletions.
32 changes: 21 additions & 11 deletions spk/homeassistant/src/postinst_components_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# requirements by dedicated integrations

### for components:
### pure python packages for components:

abodepy==1.2.0
accuweather==0.4.0
Expand Down Expand Up @@ -29,9 +29,10 @@ arcam-fmj==0.12.0
arrow==1.1.1
asyncio-dgram==2.1.0
asyncio-mqtt==0.10.0
asyncio-throttle==1.0.2
asyncssh==2.7.0
authcaptureproxy==1.0.2
authlib==0.15.4
Authlib==0.15.4
axis==44
backoff==1.11.1
beautifulsoup4==4.11.1
Expand All @@ -40,19 +41,22 @@ bidict==0.21.2
bimmer-connected==0.10.4
bitstring==3.1.9
bleak==0.18.1
bleak-retry-connector==2.1.3
blebox-uniapi==2.0.2
blinkpy==0.19.2
bluetooth-adapters==0.6.0
bluetooth-auto-recovery==0.3.6
bond-api==0.1.12
boschshcpy==0.2.35
broadlink==0.18.2
brother==2.0.0
bsblan==0.5.0
btsocket==0.2.0
buienradar==1.0.5
cached-property==1.5.2
charset-normalizer==2.0.7
casttube==0.2.1
cbor2==5.4.1
co2signal==0.4.2
CO2Signal==0.4.2
commentjson==0.9.0
convertdate==2.3.2
crccheck==1.0
Expand All @@ -62,10 +66,11 @@ cssselect==1.1.0
dacite==1.6.0
dataclasses-json==0.5.4
dateparser==1.0.0
#demjson==2.2.4 ==> build error
dbus-fast==1.24.0
denonavr==0.10.11
dicttoxml==1.7.4
fjaraskupan==2.0.0
fnvhash==0.1.0
fritzconnection==1.10.3
future==0.18.2
geographiclib==1.52
Expand Down Expand Up @@ -96,7 +101,7 @@ lomond==0.3.3
marshmallow==3.13.0
marshmallow-dataclass==8.5.3
marshmallow-enum==1.5.1
mechanicalsoup==1.1.0
MechanicalSoup==1.1.0
metar==1.8.0
ms-cv==0.1.1
mypy-extensions==0.4.3
Expand All @@ -108,23 +113,27 @@ pkce==1.0.3
platformdirs==2.4.0
plumbum==1.7.0
protobuf==3.17.3
psutil-home-assistant==0.0.1
ptyprocess==0.7.0
pubnub==5.1.4
py-canary==0.5.3
pyairvisual==2022.07.0
pyairvisual==2022.7.0
pyalmond==0.0.2
pyatag==0.3.5.3
pyatv==0.10.3
pyclimacell==0.18.2
pydantic==1.8.2
pydaikin==2.7.2
pyfritzhome==0.6.7
pyialarm==2.2.0
pyicloud==1.0.0
pymeeus==0.5.11
PyMeeus==0.5.11
pyoctoprintapi==0.1.8
pyownet==0.10.0.post1
pyquery==1.4.3
pyserial-asyncio==0.6
PyRIC==0.1.6.3
pyserial==3.5
pyserial-asyncio==0.6
pysiaalarm==3.0.2
pysmb==1.2.7
pysocketio==0.9.6a4
Expand All @@ -137,10 +146,11 @@ pytradfri==9.0.0
pyusb==1.2.1
pywemo==0.9.1
ratelimit==2.2.1
reparser==1.4.3
ReParser==1.4.3
requests-file==1.5.1
requests-oauthlib==1.3.0
semver==2.13.0
srptools==1.0.1
ssdp==1.1.0
stringcase==1.2.0
tenacity==8.0.1
Expand All @@ -152,10 +162,10 @@ xmltodict==0.13.0
yalexs==1.2.6
zeep==4.1.0
zha-quirks==0.0.83
zigpy==0.51.3
zigpy-cc==0.5.2
zigpy-deconz==0.19.0
zigpy-xbee==0.16.2
zigpy-zigate==0.10.2
zigpy-znp==0.9.1
zigpy==0.51.3
zope.event==4.5.0
62 changes: 39 additions & 23 deletions spk/homeassistant/src/postinst_default_config_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
# packages for default_config components

acme==1.17.0
aiodiscover==1.4.13
### aiohttp @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/aiohttp-3.7.4.post0-cp38-cp38-linux_aarch64.whl
### aiohttp @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/aiohttp-3.8.1-cp310-cp310-linux_aarch64.whl
aiohttp-cors==0.7.0
aiohue==4.5.0
anyio==3.3.0
anyio==3.6.1
astral==2.2
# async-timeout==3.0.1 ==> pure
async-upnp-client==0.31.2
### asyncstdlib @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/asyncstdlib-3.9.2-py3-none-any.whl
### asyncstdlib @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/asyncstdlib-3.9.2-py2.py3-none-any.whl
atomicwrites-homeassistant==1.4.1
attrs==21.2.0
awesomeversion==22.9.0
### backports.zoneinfo @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/backports.zoneinfo-0.2.1-cp38-cp38-linux_aarch64.whl
### bcrypt==3.1.7
### bcrypt @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/bcrypt-3.1.7-cp310-cp310-linux_aarch64.whl
boto3==1.20.24
botocore==1.21.18
#certifi==2021.5.30 ==> python310:pure
### cffi==1.15.1
### cffi @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/cffi-1.15.1-cp310-cp310-linux_aarch64.whl
# chardet==4.0.0 ==> pure
### ciso8601 @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/ciso8601-2.1.3-cp38-none-any.whl
### ciso8601 @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/ciso8601-2.2.0-cp310-cp310-linux_aarch64.whl
click==7.1.2
### cryptography @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/cryptography-3.3.2-cp38-none-any.whl
### cryptography @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/cryptography-38.0.1-cp310-cp310-linux_aarch64.whl
deepmerge==0.3.0
defusedxml==0.7.1
distro==1.5.0
Expand All @@ -29,38 +31,47 @@ dnspython==2.1.0
ecdsa==0.14.1
emoji==1.2.0
envs==1.3
### greenlet @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/greenlet-1.1.1-cp38-cp38-linux_aarch64.whl
### ephem @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/ephem-3.7.7.0-cp310-cp310-linux_aarch64.whl
### gevent @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/gevent-21.8.0-cp310-cp310-linux_aarch64.whl
### greenlet @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/greenlet-1.1.1-cp310-cp310-linux_aarch64.whl
gTTS==2.2.4
### guppy3 @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/guppy3-3.1.2-cp310-cp310-linux_aarch64.whl
h11==0.12.0
hass-nabucasa==0.56.0
### home-assistant-bluetooth @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/home_assistant_bluetooth-1.3.0-py3-none-any.whl
home-assistant-frontend==20221010.0
homeassistant==2022.10.5
httpcore==0.13.6
httpcore==0.15.0
httpx==0.23.0
#idna==3.3 ==> pure
ifaddr==0.1.7
#Jinja2==3.1.2 ==> pure
jmespath==0.10.0
jose==1.0.0
josepy==1.8.0
### MarkupSafe @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/MarkupSafe-2.0.1-cp38-cp38-linux_aarch64.whl
### multidict @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/multidict-5.1.0-cp38-none-any.whl
### lru-dict @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/lru_dict-1.1.8-cp310-cp310-linux_aarch64.whl
### MarkupSafe @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/MarkupSafe-2.0.1-cp310-cp310-linux_aarch64.whl
### miniaudio @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/miniaudio-1.53-cp310-cp310-linux_aarch64.whl
### multidict @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/multidict-5.1.0-cp310-cp310-linux_aarch64.whl
mutagen==1.45.1
### numpy @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/numpy-1.21.1-cp38-cp38-linux_aarch64.whl
### netifaces @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/netifaces-0.11.0-cp310-cp310-linux_aarch64.whl
### numpy @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/numpy-1.23.2-cp310-cp310-linux_aarch64.whl
onvif-zeep-async==1.2.1
### Pillow @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/Pillow-8.2.0-cp38-cp38-linux_aarch64.whl
### orjson @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/orjson-3.7.11-cp310-cp310-linux_aarch64.whl
### Pillow @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/Pillow-9.2.0-cp310-cp310-linux_aarch64.whl
ply==3.11
### psutil @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/psutil-5.8.0-cp310-cp310-linux_aarch64.whl
py-synologydsm-api==1.0.8
pyasn1==0.4.8
pycognito==2021.3.1
pycparser==2.19
### pycrypto==2.6.1
### pycryptodomex @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/pycryptodomex-3.10.1-cp35-abi3-linux_aarch64.whl
### pycryptodomex @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/pycryptodomex-3.11.0-cp36-abi3-linux_aarch64.whl
pyipp==0.11.0
### PyJWT @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/PyJWT-1.7.1-py2.py3-none-any.whl
PyMetno==0.9.0
### PyNaCl @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/PyNaCl-1.4.0-cp38-cp38-linux_aarch64.whl
pyOpenSSL==20.0.1
### PyNaCl @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/PyNaCl-1.5.0-cp310-cp310-linux_aarch64.whl
pyOpenSSL==22.1.0
pyotp==2.7.0
PyQRCode==1.2.1
pyRFC3339==1.1
Expand All @@ -73,33 +84,38 @@ pyroute2.ndb==0.6.4
pyroute2.nftables==0.6.4
pyroute2.nslink==0.6.4
pysmi==0.3.4
pysnmp==5.0.15
pysnmp==4.4.12
pysnmp-pyasn1==1.1.2
pysnmp-pysmi==1.1.10
pysnmplib==5.0.19
python-dateutil==2.8.2
python-didl-lite==1.2.6
python-jose==3.2.0
python-miio==0.5.12
python-slugifypython-slugify==4.0.1
python-slugify==4.0.1
PythonDNS==0.1
pytz==2021.1
### PyYAML @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/PyYAML-5.4.1-cp38-cp38-linux_aarch64.whl
pyudev==0.23.0
pyudev==0.23.2
### PyYAML @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/PyYAML-6.0-cp310-cp310-linux_aarch64.whl
### regex @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/regex-2021.8.3-cp310-cp310-linux_aarch64.whl
requests==2.28.1
requests-toolbelt==0.9.1
rfc3986==1.5.0
rsa==4.7.2
### ruamel.yaml @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/ruamel.yaml-0.15.100-cp38-cp38-linux_aarch64.whl
### ruamel.yaml==0.15.100
s3transfer==0.5.0
scapy==2.4.5
### six==1.16.0
sniffio==1.2.0
snitun==0.27.0
spotipy==2.20.0
### SQLAlchemy @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/SQLAlchemy-1.4.23-cp38-cp38-linux_aarch64.whl
### SQLAlchemy @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/SQLAlchemy-1.4.41-cp310-cp310-linux_aarch64.whl
text-unidecode==1.3
# typing-extensions==4.4.0 ==> pure
### ujson @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/ujson-4.2.0-cp310-cp310-linux_aarch64.whl
Unidecode==1.2.0
urllib3==1.26.6
voluptuous==0.13.1
voluptuous-serialize==2.5.0
### yarl @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/yarl-1.6.3-cp38-cp38-linux_aarch64.whl
### yarl @ file:///volume1/%40appstore/homeassistant/share/wheelhouse/yarl-1.8.1-cp310-cp310-linux_aarch64.whl
zeroconf==0.39.1
12 changes: 7 additions & 5 deletions spk/homeassistant/src/requirements-crossenv.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

#homeassistant==2022.10.5

### TODO: new to be verified
home-assistant-bluetooth==1.3.0
lru-dict==1.1.8
# [orjson]
# Requires maturin in build and cross environment, and rust
orjson==3.7.11


# Home Assistant Core
# aiokafka==0.7.2 ==> pure
# astral==2.2
Expand All @@ -31,14 +31,14 @@ ciso8601==2.2.0
# PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/
cryptography==38.0.1
# httpx==0.23.0
# idna==3.3 ==> pure
# jinja2==3.1.2 ==> pure
# idna==3.4 ==> pure
# Jinja2==3.1.2 ==> pure
numpy==1.23.2
# PyJWT==2.5.0 ==> pure
PyNaCl==1.5.0
## pip>=8.0.3,<20.3
# python-slugify==4.0.1
pyyaml==6.0
PyYAML==6.0
# requests==2.28.1 ==> pure
# ruamel.yaml==0.15.100 ==> pure
ujson==4.2.0
Expand All @@ -56,6 +56,7 @@ yarl==1.8.1
MarkupSafe==2.0.1
aiohttp==3.8.1
cffi==1.15.1
frozenlist==1.3.1
greenlet==1.1.1
multidict==5.1.0
SQLAlchemy==1.4.41
Expand All @@ -65,6 +66,7 @@ SQLAlchemy==1.4.41

### integration dependencies that need cross compiled wheel
# For Apple TV
miniaudio==1.53
# av==8.0.3 # depends on ffmpeg, PyAV is an FFMPEG wrapper...
### Could not find libavformat with pkg-config.
### Could not find libavcodec with pkg-config.
Expand Down
12 changes: 7 additions & 5 deletions spk/homeassistant/src/requirements-pure.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Home Assistant Core
aiokafka==0.7.2
# astral==2.2
# async_timeout==4.0.2
# async-timeout==4.0.2
attrs==21.2.0
# awesomeversion==22.9.0
# backports.zoneinfo;python_version<"3.9" ==> Does not build with python310
Expand All @@ -21,14 +21,14 @@ attrs==21.2.0
# ciso8601==2.2.0 ==> crossenv
# cryptography==38.0.1 ==> crossenv
# httpx==0.23.0
###idna==3.3
jinja2==3.1.2
idna==3.4
Jinja2==3.1.2
# numpy==1.23.2 # requires to be built as cross/numpy
PyJWT==2.5.0
# PyNaCl ==> crossenv # for mobile_app
## pip>=8.0.3,<20.3
# python-slugify==4.0.1
# pyyaml==6.0 ==> python310:crossenv:6.0
# PyYAML==6.0 ==> crossenv
requests==2.28.1
ruamel.yaml==0.15.100
six==1.16.0
Expand All @@ -51,8 +51,10 @@ six==1.16.0
# sqlalchemy==1.4.41 ==> crossenv

# Requirements for aiohttp==3.8.1
aiosignal==1.2.0
async_timeout==4.0.2
chardet==4.0.0
chardet==5.0.0
# frozenlist==1.3.1 ==> crossenv
typing-extensions==4.4.0

# Failed to build: av clx-sdk-xms homeassistant-pyozw python-twitch-client
Expand Down
16 changes: 14 additions & 2 deletions spk/homeassistant/src/service-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ PYTHON_DIR="/var/packages/python310/target/bin"
PATH="${SYNOPKG_PKGDEST}/env/bin:${SYNOPKG_PKGDEST}/bin:${PYTHON_DIR}:${PATH}"

CONFIG_DIR="${SYNOPKG_PKGVAR}/config"
SERVICE_COMMAND="${SYNOPKG_PKGDEST}/env/bin/hass -v --config ${CONFIG_DIR} --pid-file ${PID_FILE} --log-file ${LOG_FILE} --daemon"
SERVICE_COMMAND="${SYNOPKG_PKGDEST}/env/bin/hass -v --config ${CONFIG_DIR} --log-file ${LOG_FILE}"
SVC_WRITE_PID=y
SVC_BACKGROUND=y
SVC_CWD="${SYNOPKG_PKGVAR}"
HOME="${SYNOPKG_PKGVAR}"

Expand All @@ -20,13 +22,23 @@ service_postinst ()
install_python_virtualenv

echo ${separator}
install_python_wheels
echo "Install packages from wheels"
pip install --no-deps --no-input --no-index ${SYNOPKG_PKGDEST}/share/wheelhouse/*.whl

echo ${separator}
echo "Install pure python packages from index"
pip install --no-deps --no-input \
--requirement ${SYNOPKG_PKGDEST}/share/wheelhouse/requirements-pure.txt

echo ${separator}
echo "Install packages for default_config from index"
pip install --no-deps --no-input \
--cache-dir ${SYNOPKG_PKGVAR}/pip-cache \
--requirement ${SYNOPKG_PKGDEST}/share/postinst_default_config_requirements.txt
if [ $? -ne 0 ]; then
echo "ERROR: default_config installation failed";
return;
fi

echo ${separator}
echo "Install packages for homeassistant.components from index"
Expand Down
2 changes: 1 addition & 1 deletion spk/homeassistant/src/wizard/install_uifile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[{
"step_title": "Please consider",
"items": [{
"desc": "<b>This package includes most of the default Home Assistant integrations.</b><p>&nbsp;<p> It does not contain other components required by addons you may be interested in. Please refer to <a target=\"_blank\" href=\"https://github.com/SynoCommunity/spksrc/wiki/FAQ-HomeAssistant\">HomeAssistant configuration FAQ</a> for further configuration. This package may not provide components required by addons you may be interested in.<p>&nbsp;<p><b>WARNING:</b><p>This is a huge package and installation may take some time and display an error. In this case please press abort and do not retry installation. The package installer will display \"Update...\" and finally \"Running\". For systems with low resources it may take up to 30 minutes until the web frontend is running and does not display \"Home Assistant is starting. ...\" anymore."
"desc": "<b>This package includes most of the default Home Assistant integrations.</b><p>&nbsp;<p> It does not contain other components required by addons you may be interested in. Please refer to <a target=\"_blank\" href=\"https://github.com/SynoCommunity/spksrc/wiki/FAQ-HomeAssistant\">HomeAssistant configuration FAQ</a> for further configuration. This package may not provide components required by addons you may be interested in.<p>&nbsp;<p><b>WARNING:</b><p>This is a huge package and installation may take some time and display an error. In this case please press abort and do not retry installation. The package installer will display \"Installing...\" and finally \"Running\". For systems with low resources it may take up to 60 minutes until the web frontend is running and does not display \"Home Assistant is starting. ...\" anymore."
}]
}]
Loading

0 comments on commit 1f6d670

Please sign in to comment.