* update changelog * add addon-dev target * initial version * use prebuild docker image * initial version for multi arch images * fix missing label latest * create log and config folder first. * clean up and translate to english * set labels with docker bake * add addon-debug and addon-dev targets * pass version number to proxy at runtime * add two more callbacks * get addon version from app * deploy rc addon container to ghcr * move ha_addon test into subdir * fix crash on container restart - mkdir -p returns no error even if the director exists * prepation for unit testing - move script into a method * added further config to schema * typo fixed * added monitor_sn + PV-strings 3-6 to create toml * added options.json for testing * prepare pytest and coverage for addons * fix missing values in resulting config.toml - define mqtt default values - convert filter configuration * first running unittest for addons * add ha_addons * increase test coverage * test empty options.json file for HA AddOn * fix pytest call in terminal * improve test coverage * remove uneeded options.json * move config.py into subdir cnf --------- Co-authored-by: Michael Metz <michael.metz@siemens.com>
39 lines
783 B
Bash
Executable File
39 lines
783 B
Bash
Executable File
#!/usr/bin/with-contenv bashio
|
|
|
|
echo "Add-on environment started"
|
|
|
|
echo "check for Home Assistant MQTT"
|
|
MQTT_HOST=$(bashio::services mqtt "host")
|
|
MQTT_PORT=$(bashio::services mqtt "port")
|
|
MQTT_USER=$(bashio::services mqtt "username")
|
|
MQTT_PASSWORD=$(bashio::services mqtt "password")
|
|
|
|
# wenn host gefunden wurde, dann nachricht ausgeben
|
|
if [ -z "$MQTT_HOST" ]; then
|
|
echo "MQTT not found"
|
|
else
|
|
echo "MQTT found"
|
|
export MQTT_HOST
|
|
export MQTT_PORT
|
|
export MQTT_USER
|
|
export MQTT_PASSWORD
|
|
fi
|
|
|
|
|
|
|
|
cd /home || exit
|
|
|
|
# Erstelle Ordner für log und config
|
|
mkdir -p proxy/log
|
|
mkdir -p proxy/config
|
|
|
|
echo "Create config.toml..."
|
|
python3 create_config_toml.py
|
|
|
|
cd /home/proxy || exit
|
|
|
|
export VERSION=$(cat /proxy-version.txt)
|
|
|
|
echo "Start Proxyserver..."
|
|
python3 server.py
|