diff --git a/ha_addons/.gitignore b/ha_addons/.gitignore index 8a014ce..1e60ea6 100644 --- a/ha_addons/.gitignore +++ b/ha_addons/.gitignore @@ -1,3 +1,4 @@ .data.json config.yaml -apparmor.txt \ No newline at end of file +apparmor.txt +README.md \ No newline at end of file diff --git a/ha_addons/Makefile b/ha_addons/Makefile index 15b8794..ea9bc55 100644 --- a/ha_addons/Makefile +++ b/ha_addons/Makefile @@ -66,7 +66,7 @@ clean: # Build the local add-on with a rootfs and config.yaml # The rootfs is needed to build the add-on Docker container # -local_add_on: rootfs $(ADDON_PATH)/config.yaml $(ADDON_PATH)/apparmor.txt +local_add_on: rootfs $(ADDON_PATH)/config.yaml $(ADDON_PATH)/apparmor.txt $(ADDON_PATH)/README.md # collect source files SRC_FILES := $(wildcard $(SRC_PROXY)/*.py)\ @@ -103,6 +103,9 @@ $(ADDON_PATH)/%.yaml: $(TEMPL)/%.jinja $(TEMPL)/.data.json $(ADDON_PATH)/%.txt: $(TEMPL)/%.jinja $(TEMPL)/.data.json $(JINJA) --strict --format=json $^ -o $@ +$(ADDON_PATH)/%.md: $(TEMPL)/%.jinja $(TEMPL)/.data.json + $(JINJA) --strict --format=json $^ -o $@ + # build a common data.json file from STAGE depending source files # don't touch the destination if the checksum of src and dst is equal $(TEMPL)/.data.json: FORCE @@ -119,6 +122,7 @@ repro_files = DOCS.md icon.png logo.png translations/de.yaml translations/en.yam repro_root = CHANGELOG.md LICENSE.md repro_templates = config.yaml repro_apparmor = apparmor.txt +repro_readme = README.md repro_subdirs = translations rootfs repro_vers = debug dev rc rel @@ -126,29 +130,34 @@ repro_all_files := $(foreach dir,$(repro_vers), $(foreach file,$(repro_files),$( repro_root_files := $(foreach dir,$(repro_vers), $(foreach file,$(repro_root),$(INST_BASE)/ha_addon_$(dir)/$(file))) repro_all_templates := $(foreach dir,$(repro_vers), $(foreach file,$(repro_templates),$(INST_BASE)/ha_addon_$(dir)/$(file))) repro_all_apparmor := $(foreach dir,$(repro_vers), $(foreach file,$(repro_apparmor),$(INST_BASE)/ha_addon_$(dir)/$(file))) +repro_all_readme := $(foreach dir,$(repro_vers), $(foreach file,$(repro_readme),$(INST_BASE)/ha_addon_$(dir)/$(file))) repro_all_subdirs := $(foreach dir,$(repro_vers), $(foreach file,$(repro_subdirs),$(INST_BASE)/ha_addon_$(dir)/$(file))) debug: $(foreach file,$(repro_subdirs),$(INST_BASE)/ha_addon_debug/$(file)) \ $(foreach file,$(repro_templates),$(INST_BASE)/ha_addon_debug/$(file)) \ $(foreach file,$(repro_apparmor),$(INST_BASE)/ha_addon_debug/$(file)) \ + $(foreach file,$(repro_readme),$(INST_BASE)/ha_addon_debug/$(file)) \ $(foreach file,$(repro_files),$(INST_BASE)/ha_addon_debug/$(file)) \ $(foreach file,$(repro_root),$(INST_BASE)/ha_addon_debug/$(file)) dev: $(foreach file,$(repro_subdirs),$(INST_BASE)/ha_addon_dev/$(file)) \ $(foreach file,$(repro_templates),$(INST_BASE)/ha_addon_dev/$(file)) \ $(foreach file,$(repro_apparmor),$(INST_BASE)/ha_addon_dev/$(file)) \ + $(foreach file,$(repro_readme),$(INST_BASE)/ha_addon_dev/$(file)) \ $(foreach file,$(repro_files),$(INST_BASE)/ha_addon_dev/$(file)) \ $(foreach file,$(repro_root),$(INST_BASE)/ha_addon_dev/$(file)) rc: $(foreach file,$(repro_subdirs),$(INST_BASE)/ha_addon_rc/$(file)) \ $(foreach file,$(repro_templates),$(INST_BASE)/ha_addon_rc/$(file)) \ $(foreach file,$(repro_apparmor),$(INST_BASE)/ha_addon_rc/$(file)) \ + $(foreach file,$(repro_readme),$(INST_BASE)/ha_addon_rc/$(file)) \ $(foreach file,$(repro_files),$(INST_BASE)/ha_addon_rc/$(file)) \ $(foreach file,$(repro_root),$(INST_BASE)/ha_addon_rc/$(file)) rel: $(foreach file,$(repro_subdirs),$(INST_BASE)/ha_addon_rel/$(file)) \ $(foreach file,$(repro_templates),$(INST_BASE)/ha_addon_rel/$(file)) \ $(foreach file,$(repro_apparmor),$(INST_BASE)/ha_addon_rel/$(file)) \ + $(foreach file,$(repro_readme),$(INST_BASE)/ha_addon_rel/$(file)) \ $(foreach file,$(repro_files),$(INST_BASE)/ha_addon_rel/$(file)) \ $(foreach file,$(repro_root),$(INST_BASE)/ha_addon_rel/$(file)) @@ -161,6 +170,9 @@ $(repro_all_templates) : $(INST_BASE)/ha_addon_%/config.yaml: $(TEMPL)/config.ji $(repro_all_apparmor) : $(INST_BASE)/ha_addon_%/apparmor.txt: $(TEMPL)/apparmor.jinja $(TEMPL)/%_data.json $(JINJA) --strict $< $(filter %.json,$^) -o $@ +$(repro_all_readme) : $(INST_BASE)/ha_addon_%/README.md: $(TEMPL)/README.jinja $(TEMPL)/%_data.json + $(JINJA) --strict $< $(filter %.json,$^) -o $@ + $(filter $(INST_BASE)/ha_addon_debug/%,$(repro_root_files)) : $(INST_BASE)/ha_addon_debug/% : ../% cp $< $@ $(filter $(INST_BASE)/ha_addon_dev/%,$(repro_root_files)) : $(INST_BASE)/ha_addon_dev/% : ../% diff --git a/ha_addons/templates/README.jinja b/ha_addons/templates/README.jinja new file mode 100644 index 0000000..421ddad --- /dev/null +++ b/ha_addons/templates/README.jinja @@ -0,0 +1,21 @@ +# Home Assistant Add-on: {{name}} + +{{readme_descr}} + +## Features + +- Supports TSUN GEN3 PLUS inverters: TSOL-MS2000, MS1800 and MS1600 +- Supports TSUN GEN3 PLUS batteries: TSOL-DC1000 (from version 0.13) +- Supports TSUN GEN3 inverters: TSOL-MS3000, MS800, MS700, MS600, MS400, MS350 and MS300 +- `Home-Assistant` auto-discovery support +- `MODBUS` support via MQTT topics +- `AT-Command` support via MQTT topics (GEN3PLUS only) +- Faster DataUp interval sends measurement data to the MQTT broker every minute +- Self-sufficient island operation without internet +- Security-Features: + - control access via `AT-commands` + +## About + +This Add-on and the TSUN Proxy is not related to the company TSUN. It is a private initiative that aims to connect TSUN inverters and storage systems with an MQTT broker. There is no support and no warranty from TSUN. +{{readme_links}} \ No newline at end of file diff --git a/ha_addons/templates/debug_data.json b/ha_addons/templates/debug_data.json index fcfdfe7..47fa2d2 100644 --- a/ha_addons/templates/debug_data.json +++ b/ha_addons/templates/debug_data.json @@ -5,5 +5,7 @@ "image": "docker.io/sallius/tsun-gen3-addon", "slug": "tsun-proxy-debug", "advanced": true, - "stage": "experimental" + "stage": "experimental", + "readme_descr": "This is a bleeding-edge version of the `TSUN Proxy` Add-On with debuging enabled by default.\n\nThe versions may be based on different feature branches and therefore the range of functions may change.\n\nIt is intended to be used to simulate special situations/problems and should only be used in consultation with the maintainer.\n\nFor production please use the stable version `TSUN Proxy`. If you are interested in a bleeding edge version, we offer the `TSUN Proxy (dev)` version.", + "readme_links": "" } \ No newline at end of file diff --git a/ha_addons/templates/dev_data.json b/ha_addons/templates/dev_data.json index a7fbb82..68e933c 100644 --- a/ha_addons/templates/dev_data.json +++ b/ha_addons/templates/dev_data.json @@ -5,5 +5,7 @@ "image": "docker.io/sallius/tsun-gen3-addon", "slug": "tsun-proxy-dev", "advanced": false, - "stage": "experimental" + "stage": "experimental", + "readme_descr": "This is a bleeding-edge version of the `TSUN Proxy` Add-On.\n\nThe versions may be based on different feature branches and therefore the range of functions may change.\n\nIt is intended for testing new functions or testing new devices that are to be supported with the next release.\nFor production, please use the stable version 'TSUN Proxy'.", + "readme_links": "" } \ No newline at end of file diff --git a/ha_addons/templates/rc_data.json b/ha_addons/templates/rc_data.json index 6f21cc4..05d33ce 100644 --- a/ha_addons/templates/rc_data.json +++ b/ha_addons/templates/rc_data.json @@ -6,5 +6,8 @@ "image": "ghcr.io/s-allius/tsun-gen3-addon", "slug": "tsun-proxy-rc", "advanced": true, - "stage": "experimental" + "stage": "experimental", + "readme_descr": "This is a release candidate of the `TSUN Proxy` Add-On.\n\nIt is intended for testing the next release.\nFor production, please use the stable version 'TSUN Proxy'.", + "readme_links": "" + } \ No newline at end of file diff --git a/ha_addons/templates/rel_data.json b/ha_addons/templates/rel_data.json index d6046f5..edf673c 100644 --- a/ha_addons/templates/rel_data.json +++ b/ha_addons/templates/rel_data.json @@ -5,5 +5,7 @@ "image": "ghcr.io/s-allius/tsun-gen3-addon", "slug": "tsun-proxy", "advanced": false, - "stage": "stable" + "stage": "stable", + "readme_dsecr": "Integrates TSUN inverters (e.g. TSOL MS800, MS2000, MS3000) and batteries (TSOL DC1000) into Home Assistant.\n\nIt is based on the [TSUN Proxy][tsunproxy] and enables a reliable connection between TSUN devices and an MQTT broker.\n\nWith the Add-on, you can easily retrieve real-time values such as power, current and daily energy and integrate the inverter into Home Assistant.\nThis works even without an internet connection.\n\nThe optional connection to the TSUN Cloud can be disabled!", + "readme_links": "\n[tsunproxy]: https://github.com/s-allius/tsun-gen3-proxy\n" } \ No newline at end of file