diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..12eccec --- /dev/null +++ b/.yamllint @@ -0,0 +1,68 @@ +--- +ignore: | + */translations/*.yaml + */config.yaml + */config.yml +rules: + braces: + level: error + min-spaces-inside: 0 + max-spaces-inside: 1 + min-spaces-inside-empty: -1 + max-spaces-inside-empty: -1 + brackets: + level: error + min-spaces-inside: 0 + max-spaces-inside: 0 + min-spaces-inside-empty: -1 + max-spaces-inside-empty: -1 + colons: + level: error + max-spaces-before: 0 + max-spaces-after: 1 + commas: + level: error + max-spaces-before: 0 + min-spaces-after: 1 + max-spaces-after: 1 + comments: + level: error + require-starting-space: true + min-spaces-from-content: 2 + comments-indentation: + level: error + document-end: + level: error + present: false + document-start: + level: error + present: true + empty-lines: + level: error + max: 1 + max-start: 0 + max-end: 1 + hyphens: + level: error + max-spaces-after: 1 + indentation: + level: error + spaces: 2 + indent-sequences: true + check-multi-line-strings: false + key-duplicates: + level: error + line-length: + level: warning + max: 120 + allow-non-breakable-words: true + allow-non-breakable-inline-mappings: true + new-line-at-end-of-file: + level: error + new-lines: + level: error + type: unix + trailing-spaces: + level: error + truthy: + level: error diff --git a/grott-current/build.yaml b/grott-current/build.yaml deleted file mode 100644 index 83acedf..0000000 --- a/grott-current/build.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -build_from: - aarch64: ghcr.io/hassio-addons/base/aarch64:14.2.1 - amd64: ghcr.io/hassio-addons/base/amd64:14.2.1 - armhf: ghcr.io/hassio-addons/base/armhf:14.2.1 - armv7: ghcr.io/hassio-addons/base/armv7:14.2.1 - i386: ghcr.io/hassio-addons/base/i386:14.2.1 -codenotary: - base_image: codenotary@frenck.dev - signer: etienne.guilluy@gmail.com diff --git a/grott/CHANGELOG.md b/grott/CHANGELOG.md deleted file mode 100644 index ad1751b..0000000 --- a/grott/CHANGELOG.md +++ /dev/null @@ -1,10 +0,0 @@ -# Changelog since v0.1.0 -- ⬆️ Update Add-on base image to v14.2.1 -- Corrected typo -- Add multiple target for deploy -- Updated base -- Updated deploy configuration -- Updated repository URL -- Add edge -- ⬆️ Update alpine_3_18/python3 to v3.11.6-r0 -- Add ref to stable repository diff --git a/grott/Dockerfile b/grott/Dockerfile deleted file mode 100644 index d873e9f..0000000 --- a/grott/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -ARG BUILD_FROM=ghcr.io/hassio-addons/base:14.2.1 -# hadolint ignore=DL3006 -FROM $BUILD_FROM - -ENV LANG C.UTF-8 - -# Run updates -# RUN apt-get clean && apt-get update && apt-get upgrade -y - -# Set the locale -# RUN apt-get install -y locales && locale-gen en_US.UTF-8 - -# Install python/pip -ENV PYTHONUNBUFFERED=1 -RUN apk add --update --no-cache python3=3.11.4-r0 && ln -sf python3 /usr/bin/python && python3 -m ensurepip - - -#RUN curl -k https://codeload.github.com/johanmeijer/grott/zip/master --output files.zip && unzip files.zip -#RUN unzip files.zip - -# Copy data for add-on -COPY script.sh /app/script.sh -RUN chmod a+x /app/script.sh - -WORKDIR /app -RUN curl -Lk 'https://github.com/johanmeijer/grott/archive/refs/heads/master.zip' --output files.zip && unzip -o files.zip && rm files.zip && mv grott-*/*.py ./ -# Move the addon -RUN mv grott-*/examples/Home\ Assistent/grott_ha.py ./ - -COPY requirements.txt requirements.txt -#Install required python packages -RUN pip3 install --no-cache-dir -r requirements.txt - -CMD [ "./script.sh" ] diff --git a/grott/README.md b/grott/README.md deleted file mode 100644 index b6541e4..0000000 --- a/grott/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Grott - Home Assistant native MQTT integration - -![Release][release-shield]][release] ![Project Stage][project-stage-shield] ![Project Maintenance][maintenance-shield] - - - -This addon allow you to run a local version of grott with the HA plugin -and auto discovery enabled. - -The data is fowarded to the growatt's server. -The grott server decode them and send them to your HA instance. - -This addon is based on the 2.7.8 -[grott](https://github.com/johanmeijer/grott) code -and current grott_ha extension. - -## WARNING! THIS IS AN EDGE VERSION! - -This Home Assistant Add-ons repository contains edge builds of add-ons. -Edge builds add-ons are based upon the latest development version. - -- They may not work at all. -- They might stop working at any time. -- They could have a negative impact on your system. - -This repository was created for: - -- Anybody willing to test. -- Anybody interested in trying out upcoming add-ons or add-on features. -- Developers. - -If you are more interested in stable releases of our add-ons: - - - - -[project-stage-shield]: https://img.shields.io/badge/project%20stage-production%20ready-brightgreen.svg -[release-shield]: https://img.shields.io/badge/version-044729b-blue.svg -[release]: https://github.com/egguy/addon-grott/tree/044729b \ No newline at end of file diff --git a/grott/build.yaml b/grott/build.yaml deleted file mode 100644 index 83acedf..0000000 --- a/grott/build.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -build_from: - aarch64: ghcr.io/hassio-addons/base/aarch64:14.2.1 - amd64: ghcr.io/hassio-addons/base/amd64:14.2.1 - armhf: ghcr.io/hassio-addons/base/armhf:14.2.1 - armv7: ghcr.io/hassio-addons/base/armv7:14.2.1 - i386: ghcr.io/hassio-addons/base/i386:14.2.1 -codenotary: - base_image: codenotary@frenck.dev - signer: etienne.guilluy@gmail.com diff --git a/grott/config.yaml b/grott/config.yaml index b30c39b..53272d6 100644 --- a/grott/config.yaml +++ b/grott/config.yaml @@ -1,19 +1,21 @@ + +--- name: grott version: 044729b slug: grott description: The Growatt inverter monitor with current HA plugin integrated url: https://github.com/egguy/addon-grott arch: -- armhf -- armv7 -- aarch64 -- amd64 -- i386 + - armhf + - armv7 + - aarch64 + - amd64 + - i386 services: -- mqtt:need + - mqtt:need init: false map: -- config:rw + - config:rw ports: 5279/tcp: 5279 ports_description: @@ -23,7 +25,7 @@ options: gmode: proxy grott_mqtt: false ginvtype: default - ginvtypemap: '' + ginvtypemap: "" retain: false verbose: false ha_plugin: true @@ -83,4 +85,3 @@ schema: user: str? password: str? data_path: str -image: ghcr.io/egguy/grott/{arch} diff --git a/grott/requirements.txt b/grott/requirements.txt deleted file mode 100644 index a9ee875..0000000 --- a/grott/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -paho-mqtt==1.6.1 -requests==2.31.0 -influxdb==5.3.1 diff --git a/grott/script.sh b/grott/script.sh deleted file mode 100644 index 522e7b2..0000000 --- a/grott/script.sh +++ /dev/null @@ -1,179 +0,0 @@ -#!/command/with-contenv bashio -# shellcheck shell=bash - -# Follow shellcheck recommendations -if bashio::config.has_value 'verbose'; then - # bug in grott code, see: https://github.com/johanmeijer/grott/pull/304 - gverbose="$(bashio::config 'verbose')" - verbose="$(bashio::config 'verbose')" - export gverbose - export verbose -fi -if bashio::config.has_value 'gminrecl'; then - gminrecl="$(bashio::config 'gminrecl')" - export gminrecl -fi -if bashio::config.has_value 'gmode'; then - gmode="$(bashio::config 'gmode')" - export gmode -fi -if bashio::config.has_value 'ggrottip'; then - ggrottip="$(bashio::config 'ggrottip')" - export ggrottip -fi -if bashio::config.has_value 'ggrottport'; then - ggrottport="$(bashio::config 'ggrottport')" - export ggrottport -fi -if bashio::config.has_value 'gblockcmd'; then - gblockcmd="$(bashio::config 'gblockcmd')" - export gblockcmd -fi -if bashio::config.has_value 'gnoipf'; then - gnoipf="$(bashio::config 'gnoipf')" - export gnoipf -fi -if bashio::config.has_value 'gtime'; then - gtime="$(bashio::config 'gtime')" - export gtime -fi -if bashio::config.has_value 'gtimezone'; then - gtimezone="$(bashio::config 'gtimezone')" - export gtimezone -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 -export gextname -# shellcheck disable=SC2090 -export gextvar - -python -u grott.py -v