Last update
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
#!1 bashio
|
#!/command/with-contenv bashio
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
bashio::log.info "Preparing to start..."
|
bashio::log.info "Preparing to start..."
|
||||||
|
|
||||||
@@ -225,9 +226,11 @@ if bashio::config.true 'ha_plugin'; then
|
|||||||
# pre configure the extension to use the integrated mosquitto broker
|
# pre configure the extension to use the integrated mosquitto broker
|
||||||
gextension="True"
|
gextension="True"
|
||||||
gextname="grott_ha"
|
gextname="grott_ha"
|
||||||
|
# shellcheck disable=SC2089
|
||||||
gextvar="{\"ha_mqtt_host\": \"$GROTT_CONFIG_MQTT_HOST\", \"ha_mqtt_port\": \"$GROTT_CONFIG_MQTT_PORT\", \"ha_mqtt_user\": \"$GROTT_CONFIG_MQTT_USER\", \"ha_mqtt_password\": \"$GROTT_CONFIG_MQTT_PASSWORD\", \"ha_mqtt_retain\": $MQTT_RETAIN}"
|
gextvar="{\"ha_mqtt_host\": \"$GROTT_CONFIG_MQTT_HOST\", \"ha_mqtt_port\": \"$GROTT_CONFIG_MQTT_PORT\", \"ha_mqtt_user\": \"$GROTT_CONFIG_MQTT_USER\", \"ha_mqtt_password\": \"$GROTT_CONFIG_MQTT_PASSWORD\", \"ha_mqtt_retain\": $MQTT_RETAIN}"
|
||||||
export gextension
|
export gextension
|
||||||
export gextname
|
export gextname
|
||||||
|
# shellcheck disable=SC2090
|
||||||
export gextvar
|
export gextvar
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
+174
-44
@@ -1,49 +1,179 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/command/with-contenv bashio
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
if bashio::config.has_value 'gverbose'; then export gverbose="$(bashio::config 'gverbose')"; fi
|
# Follow shellcheck recommendations
|
||||||
if bashio::config.has_value 'gminrecl'; then export gminrecl="$(bashio::config 'gminrecl')"; fi
|
if bashio::config.has_value 'verbose'; then
|
||||||
if bashio::config.has_value 'gmode'; then export gmode="$(bashio::config 'gmode')"; fi
|
# bug in grott code, see: https://github.com/johanmeijer/grott/pull/304
|
||||||
if bashio::config.has_value 'ggrottip'; then export ggrottip="$(bashio::config 'ggrottip')"; fi
|
gverbose="$(bashio::config 'verbose')"
|
||||||
if bashio::config.has_value 'ggrottport'; then export ggrottport="$(bashio::config 'ggrottport')"; fi
|
verbose="$(bashio::config 'verbose')"
|
||||||
if bashio::config.has_value 'gblockcmd'; then export gblockcmd="$(bashio::config 'gblockcmd')"; fi
|
export gverbose
|
||||||
if bashio::config.has_value 'gnoipf'; then export gnoipf="$(bashio::config 'gnoipf')"; fi
|
export verbose
|
||||||
if bashio::config.has_value 'gtime'; then export gtime="$(bashio::config 'gtime')"; fi
|
fi
|
||||||
if bashio::config.has_value 'gtimezone'; then export gtimezone="$(bashio::config 'gtimezone')"; fi
|
if bashio::config.has_value 'gminrecl'; then
|
||||||
if bashio::config.has_value 'gsendbuf'; then export gsendbuf="$(bashio::config 'gsendbuf')"; fi
|
gminrecl="$(bashio::config 'gminrecl')"
|
||||||
if bashio::config.has_value 'gcompat'; then export gcompat="$(bashio::config 'gcompat')"; fi
|
export gminrecl
|
||||||
if bashio::config.has_value 'gvalueoffset'; then export gvalueoffset="$(bashio::config 'gvalueoffset')"; fi
|
fi
|
||||||
if bashio::config.has_value 'ginverterid'; then export ginverterid="$(bashio::config 'ginverterid')"; fi
|
if bashio::config.has_value 'gmode'; then
|
||||||
if bashio::config.has_value 'gincludeall'; then export gincludeall="$(bashio::config 'gincludeall')"; fi
|
gmode="$(bashio::config 'gmode')"
|
||||||
if bashio::config.has_value 'ginvtype'; then export ginvtype="$(bashio::config 'ginvtype')"; fi
|
export gmode
|
||||||
if bashio::config.has_value 'gdecrypt'; then export gdecrypt="$(bashio::config 'gdecrypt')"; fi
|
fi
|
||||||
if bashio::config.has_value 'ggrowattip'; then export ggrowattip="$(bashio::config 'ggrowattip')"; fi
|
if bashio::config.has_value 'ggrottip'; then
|
||||||
if bashio::config.has_value 'ggrowattport'; then export ggrowattport="$(bashio::config 'ggrowattport')"; fi
|
ggrottip="$(bashio::config 'ggrottip')"
|
||||||
if bashio::config.has_value 'gnomqtt'; then export gnomqtt="$(bashio::config 'gnomqtt')"; fi
|
export ggrottip
|
||||||
if bashio::config.has_value 'gmqttip'; then export gmqttip="$(bashio::config 'gmqttip')"; fi
|
fi
|
||||||
if bashio::config.has_value 'gmqttport'; then export gmqttport="$(bashio::config 'gmqttport')"; fi
|
if bashio::config.has_value 'ggrottport'; then
|
||||||
if bashio::config.has_value 'gmqtttopic'; then export gmqtttopic="$(bashio::config 'gmqtttopic')"; fi
|
ggrottport="$(bashio::config 'ggrottport')"
|
||||||
if bashio::config.has_value 'gmqttauth'; then export gmqttauth="$(bashio::config 'gmqttauth')"; fi
|
export ggrottport
|
||||||
if bashio::config.has_value 'gmqttuser'; then export gmqttuser="$(bashio::config 'gmqttuser')"; fi
|
fi
|
||||||
if bashio::config.has_value 'gmqttpassword'; then export gmqttpassword="$(bashio::config 'gmqttpassword')"; fi
|
if bashio::config.has_value 'gblockcmd'; then
|
||||||
if bashio::config.has_value 'gpvoutput'; then export gpvoutput="$(bashio::config 'gpvoutput')"; fi
|
gblockcmd="$(bashio::config 'gblockcmd')"
|
||||||
if bashio::config.has_value 'gpvapikey'; then export gpvapikey="$(bashio::config 'gpvapikey')"; fi
|
export gblockcmd
|
||||||
if bashio::config.has_value 'gpvsystemid'; then export gpvsystemid="$(bashio::config 'gpvsystemid')"; fi
|
fi
|
||||||
if bashio::config.has_value 'gpvinverters'; then export gpvinverters="$(bashio::config 'gpvinverters')"; fi
|
if bashio::config.has_value 'gnoipf'; then
|
||||||
if bashio::config.has_value 'ginflux'; then export ginflux="$(bashio::config 'ginflux')"; fi
|
gnoipf="$(bashio::config 'gnoipf')"
|
||||||
if bashio::config.has_value 'ginflux2'; then export ginflux2="$(bashio::config 'ginflux2')"; fi
|
export gnoipf
|
||||||
if bashio::config.has_value 'gifdbname'; then export gifdbname="$(bashio::config 'gifdbname')"; fi
|
fi
|
||||||
if bashio::config.has_value 'gifip'; then export gifip="$(bashio::config 'gifip')"; fi
|
if bashio::config.has_value 'gtime'; then
|
||||||
if bashio::config.has_value 'gifport'; then export gifport="$(bashio::config 'gifport')"; fi
|
gtime="$(bashio::config 'gtime')"
|
||||||
if bashio::config.has_value 'gifuser'; then export gifuser="$(bashio::config 'gifuser')"; fi
|
export gtime
|
||||||
if bashio::config.has_value 'gifpassword'; then export gifpassword="$(bashio::config 'gifpassword')"; fi
|
fi
|
||||||
if bashio::config.has_value 'giforg'; then export giforg="$(bashio::config 'giforg')"; fi
|
if bashio::config.has_value 'gtimezone'; then
|
||||||
if bashio::config.has_value 'gifbucket'; then export gifbucket="$(bashio::config 'gifbucket')"; fi
|
gtimezone="$(bashio::config 'gtimezone')"
|
||||||
if bashio::config.has_value 'giftoken'; then export giftoken="$(bashio::config 'giftoken')"; fi
|
export gtimezone
|
||||||
if bashio::config.has_value 'ginvtypemap'; then export ginvtypemap="$(bashio::config 'ginvtypemap')"; fi
|
fi
|
||||||
|
if bashio::config.has_value 'gsendbuf'; then
|
||||||
|
gsendbuf="$(bashio::config 'gsendbuf')"
|
||||||
|
export gsendbuf
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gcompat'; then
|
||||||
|
gcompat="$(bashio::config 'gcompat')"
|
||||||
|
export gcompat
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gvalueoffset'; then
|
||||||
|
gvalueoffset="$(bashio::config 'gvalueoffset')"
|
||||||
|
export gvalueoffset
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'ginverterid'; then
|
||||||
|
ginverterid="$(bashio::config 'ginverterid')"
|
||||||
|
export ginverterid
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gincludeall'; then
|
||||||
|
gincludeall="$(bashio::config 'gincludeall')"
|
||||||
|
export gincludeall
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'ginvtype'; then
|
||||||
|
ginvtype="$(bashio::config 'ginvtype')"
|
||||||
|
export ginvtype
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gdecrypt'; then
|
||||||
|
gdecrypt="$(bashio::config 'gdecrypt')"
|
||||||
|
export gdecrypt
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'ggrowattip'; then
|
||||||
|
ggrowattip="$(bashio::config 'ggrowattip')"
|
||||||
|
export ggrowattip
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'ggrowattport'; then
|
||||||
|
ggrowattport="$(bashio::config 'ggrowattport')"
|
||||||
|
export ggrowattport
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gmqttip'; then
|
||||||
|
gmqttip="$(bashio::config 'gmqttip')"
|
||||||
|
export gmqttip
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gmqttport'; then
|
||||||
|
gmqttport="$(bashio::config 'gmqttport')"
|
||||||
|
export gmqttport
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gmqtttopic'; then
|
||||||
|
gmqtttopic="$(bashio::config 'gmqtttopic')"
|
||||||
|
export gmqtttopic
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gmqttauth'; then
|
||||||
|
gmqttauth="$(bashio::config 'gmqttauth')"
|
||||||
|
export gmqttauth
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gmqttuser'; then
|
||||||
|
gmqttuser="$(bashio::config 'gmqttuser')"
|
||||||
|
export gmqttuser
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gmqttpassword'; then
|
||||||
|
gmqttpassword="$(bashio::config 'gmqttpassword')"
|
||||||
|
export gmqttpassword
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gpvoutput'; then
|
||||||
|
gpvoutput="$(bashio::config 'gpvoutput')"
|
||||||
|
export gpvoutput
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gpvapikey'; then
|
||||||
|
gpvapikey="$(bashio::config 'gpvapikey')"
|
||||||
|
export gpvapikey
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gpvsystemid'; then
|
||||||
|
gpvsystemid="$(bashio::config 'gpvsystemid')"
|
||||||
|
export gpvsystemid
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gpvinverters'; then
|
||||||
|
gpvinverters="$(bashio::config 'gpvinverters')"
|
||||||
|
export gpvinverters
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'ginflux'; then
|
||||||
|
ginflux="$(bashio::config 'ginflux')"
|
||||||
|
export ginflux
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'ginflux2'; then
|
||||||
|
ginflux2="$(bashio::config 'ginflux2')"
|
||||||
|
export ginflux2
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gifdbname'; then
|
||||||
|
gifdbname="$(bashio::config 'gifdbname')"
|
||||||
|
export gifdbname
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gifip'; then
|
||||||
|
gifip="$(bashio::config 'gifip')"
|
||||||
|
export gifip
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gifport'; then
|
||||||
|
gifport="$(bashio::config 'gifport')"
|
||||||
|
export gifport
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gifuser'; then
|
||||||
|
gifuser="$(bashio::config 'gifuser')"
|
||||||
|
export gifuser
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gifpassword'; then
|
||||||
|
gifpassword="$(bashio::config 'gifpassword')"
|
||||||
|
export gifpassword
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'giforg'; then
|
||||||
|
giforg="$(bashio::config 'giforg')"
|
||||||
|
export giforg
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gifbucket'; then
|
||||||
|
gifbucket="$(bashio::config 'gifbucket')"
|
||||||
|
export gifbucket
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'giftoken'; then
|
||||||
|
giftoken="$(bashio::config 'giftoken')"
|
||||||
|
export giftoken
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'ginvtypemap'; then
|
||||||
|
ginvtypemap="$(bashio::config 'ginvtypemap')"
|
||||||
|
export ginvtypemap
|
||||||
|
fi
|
||||||
|
if bashio::config.has_value 'gpvdisv1'; then
|
||||||
|
gpvdisv1="$(bashio::config 'gpvdisv1')"
|
||||||
|
export gpvdisv1
|
||||||
|
fi
|
||||||
|
|
||||||
|
gextension="True"
|
||||||
|
gextname="grott_ha"
|
||||||
|
# shellcheck disable=SC2089
|
||||||
|
gextvar="{\"ha_mqtt_host\": \"$(bashio::services mqtt "host")\", \"ha_mqtt_port\": \"$(bashio::services mqtt "port")\", \"ha_mqtt_user\": \"$(bashio::services mqtt "username")\", \"ha_mqtt_password\": \"$(bashio::services mqtt "password")\"}"
|
||||||
|
|
||||||
export gextension="True"
|
export gextension
|
||||||
export gextname="grott_ha"
|
export gextname
|
||||||
export gextvar="{\"ha_mqtt_host\": \"$(bashio::services mqtt "host")\", \"ha_mqtt_port\": \"$(bashio::services mqtt "port")\", \"ha_mqtt_user\": \"$(bashio::services mqtt "username")\", \"ha_mqtt_password\": \"$(bashio::services mqtt "password")\"}"
|
# shellcheck disable=SC2090
|
||||||
|
export gextvar
|
||||||
|
|
||||||
python -u grott.py -v
|
python -u grott.py -v
|
||||||
|
|||||||
Reference in New Issue
Block a user