Updated the addon to use the HA extension
This commit is contained in:
+3
-2
@@ -22,10 +22,11 @@ RUN pip3 install --no-cache --upgrade pip setuptools
|
||||
# Copy data for add-on
|
||||
COPY script.sh /app/script.sh
|
||||
WORKDIR /app
|
||||
RUN curl -Lk https://github.com/egguy/grott/archive/refs/heads/feature/docker-build.zip --output files.zip && unzip -o files.zip && rm files.zip && mv grott-*/*.py ./ && mv grott-*/requirements.txt ./ && rm grott-*/ -rf
|
||||
RUN curl -Lk 'https://github.com/johanmeijer/grott/archive/refs/heads/2.7-(Beta).zip' --output files.zip && unzip -o files.zip && rm files.zip && mv grott-*/*.py ./
|
||||
RUN curl -L "https://raw.githubusercontent.com/egguy/grott/feature/ha-extension/examples/Home%20Assistent/grott_ha.py" -o grott_ha.py
|
||||
|
||||
#Install required python packages
|
||||
RUN pip3 install -r requirements.txt
|
||||
RUN pip install paho-mqtt requests influxdb influxdb
|
||||
|
||||
|
||||
RUN chmod a+x script.sh
|
||||
|
||||
+77
-68
@@ -1,69 +1,78 @@
|
||||
{
|
||||
"name": "Grott",
|
||||
"version": "2.7.6",
|
||||
"slug": "grott",
|
||||
"description": "The Growatt inverter monitor",
|
||||
"url": "https://github.com/johanmeijer/grott",
|
||||
"arch": ["armhf", "armv7", "aarch64", "amd64", "i386"],
|
||||
"startup": "application",
|
||||
"init": false,
|
||||
"boot": "auto",
|
||||
"ports" :{
|
||||
"5279/tcp": 5279
|
||||
},
|
||||
"options": {
|
||||
"gmode": "proxy",
|
||||
"gnomqtt": "False",
|
||||
"gmqttip": "127.0.0.1",
|
||||
"gmqttport": "1883",
|
||||
"gmqttauth": "False",
|
||||
"gmqtttopic": "energy/grott",
|
||||
"gmqttuser": "user",
|
||||
"gmqttpassword": "password"
|
||||
},
|
||||
"schema": {
|
||||
"gverbose": "bool?",
|
||||
"gminrecl": "int?",
|
||||
"gmode": "str",
|
||||
"ggrottip": "str?",
|
||||
"ggrottport": "port?",
|
||||
"gblockcmd": "bool?",
|
||||
"gnoipf": "bool?",
|
||||
"gtime": "str?",
|
||||
"gtimezone": "str?",
|
||||
"gsendbuf": "bool?",
|
||||
"gcompat": "bool?",
|
||||
"gvalueoffset": "int?",
|
||||
"ginverterid": "str?",
|
||||
"gincludeall": "bool?",
|
||||
"ginvtype": "str?",
|
||||
"gdecrypt": "bool?",
|
||||
"ggrowattip": "str?",
|
||||
"ggrowattport": "port?",
|
||||
"gnomqtt": "bool?",
|
||||
"gmqttip": "str?",
|
||||
"gmqttport": "str?",
|
||||
"gmqtttopic": "str?",
|
||||
"gmqttauth": "bool?",
|
||||
"gmqttuser": "str?",
|
||||
"gmqttpassword": "password?",
|
||||
"gpvoutput": "bool?",
|
||||
"gpvapikey": "str?",
|
||||
"gpvsystemid": "int?",
|
||||
"gpvinverters": "int?",
|
||||
"ginflux": "bool?" ,
|
||||
"ginflux2": "bool?",
|
||||
"gifdbname": "str?",
|
||||
"gifip": "str?",
|
||||
"gifport": "port?",
|
||||
"gifuser": "str?",
|
||||
"gifpassword": "password?",
|
||||
"giforg": "str?",
|
||||
"gifbucket": "str?",
|
||||
"giftoken": "str?",
|
||||
"gextension": "bool?",
|
||||
"gextname": "str?",
|
||||
"gextvar": "str?"
|
||||
}
|
||||
}
|
||||
|
||||
"name": "Grott",
|
||||
"version": "2.7.6",
|
||||
"slug": "grott",
|
||||
"description": "The Growatt inverter monitor",
|
||||
"url": "https://github.com/johanmeijer/grott",
|
||||
"arch": [
|
||||
"armhf",
|
||||
"armv7",
|
||||
"aarch64",
|
||||
"amd64",
|
||||
"i386"
|
||||
],
|
||||
"startup": "application",
|
||||
"services": [
|
||||
"mqtt:need"
|
||||
],
|
||||
"init": false,
|
||||
"boot": "auto",
|
||||
"ports": {
|
||||
"5279/tcp": 5279
|
||||
},
|
||||
"watchdog": "tcp://[HOST]:[PORT:5279]",
|
||||
"options": {
|
||||
"gmode": "proxy",
|
||||
"gnomqtt": "False",
|
||||
"mqtt": {}
|
||||
},
|
||||
"schema": {
|
||||
"gverbose": "bool?",
|
||||
"gminrecl": "int?",
|
||||
"gmode": "str",
|
||||
"ggrottip": "str?",
|
||||
"ggrottport": "port?",
|
||||
"gblockcmd": "bool?",
|
||||
"gnoipf": "bool?",
|
||||
"gtime": "str?",
|
||||
"gtimezone": "str?",
|
||||
"gsendbuf": "bool?",
|
||||
"gcompat": "bool?",
|
||||
"gvalueoffset": "int?",
|
||||
"ginverterid": "str?",
|
||||
"gincludeall": "bool?",
|
||||
"ginvtype": "str?",
|
||||
"gdecrypt": "bool?",
|
||||
"ggrowattip": "str?",
|
||||
"ggrowattport": "port?",
|
||||
"gnomqtt": "bool?",
|
||||
"gmqttip": "str?",
|
||||
"gmqttport": "str?",
|
||||
"gmqtttopic": "str?",
|
||||
"gmqttauth": "bool?",
|
||||
"gmqttuser": "str?",
|
||||
"gmqttpassword": "password?",
|
||||
"gpvoutput": "bool?",
|
||||
"gpvapikey": "str?",
|
||||
"gpvsystemid": "int?",
|
||||
"gpvinverters": "int?",
|
||||
"ginflux": "bool?",
|
||||
"ginflux2": "bool?",
|
||||
"gifdbname": "str?",
|
||||
"gifip": "str?",
|
||||
"gifport": "port?",
|
||||
"gifuser": "str?",
|
||||
"gifpassword": "password?",
|
||||
"giforg": "str?",
|
||||
"gifbucket": "str?",
|
||||
"giftoken": "str?",
|
||||
"gextension": "bool?",
|
||||
"gextname": "str?",
|
||||
"gextvar": "str?",
|
||||
"mqtt": {
|
||||
"server": "str?",
|
||||
"user": "str?",
|
||||
"password": "str?"
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-3
@@ -39,8 +39,9 @@ if bashio::config.has_value 'gifpassword'; then export gifpassword="$(bashio::c
|
||||
if bashio::config.has_value 'giforg'; then export giforg="$(bashio::config 'giforg')"; fi
|
||||
if bashio::config.has_value 'gifbucket'; then export gifbucket="$(bashio::config 'gifbucket')"; fi
|
||||
if bashio::config.has_value 'giftoken'; then export giftoken="$(bashio::config 'giftoken')"; fi
|
||||
if bashio::config.has_value 'gextension'; then export gextension="$(bashio::config 'gextension')"; fi
|
||||
if bashio::config.has_value 'gextname'; then export gextname="$(bashio::config 'gextname')"; fi
|
||||
if bashio::config.has_value 'gextvar'; then export gextvar="$(bashio::config 'gextvar')"; fi
|
||||
|
||||
export gextension="True"
|
||||
export gextname="grott_ha"
|
||||
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")\"}"
|
||||
|
||||
python -u grott.py -v
|
||||
|
||||
Reference in New Issue
Block a user