diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index dd84ea7..9b77ea7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,10 +1,9 @@ --- name: Bug report about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - +title: "" +labels: "" +assignees: "" --- **Describe the bug** @@ -12,6 +11,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] + +- OS: [e.g. iOS] +- Browser [e.g. chrome, safari] +- Version [e.g. 22] **Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] + +- Device: [e.g. iPhone6] +- OS: [e.g. iOS8.1] +- Browser [e.g. stock browser, safari] +- Version [e.g. 22] **Additional context** Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7..2bc5d5f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,10 +1,9 @@ --- name: Feature request about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - +title: "" +labels: "" +assignees: "" --- **Is your feature request related to a problem? Please describe.** diff --git a/.hadolint.yaml b/.hadolint.yaml index c13c16c..32dad40 100644 --- a/.hadolint.yaml +++ b/.hadolint.yaml @@ -1,4 +1,4 @@ --- ignored: - DL3006 - # Always tag the version of an image explicitly. \ No newline at end of file + # Always tag the version of an image explicitly. diff --git a/.images/sbfspot_sensors.yaml b/.images/sbfspot_sensors.yaml index 3eabefb..a7644a3 100644 --- a/.images/sbfspot_sensors.yaml +++ b/.images/sbfspot_sensors.yaml @@ -1,113 +1,113 @@ -### Note You will need to manually adjust +### Note You will need to manually adjust ### YOUR_PLANT_NAME and YOUR_INVERTER_SERIAL to match your options in SBFspot mqtt: - sensor: - - name: "SMA Sunny Boy" - state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" - value_template: '{{ value_json.InvName }}' - icon: "mdi:flash" - - - name: "SMA TimeStamp" - state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" - value_template: '{{ value_json.Timestamp }}' - icon: "mdi:clock" - - - name: "SMA Sun Rise" - state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" - value_template: "{{ value_json.SunRise }}" - icon: "mdi:weather-sunny" - - - name: "SMA Sun Set" - state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" - value_template: '{{ value_json.SunSet }}' - icon: "mdi:weather-sunset-down" - - - name: "SMA Running Temp" - state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" - value_template: '{{ value_json.InvTemperature }}' - unit_of_measurement: "°C" - icon: "mdi:coolant-temperature" - device_class: temperature - - - name: "SMA Status" - state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" - value_template: '{{ value_json.InvStatus }}' - icon: "mdi:flash" - - - name: "SMA Grid Relay" - state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" - value_template: '{{ value_json.InvGridRelay }}' - icon: "mdi:electric-switch" - - - name: "SMA Daily Energy" - state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" - value_template: '{{ value_json.EToday }}' - unit_of_measurement: "kWh" - icon: "mdi:solar-power" - device_class: energy - state_class: total_increasing - - - name: "SMA Total Energy" - state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" - value_template: '{{ value_json.ETotal }}' - unit_of_measurement: "kWh" - device_class: energy - state_class: total_increasing - - - name: "SMA Power AC" - state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" - value_template: '{{ value_json.PACTot }}' - unit_of_measurement: "W" - icon: "mdi:flash" - device_class: power - state_class: measurement - - - name: "SMA DC Array" - state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" - value_template: '{{ value_json.UDC1 }}' - unit_of_measurement: "Volts" - icon: "mdi:solar-panel-large" - device_class: voltage - - - name: "SMA DC Array2" - state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" - value_template: '{{ value_json.UDC2 }}' - unit_of_measurement: "Volts" - icon: "mdi:solar-panel" - device_class: voltage - - - name: "SMA DC Array" - state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" - value_template: '{{ value_json.IDC1 }}' - unit_of_measurement: "Amps" - icon: "mdi:solar-panel-large" - device_class: current - - - name: "SMA DC Array2" - state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" - value_template: '{{ value_json.IDC2 }}' - unit_of_measurement: "Amps" - icon: "mdi:solar-panel" - device_class: current - - - name: "SMA DC Array" - state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" - value_template: '{{ value_json.PDC1 }}' - unit_of_measurement: "Watts" - icon: "mdi:solar-panel-large" - device_class: power - - - name: "SMA DC Array2" - state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" - value_template: '{{ value_json.PDC2 }}' - unit_of_measurement: "Watts" - icon: "mdi:solar-panel" - device_class: power - - - name: "SMA Grid Frequency" - state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" - value_template: '{{ value_json.GridFreq }}' - unit_of_measurement: "Hz" - icon: "mdi:transmission-tower" - device_class: frequency + sensor: + - name: "SMA Sunny Boy" + state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" + value_template: "{{ value_json.InvName }}" + icon: "mdi:flash" + + - name: "SMA TimeStamp" + state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" + value_template: "{{ value_json.Timestamp }}" + icon: "mdi:clock" + + - name: "SMA Sun Rise" + state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" + value_template: "{{ value_json.SunRise }}" + icon: "mdi:weather-sunny" + + - name: "SMA Sun Set" + state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" + value_template: "{{ value_json.SunSet }}" + icon: "mdi:weather-sunset-down" + + - name: "SMA Running Temp" + state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" + value_template: "{{ value_json.InvTemperature }}" + unit_of_measurement: "°C" + icon: "mdi:coolant-temperature" + device_class: temperature + + - name: "SMA Status" + state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" + value_template: "{{ value_json.InvStatus }}" + icon: "mdi:flash" + + - name: "SMA Grid Relay" + state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" + value_template: "{{ value_json.InvGridRelay }}" + icon: "mdi:electric-switch" + + - name: "SMA Daily Energy" + state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" + value_template: "{{ value_json.EToday }}" + unit_of_measurement: "kWh" + icon: "mdi:solar-power" + device_class: energy + state_class: total_increasing + + - name: "SMA Total Energy" + state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" + value_template: "{{ value_json.ETotal }}" + unit_of_measurement: "kWh" + device_class: energy + state_class: total_increasing + + - name: "SMA Power AC" + state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" + value_template: "{{ value_json.PACTot }}" + unit_of_measurement: "W" + icon: "mdi:flash" + device_class: power + state_class: measurement + + - name: "SMA DC Array" + state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" + value_template: "{{ value_json.UDC1 }}" + unit_of_measurement: "Volts" + icon: "mdi:solar-panel-large" + device_class: voltage + + - name: "SMA DC Array2" + state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" + value_template: "{{ value_json.UDC2 }}" + unit_of_measurement: "Volts" + icon: "mdi:solar-panel" + device_class: voltage + + - name: "SMA DC Array" + state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" + value_template: "{{ value_json.IDC1 }}" + unit_of_measurement: "Amps" + icon: "mdi:solar-panel-large" + device_class: current + + - name: "SMA DC Array2" + state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" + value_template: "{{ value_json.IDC2 }}" + unit_of_measurement: "Amps" + icon: "mdi:solar-panel" + device_class: current + + - name: "SMA DC Array" + state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" + value_template: "{{ value_json.PDC1 }}" + unit_of_measurement: "Watts" + icon: "mdi:solar-panel-large" + device_class: power + + - name: "SMA DC Array2" + state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" + value_template: "{{ value_json.PDC2 }}" + unit_of_measurement: "Watts" + icon: "mdi:solar-panel" + device_class: power + + - name: "SMA Grid Frequency" + state_topic: "homeassistant/sbfspot_Inverter_name/sbfspot_Serial_no" + value_template: "{{ value_json.GridFreq }}" + unit_of_measurement: "Hz" + icon: "mdi:transmission-tower" + device_class: frequency diff --git a/README.md b/README.md index d938284..df32370 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Release][release-shield]][release] ![Project Stage][project-stage-shield] ![Project Maintenance][maintenance-shield] -# Repository add-on by Habuild +# Repository add-on by Habuild Add-on documentation: @@ -14,6 +14,7 @@ SBFspot addon for supervised Home Assistant, based an open source project locate This project creates an addon install for Home assistant users using the latest release of SBFspot as a docker container. # Installation and configuration + Add ([this respository](https://github.com/habuild/hassio-addons)) to Home Assistant via the superviser > new respository menu > add respository Fill in the config details to setup Inverter connection, Database, MQTT , and Upload API. @@ -21,10 +22,12 @@ Fill in the config details to setup Inverter connection, Database, MQTT , and Up Start the addon ## [haos-sbfspot](./haos-sbfspot) + ![Version](https://img.shields.io/badge/dynamic/json?label=Version&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Fhabuild%2Fhassio-addons%2Fmaster%2Fhaos-sbfspot%2Fconfig.json) ![Arch](https://img.shields.io/badge/dynamic/json?color=success&label=Arch&query=%24.arch&url=https%3A%2F%2Fraw.githubusercontent.com%2Fhabuild%2Fhassio-addons%2Fmaster%2Fhaos-sbfspot%2Fconfig.json) This version is specifically for Home Assistant Operating System HAOS. It omits Openrc found in the other version, which is largely redundant anyway. + ### [Installation](https://github.com/habuild/hassio-addons/blob/main/haos-sbfspot/README.md) ## [SBFspot](./sbfspot) @@ -57,6 +60,7 @@ Notes to developers after forking or using the github template feature: ## ![SBFspot Logo](https://user-images.githubusercontent.com/1931158/30831762-006ec650-a249-11e7-86e3-13d01b36dd5d.jpg) ## ToDo List + ### Fix - fix options to display GUI options correctly, currently only edit in yaml is available to save options. @@ -65,6 +69,7 @@ Notes to developers after forking or using the github template feature: ## ToDo end # Special Thanks To: + SBFspot https://github.com/SBFspot/SBFspot @@ -77,23 +82,30 @@ LauR3y for sbfspot addon https://github.com/LauR3y/hassio-addons ## SBFspot Readme ([SBFspot on github](https://github.com/SBFspot/SBFspot)). + ![SBFspot Logo](https://user-images.githubusercontent.com/1931158/30831762-006ec650-a249-11e7-86e3-13d01b36dd5d.jpg) Translation by Google: [[NL](https://translate.google.com/translate?act=url&depth=1&hl=nl&ie=UTF8&prev=_t&rurl=translate.google.com&sl=en&sp=nmt4&tl=nl&u=https://github.com/SBFspot/SBFspot)] - [[FR](https://translate.google.com/translate?act=url&depth=1&hl=nl&ie=UTF8&prev=_t&rurl=translate.google.com&sl=en&sp=nmt4&tl=fr&u=https://github.com/SBFspot/SBFspot)] - [[DE](https://translate.google.com/translate?act=url&depth=1&hl=nl&ie=UTF8&prev=_t&rurl=translate.google.com&sl=en&sp=nmt4&tl=de&u=https://github.com/SBFspot/SBFspot)] - [[ES](https://translate.google.com/translate?act=url&depth=1&hl=nl&ie=UTF8&prev=_t&rurl=translate.google.com&sl=en&sp=nmt4&tl=es&u=https://github.com/SBFspot/SBFspot)] - [[IT](https://translate.google.com/translate?act=url&depth=1&hl=nl&ie=UTF8&prev=_t&rurl=translate.google.com&sl=en&sp=nmt4&tl=it&u=https://github.com/SBFspot/SBFspot)] + ### **Introduction** + SBFspot, formerly known as SMAspot, is an open source project to get actual and archive data out of an SMA® inverter over Bluetooth or Ethernet (Speedwire®) It works on either Linux ([Raspberry Pi](http://www.raspberrypi.org)) and Windows. ### **What it does** + SBFspot connects via Bluetooth or Ethernet to your SMA® solar/battery inverter and reads Archive Day/Month Power generation, user/installer events and the actual (spot) data. The collected data is stored in a SQL database (SQLite/MySQL/MariaDB) or SMA® compatible .csv files. A separate service/daemon uploads the collected data to [PVoutput.org](https://pvoutput.org) ### **Known bugs and limitations** + For a list of known bugs, consult the [issues](https://github.com/SBFspot/SBFspot/issues). If you find a bug, please create an [issue](https://github.com/SBFspot/SBFspot/issues). ### **Documentation** + Refer to the [Wiki](https://github.com/SBFspot/SBFspot/wiki) for documentation and FAQ. ### **Special thanks to:** + 1. S. Pittaway: Author of ["NANODE SMA PV MONITOR"](https://github.com/stuartpittaway/nanodesmapvmonitor) on which this project is based. 2. W. Simons : Early adopter, main tester and SMAdata2® Protocol analyzer 3. G. Schnuff : SMAdata2® Protocol analyzer @@ -102,23 +114,27 @@ Refer to the [Wiki](https://github.com/SBFspot/SBFspot/wiki) for documentation a 6. All other users for their contribution - in any form - to the success of this project ### **Donations** + SBFspot is a free tool, developed during personal free time. If you like it, consider a donation. If you click on the button below, you will be taken to the secure PayPal Web site. You don't need to have a paypal account in order to make a donation. [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3R5JSRCXBGSLQ) ### **License** + [Attribution - NonCommercial - ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)](https://creativecommons.org/licenses/by-nc-sa/3.0/legalcode) In short, you are free: -* to Share => to copy, distribute and transmit the work -* to Remix => to adapt the work -Under the following conditions: -* **Attribution:** You must attribute the work in the manner specified by the author or Licensor (but not in any way that suggests that they endorse you or your use of the work). -* **Noncommercial:** You may not use this work for commercial purposes. -* **Share Alike:** If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one. + +- to Share => to copy, distribute and transmit the work +- to Remix => to adapt the work + Under the following conditions: +- **Attribution:** You must attribute the work in the manner specified by the author or Licensor (but not in any way that suggests that they endorse you or your use of the work). +- **Noncommercial:** You may not use this work for commercial purposes. +- **Share Alike:** If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one. ### **Disclaimer** + A user of SBFspot software acknowledges that he or she is receiving this software on an "as is" basis and the user is not relying on the accuracy or functionality of the software for any purpose. The user further acknowledges that any use of this software will be at his own risk and the copyright owner accepts no responsibility whatsoever arising from the use or application of the software. SMA, Speedwire are registered trademarks of [SMA Solar Technology AG](http://www.sma.de/en/company/about-sma.html) diff --git a/haos-sbfspot/CHANGELOG.md b/haos-sbfspot/CHANGELOG.md index 7ba4840..22701f4 100644 --- a/haos-sbfspot/CHANGELOG.md +++ b/haos-sbfspot/CHANGELOG.md @@ -1,11 +1,15 @@ + ## ![Version](https://img.shields.io/badge/dynamic/json?label=Version&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Fhabuild%2Fhassio-addons%2Fmain%2Fhaos-sbfspot%2Fconfig.json) + - tweaked the logging - Added **Bluetoothctl list** to log - Green ## ![Release][release-shield-2022-7-5] + [release-shield-2022-7-5]: https://img.shields.io/badge/version-2022.7.5-blue.svg + - Added LocalBTAddress to config - SBFspot version 3.9.5 was released. - Major changes for s6-Overlay v3 changes @@ -14,38 +18,43 @@ - updated base containers to 3.16 ## ![Release][release-shield-2022-3-5] + [release-shield-2022-3-5]: https://img.shields.io/badge/version-2022.3.5-blue.svg + - Add cronjob to update sensors if restart occurs. - SBFspot version 3.9.4 was released. ## ![Release][release-shield-2022-3-4] + [release-shield-2022-3-4]: https://img.shields.io/badge/version-2022.3.4-blue.svg + - Better log handling for latest file. - Set removal of old logs at 3 days. ## ![Release][release-shield-2022-3-3] + [release-shield-2022-3-3]: https://img.shields.io/badge/version-2022.3.3-blue.svg + - Upload logging moved to HA logging window. - - needs default /data/sbfspot/log directory. + - needs default /data/sbfspot/log directory. - SBFspot version 3.9.3 ## ![Release][release-shield-2022-3-2] + [release-shield-2022-3-2]: https://img.shields.io/badge/version-2022.3.2-blue.svg + - bug chasing - SBFspot version 3.9.3 - -## ![Release][release-shield] +## ![Release][release-shield] [release-shield]: https://img.shields.io/badge/version-2022.3.1-blue.svg - SBFspot version 3.9.3 - Initial release - Rebuilt to multi stage docker containter. - - This saves ~450MB on the final image. + - This saves ~450MB on the final image. - Is using base HA alpine container and s6 Overlay, so should be fully compatible with HAOS. -- Doesn't require complicated USER setups. - -- I'm no programmer, so apologies if I break something along the way - +- Doesn't require complicated USER setups. +- I'm no programmer, so apologies if I break something along the way diff --git a/haos-sbfspot/DOCS.md b/haos-sbfspot/DOCS.md index d7e5cb8..da6c2d6 100644 --- a/haos-sbfspot/DOCS.md +++ b/haos-sbfspot/DOCS.md @@ -70,4 +70,4 @@ Refer to the [SBFspot Wiki](https://github.com/sbfspot/sbfspot/wiki) for documen [aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg [armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg -[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg \ No newline at end of file +[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg diff --git a/haos-sbfspot/README.md b/haos-sbfspot/README.md index d7e5cb8..da6c2d6 100644 --- a/haos-sbfspot/README.md +++ b/haos-sbfspot/README.md @@ -70,4 +70,4 @@ Refer to the [SBFspot Wiki](https://github.com/sbfspot/sbfspot/wiki) for documen [aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg [armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg -[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg \ No newline at end of file +[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg diff --git a/haos-sbfspot/config.yaml b/haos-sbfspot/config.yaml index 3a44126..098d7af 100644 --- a/haos-sbfspot/config.yaml +++ b/haos-sbfspot/config.yaml @@ -60,7 +60,7 @@ options: MQTT_ItemDelimiter: comma MQTT_PublisherArgs: >- -h {host} -u MQTT_Username -P MQTT_Password -t {topic} -m "{{message}}" -d - MQTT_Data: >- + MQTT_Data: >- Timestamp,SunRise,SunSet,InvSerial,InvName,InvTime,InvStatus,InvTemperature,InvGridRelay,EToday,ETotal,GridFreq,PACTot,UDC1,UDC2,IDC1,IDC2,PDC1,PDC2 PVoutput_SID: "0123456789:12345" PVoutput_Key: "fake9364fake4545fake834fake" @@ -116,4 +116,4 @@ schema: LogLevel: "str" host_network: true host_dbus: true -image: "ghcr.io/habuild/{arch}-addon-ether-sbfspot" \ No newline at end of file +image: "ghcr.io/habuild/{arch}-addon-ether-sbfspot" diff --git a/repository.yaml b/repository.yaml index 563c402..bbf0185 100644 --- a/repository.yaml +++ b/repository.yaml @@ -1,5 +1,5 @@ --- -# https://developers.home-assistant.io/docs/add-ons/repository#repository-configuration +# https://developers.home-assistant.io/docs/add-ons/repository#repository-configuration name: SBFspot for HA -url: 'https://github.com/habuild/hassio-addons' +url: "https://github.com/habuild/hassio-addons" maintainer: HasQT diff --git a/sbfspot/CHANGELOG.md b/sbfspot/CHANGELOG.md index e640df6..ba6cabb 100644 --- a/sbfspot/CHANGELOG.md +++ b/sbfspot/CHANGELOG.md @@ -1,52 +1,60 @@ + ## ![Version](https://img.shields.io/badge/dynamic/json?label=Version&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Fhabuild%2Fhassio-addons%2Fmain%2Fsbfspot%2Fconfig.json) + - THIS IS CONSIDERED A TEST BRANCH -- bump for testing +- bump for testing - add changes for s6 overlay version 3 requirements - add local BT address option (use bluetoothctl to find your address) ## ![Release][release-shield-2022-3-6] + [release-shield-2022-3-6]: https://img.shields.io/badge/version-2022.3.6-blue.svg + - THIS IS CONSIDERED A TEST BRANCH -- bump for testing +- bump for testing - moved to test build to match HAOS-SBFspot version ## ![Release][release-shield-2022-3-5] + [release-shield-2022-3-5]: https://img.shields.io/badge/version-2022.3.5-blue.svg + - Add cronjob to update sensors on restart - SBFspot version 3.9.4 -- Deprecation warning - - This version offers little benefit over the alternative available. +- Deprecation warning + - This version offers little benefit over the alternative available. ## ![Release][release-shield-2022-3-4] + [release-shield-2022-3-4]: https://img.shields.io/badge/version-2022.3.4-blue.svg + - Better log handling for latest file. - Set removal of old logs at 3 days. ## ![Release][release-shield-2022-3-3] + [release-shield-2022-3-3]: https://img.shields.io/badge/version-2022.3.3-blue.svg + - Upload logging moved to HA logging window. - - needs default /data/sbfspot/log directory. + - needs default /data/sbfspot/log directory. - SBFspot version 3.9.3 ## ![Release][release-shield-2022-3-2] + [release-shield-2022-3-2]: https://img.shields.io/badge/version-2022.3.2-blue.svg + - bug chasing - SBFspot version 3.9.3 - -## ![Release][release-shield] +## ![Release][release-shield] [release-shield]: https://img.shields.io/badge/version-2022.3.1-blue.svg - SBFspot version 3.9.3 - Initial release - Rebuilt to multi stage docker containter. - - This saves ~450MB on the final image. + - This saves ~450MB on the final image. - Is using base HA alpine container and s6 Overlay, so should be fully compatible with HAOS. -- Doesn't require complicated USER setups. - -- I'm no programmer, so apologies if I break something along the way - - +- Doesn't require complicated USER setups. +- I'm no programmer, so apologies if I break something along the way diff --git a/sbfspot/DOCS.md b/sbfspot/DOCS.md index 55eb1d7..91957ad 100644 --- a/sbfspot/DOCS.md +++ b/sbfspot/DOCS.md @@ -10,20 +10,22 @@ This [home assistant](https://www.home-assistant.io/getting-started/) add-on provides the installation, configuration, and integration for the **Bluetooth** version of [SBFspot 3.9.4](https://github.com/SBFspot/SBFspot). This version is for the Container/supervised installation method of Home assistant. Although the haos version will also work here. Openrc is omitted in the HAOS version due to read only file system. -This add-on installs a cron service for SPFspot uploader at 5 minutely daytime interval, [PVoutput](https://pvoutput.org/) account and API are required, it also requires an SQL database like Mariadb. +This add-on installs a cron service for SPFspot uploader at 5 minutely daytime interval, [PVoutput](https://pvoutput.org/) account and API are required, it also requires an SQL database like Mariadb. It also sends a MQTT message to home assistant, therefore a MQTT broker is required. # Installation ### Initial database creation. + Download and import either [No Drop DB create](https://github.com/habuild/hassio-addons/blob/main/.images/CreateMySQLDB_no_drop.sql) **or** [Create My SQL.sql](https://github.com/SBFspot/SBFspot/blob/master/SBFspot/CreateMySQLDB.sql) in [phpMyAdmin](https://github.com/hassio-addons/addon-phpmyadmin) to create your database. **IF** you haven't already created the database previously, use the NO Drop version. You will also need to add the Database and User/Password to MariaDB and allocate the port. ![screenshot](https://raw.githubusercontent.com/habuild/hassio-addons/main/.images/MariaDB%20setup.PNG) -### MQTT -[sbfspot_sensors.yaml](https://github.com/habuild/hassio-addons/blob/main/.images/sbfspot_sensors.yaml) I use packages to include these yaml sensors. You will need to change to match your plant name and serial as you have set in the add-on configuration options. +### MQTT -**MQTT argument options** [configuration options](https://github.com/habuild/hassio-addons/blob/main/.images/Example_Config.yaml) The MQTT Username, and Password need to be hardcoded into the **MQTT_PublisherArgs:** The **{host}** **{topic}** and **{{message}}** will be picked up from options. +[sbfspot_sensors.yaml](https://github.com/habuild/hassio-addons/blob/main/.images/sbfspot_sensors.yaml) I use packages to include these yaml sensors. You will need to change to match your plant name and serial as you have set in the add-on configuration options. + +**MQTT argument options** [configuration options](https://github.com/habuild/hassio-addons/blob/main/.images/Example_Config.yaml) The MQTT Username, and Password need to be hardcoded into the **MQTT_PublisherArgs:** The **{host}** **{topic}** and **{{message}}** will be picked up from options. **MQTT_PublisherArgs:** **'-h {host} -u Your_MQTT_Username -P Your_MQTT_password -t {topic} -m "{{message}}" -d -r'** @@ -31,23 +33,27 @@ Download and import either [No Drop DB create](https://github.com/habuild/hassio **-r** is to retain messages. retain is not advised. - ### Example Configuration Options. -can be copy/pasted as [Example Config](https://github.com/habuild/hassio-addons/blob/main/.images/Example_Config.yaml) or entered via UI -![Example Options](https://github.com/habuild/hassio-addons/blob/main/.images/Example_config_png.PNG) -### Data paths -In docker the /data/ path arrives at /usr/share/hassio/addons/data/slug#_sbfspot on the host. +can be copy/pasted as [Example Config](https://github.com/habuild/hassio-addons/blob/main/.images/Example_Config.yaml) or entered via UI +![Example Options](https://github.com/habuild/hassio-addons/blob/main/.images/Example_config_png.PNG) + +### Data paths + +In docker the /data/ path arrives at /usr/share/hassio/addons/data/slug#\_sbfspot on the host. + ### Upload logs -The log file here may need to be cleaned up manually. + +The log file here may need to be cleaned up manually. ### **Link to SBFspot Documentation** + Refer to the [Wiki](https://github.com/SBFspot/SBFspot/wiki) for documentation and FAQ. ### **Special thanks to:** -* LauR3y/hassio-addons which this version is cleaned up from. -* The SBFspot team for SPFspot. +- LauR3y/hassio-addons which this version is cleaned up from. +- The SBFspot team for SPFspot. ![Supports aarch64 Architecture][aarch64-shield] ![Supports armhf Architecture][armhf-shield] diff --git a/sbfspot/README.md b/sbfspot/README.md index 396d6a3..a08bd32 100644 --- a/sbfspot/README.md +++ b/sbfspot/README.md @@ -10,20 +10,22 @@ This [home assistant](https://www.home-assistant.io/getting-started/) add-on provides the installation, configuration, and integration for the **Bluetooth** version of [SBFspot 3.9.5](https://github.com/SBFspot/SBFspot). This version is for the Container/supervised installation method of Home assistant. Although the haos version will also work here. Openrc is omitted in the HAOS version due to read only file system. -This add-on installs a cron service for SPFspot uploader at 5 minutely daytime interval, [PVoutput](https://pvoutput.org/) account and API are required, it also requires an SQL database like Mariadb. +This add-on installs a cron service for SPFspot uploader at 5 minutely daytime interval, [PVoutput](https://pvoutput.org/) account and API are required, it also requires an SQL database like Mariadb. It also sends a MQTT message to home assistant, therefore a MQTT broker is required. # Installation ### Initial database creation. + Download and import either [No Drop DB create](https://github.com/habuild/hassio-addons/blob/main/.images/CreateMySQLDB_no_drop.sql) **or** [Create My SQL.sql](https://github.com/SBFspot/SBFspot/blob/master/SBFspot/CreateMySQLDB.sql) in [phpMyAdmin](https://github.com/hassio-addons/addon-phpmyadmin) to create your database. **IF** you haven't already created the database previously, use the NO Drop version. You will also need to add the Database and User/Password to MariaDB and allocate the port. ![screenshot](https://raw.githubusercontent.com/habuild/hassio-addons/main/.images/MariaDB%20setup.PNG) -### MQTT -[sbfspot_sensors.yaml](https://github.com/habuild/hassio-addons/blob/main/.images/sbfspot_sensors.yaml) I use packages to include these yaml sensors. You will need to change to match your plant name and serial as you have set in the add-on configuration options. +### MQTT -**MQTT argument options** [configuration options](https://github.com/habuild/hassio-addons/blob/main/.images/Example_Config.yaml) The MQTT Username, and Password need to be hardcoded into the **MQTT_PublisherArgs:** The **{host}** **{topic}** and **{{message}}** will be picked up from options. +[sbfspot_sensors.yaml](https://github.com/habuild/hassio-addons/blob/main/.images/sbfspot_sensors.yaml) I use packages to include these yaml sensors. You will need to change to match your plant name and serial as you have set in the add-on configuration options. + +**MQTT argument options** [configuration options](https://github.com/habuild/hassio-addons/blob/main/.images/Example_Config.yaml) The MQTT Username, and Password need to be hardcoded into the **MQTT_PublisherArgs:** The **{host}** **{topic}** and **{{message}}** will be picked up from options. **MQTT_PublisherArgs:** **'-h {host} -u Your_MQTT_Username -P Your_MQTT_password -t {topic} -m "{{message}}" -d -r'** @@ -32,25 +34,30 @@ Download and import either [No Drop DB create](https://github.com/habuild/hassio **-r** is to retain messages. retain is not advised. ### Find your Local BT device address with Bluetoothctl + You can use the **bluetoothctl** command from the console(terminal or ssh addon) in homeassistant. This will list your controller mac address so you can add it to SBFspot addon config. ### Example Configuration Options. -Config can be copy/pasted as [Example Config](https://github.com/habuild/hassio-addons/blob/main/.images/Example_Config.yaml) or entered via UI -![Example Options](https://github.com/habuild/hassio-addons/blob/main/.images/Example_config_png.PNG) +Config can be copy/pasted as [Example Config](https://github.com/habuild/hassio-addons/blob/main/.images/Example_Config.yaml) or entered via UI +![Example Options](https://github.com/habuild/hassio-addons/blob/main/.images/Example_config_png.PNG) + +### Data paths + +In docker the /data/ path arrives at /usr/share/hassio/addons/data/slug#\_sbfspot on the host. -### Data paths -In docker the /data/ path arrives at /usr/share/hassio/addons/data/slug#_sbfspot on the host. ### Upload logs -The log file here may need to be cleaned up manually. + +The log file here may need to be cleaned up manually. ### **Link to SBFspot Documentation** + Refer to the [Wiki](https://github.com/SBFspot/SBFspot/wiki) for documentation and FAQ. ### **Special thanks to:** -* LauR3y/hassio-addons which this version is cleaned up from. -* The SBFspot team for SPFspot. +- LauR3y/hassio-addons which this version is cleaned up from. +- The SBFspot team for SPFspot. ![Supports aarch64 Architecture][aarch64-shield] ![Supports armhf Architecture][armhf-shield] diff --git a/sbfspot/config.json b/sbfspot/config.json index 297fa9a..b2aad8a 100644 --- a/sbfspot/config.json +++ b/sbfspot/config.json @@ -1,110 +1,110 @@ -{ - "name": "SBFspot", - "version": "2022.7.3", - "slug": "sbfspot", - "description": "Manage SBFspot with a simple interface", - "url": "https://github.com/habuild/hassio-addons/tree/main/sbfspot", - "arch": ["amd64", "i386"], - "init": false, - "stage": "deprecated", - "options": { - "BTAddress": "null", - "Password": "0000", - "LocalBTAddress":"00:00:00:00:00:00", - "MIS_Enabled": 0, - "Plantname": "MyPlant", - "OutputPath": "/data/sbfspot/%Y", - "OutputPathEvents": "/data/sbfspot/%Y/events", - "Latitude": "null", - "Longitude": "null", - "CalculateMissingSpotValues": 1, - "DateTimeFormat": "%d/%m/%Y %H:%M:%S", - "DateFormat": "%d/%m/%Y", - "DecimalPoint": "comma", - "TimeFormat": "%H:%M:%S", - "SynchTime": 0, - "SynchTimeLow": 1, - "SynchTimeHigh": 3600, - "SunRSOffset": 900, - "Locale": "en-US", - "Timezone": "Europe/Brussels", - "BTConnectRetries": 10, - "CSV_Export": 0, - "CSV_ExtendedHeader": 1, - "CSV_Header": 1, - "CSV_SaveZeroPower": 1, - "CSV_Delimiter": "semicolon", - "CSV_Spot_TimeSource": "Inverter", - "CSV_Spot_WebboxHeader": 0, - "SQL_Database": "null", - "SQL_Hostname": "core-mariadb", - "SQL_Port": "3306", - "SQL_Username": "null", - "SQL_Password": null, - "MQTT_Publisher": "/usr/bin/mosquitto_pub", - "MQTT_Host": "core-mosquitto", - "MQTT_Port": "null", - "MQTT_Topic": "homeassistant/sbfspot_{plantname}/sbfspot_{serial}", - "MQTT_ItemFormat": "\"{key}\": {value}", - "MQTT_ItemDelimiter": "comma", - "MQTT_PublisherArgs": "-h {host} -u {MQTT_Username} -P {MQTT_Password} -t {topic} -m \"{{message}}\" -d", - "MQTT_Data": "Timestamp,SunRise,SunSet,InvSerial,InvName,InvTime,InvStatus,InvTemperature,InvGridRelay,EToday,ETotal,GridFreq,PACTot,UDC1,UDC2,IDC1,IDC2,PDC1,PDC2", - "LogDir": "/data/sbfspot/log", - "LogLevel": "info", - "PVoutput_SID": null, - "PVoutput_Key": null, - "MQTT_ENABLE": "1" - }, - "schema": { - "BTAddress": "str", - "Password": "str", - "LocalBTAddress":"str", - "MIS_Enabled": "int", - "Plantname": "str", - "OutputPath": "str", - "OutputPathEvents": "str", - "Latitude": "float", - "Longitude": "float", - "CalculateMissingSpotValues": "int", - "DateTimeFormat": "str", - "DateFormat": "str", - "DecimalPoint": "str", - "TimeFormat": "str", - "SynchTime": "int", - "SynchTimeLow": "int", - "SynchTimeHigh": "int", - "SunRSOffset": "int", - "Locale": "str", - "Timezone": "str", - "BTConnectRetries": "int", - "CSV_Export": "int", - "CSV_ExtendedHeader": "int", - "CSV_Header": "int", - "CSV_SaveZeroPower": "int", - "CSV_Delimiter": "str", - "CSV_Spot_TimeSource": "str", - "CSV_Spot_WebboxHeader": "int", - "SQL_Database": "str", - "SQL_Hostname": "str", - "SQL_Port": "str", - "SQL_Username": "str", - "SQL_Password": "str", - "MQTT_Publisher": "str", - "MQTT_Host": "str", - "MQTT_Port": "str", - "MQTT_Topic": "str", - "MQTT_ItemFormat": "str", - "MQTT_ItemDelimiter": "str", - "MQTT_PublisherArgs": "str", - "MQTT_Data": "str", - "LogDir": "str", - "LogLevel": "str", - "PVoutput_SID": "str", - "PVoutput_Key": "str", - "MQTT_ENABLE": "int" - }, - "host_network": true, - "host_dbus": true, - - "image": "ghcr.io/habuild/{arch}-addon-sbfspot" -} +{ + "name": "SBFspot", + "version": "2022.7.3", + "slug": "sbfspot", + "description": "Manage SBFspot with a simple interface", + "url": "https://github.com/habuild/hassio-addons/tree/main/sbfspot", + "arch": ["amd64", "i386"], + "init": false, + "stage": "deprecated", + "options": { + "BTAddress": "null", + "Password": "0000", + "LocalBTAddress": "00:00:00:00:00:00", + "MIS_Enabled": 0, + "Plantname": "MyPlant", + "OutputPath": "/data/sbfspot/%Y", + "OutputPathEvents": "/data/sbfspot/%Y/events", + "Latitude": "null", + "Longitude": "null", + "CalculateMissingSpotValues": 1, + "DateTimeFormat": "%d/%m/%Y %H:%M:%S", + "DateFormat": "%d/%m/%Y", + "DecimalPoint": "comma", + "TimeFormat": "%H:%M:%S", + "SynchTime": 0, + "SynchTimeLow": 1, + "SynchTimeHigh": 3600, + "SunRSOffset": 900, + "Locale": "en-US", + "Timezone": "Europe/Brussels", + "BTConnectRetries": 10, + "CSV_Export": 0, + "CSV_ExtendedHeader": 1, + "CSV_Header": 1, + "CSV_SaveZeroPower": 1, + "CSV_Delimiter": "semicolon", + "CSV_Spot_TimeSource": "Inverter", + "CSV_Spot_WebboxHeader": 0, + "SQL_Database": "null", + "SQL_Hostname": "core-mariadb", + "SQL_Port": "3306", + "SQL_Username": "null", + "SQL_Password": null, + "MQTT_Publisher": "/usr/bin/mosquitto_pub", + "MQTT_Host": "core-mosquitto", + "MQTT_Port": "null", + "MQTT_Topic": "homeassistant/sbfspot_{plantname}/sbfspot_{serial}", + "MQTT_ItemFormat": "\"{key}\": {value}", + "MQTT_ItemDelimiter": "comma", + "MQTT_PublisherArgs": "-h {host} -u {MQTT_Username} -P {MQTT_Password} -t {topic} -m \"{{message}}\" -d", + "MQTT_Data": "Timestamp,SunRise,SunSet,InvSerial,InvName,InvTime,InvStatus,InvTemperature,InvGridRelay,EToday,ETotal,GridFreq,PACTot,UDC1,UDC2,IDC1,IDC2,PDC1,PDC2", + "LogDir": "/data/sbfspot/log", + "LogLevel": "info", + "PVoutput_SID": null, + "PVoutput_Key": null, + "MQTT_ENABLE": "1" + }, + "schema": { + "BTAddress": "str", + "Password": "str", + "LocalBTAddress": "str", + "MIS_Enabled": "int", + "Plantname": "str", + "OutputPath": "str", + "OutputPathEvents": "str", + "Latitude": "float", + "Longitude": "float", + "CalculateMissingSpotValues": "int", + "DateTimeFormat": "str", + "DateFormat": "str", + "DecimalPoint": "str", + "TimeFormat": "str", + "SynchTime": "int", + "SynchTimeLow": "int", + "SynchTimeHigh": "int", + "SunRSOffset": "int", + "Locale": "str", + "Timezone": "str", + "BTConnectRetries": "int", + "CSV_Export": "int", + "CSV_ExtendedHeader": "int", + "CSV_Header": "int", + "CSV_SaveZeroPower": "int", + "CSV_Delimiter": "str", + "CSV_Spot_TimeSource": "str", + "CSV_Spot_WebboxHeader": "int", + "SQL_Database": "str", + "SQL_Hostname": "str", + "SQL_Port": "str", + "SQL_Username": "str", + "SQL_Password": "str", + "MQTT_Publisher": "str", + "MQTT_Host": "str", + "MQTT_Port": "str", + "MQTT_Topic": "str", + "MQTT_ItemFormat": "str", + "MQTT_ItemDelimiter": "str", + "MQTT_PublisherArgs": "str", + "MQTT_Data": "str", + "LogDir": "str", + "LogLevel": "str", + "PVoutput_SID": "str", + "PVoutput_Key": "str", + "MQTT_ENABLE": "int" + }, + "host_network": true, + "host_dbus": true, + + "image": "ghcr.io/habuild/{arch}-addon-sbfspot" +}