diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dcc1a0..410e4b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,24 +5,31 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [2.3.2] - 2023-06-31 +## [2.3.3] - 2023-08-06 +### Fixed +- Fixed PALM error +- Enabled long term stats for sensors. Thanks @ajcollins +- Changed default setting for "old firmware" to True. + + +## [2.3.2] - 2023-07-31 ### Fixed - Fixed "SuperTimezone" error occuring on Docker installations - Fixed PALM ge.batcap error -- Fix CHargeslot start register offset error +- Fix Chargeslot start register offset error -## [2.3.1] - 2023-06-30 +## [2.3.1] - 2023-07-30 ### Fixed - REST api fixed to correct (dis)charge timeslot error -- Corrected Config page to clarify the Inverter_AC_X setting applies to all invertoers on "old" firmware +- Corrected Config page to clarify the Inverter_AC_X setting applies to all inverters on "old" firmware ### Added - Inverter frequency stats added - PALM updated to v1.0.0, imporving Smart Target (Thanks @salewis38) -## [2.3] - 2023-06-29 +## [2.3] - 2023-07-29 ### Breaking Change - Inverter_Max_Rate now called Inverter_Max_Bat_Rate diff --git a/Dockerfile b/Dockerfile index 15d2bd1..eaf192a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,15 +40,15 @@ ENV NUMINVERTORS=1 ENV INVERTOR_IP_1="" ENV NUMBATTERIES_1=1 ENV INVERTOR_AIO_1=False -ENV INVERTOR_AC_1=False +ENV INVERTOR_AC_1=True ENV INVERTOR_IP_2="" ENV NUMBATTERIES_2=1 ENV INVERTOR_AIO_2=False -ENV INVERTOR_AC_2=False +ENV INVERTOR_AC_2=True ENV INVERTOR_IP_3="" ENV NUMBATTERIES_3=1 ENV INVERTOR_AIO_3=False -ENV INVERTOR_AC_3=False +ENV INVERTOR_AC_3=True ENV MQTT_OUTPUT=True ENV MQTT_ADDRESS="" ENV MQTT_USERNAME="" diff --git a/GivTCP/palm_settings.py b/GivTCP/palm_settings.py index 492df3e..60e99a6 100644 --- a/GivTCP/palm_settings.py +++ b/GivTCP/palm_settings.py @@ -42,7 +42,7 @@ class GE: regCacheStack = pickle.load(inp) multi_output_old = regCacheStack[4] charge_rate=float(multi_output_old['Invertor_Details']['Invertor_Max_Bat_Rate'])/1000 - batt_capacity=float(multi_output_old['Invertor_Details']['Battery_Capacit_kWh']) + batt_capacity=float(multi_output_old['Invertor_Details']['Battery_Capacity_kWh']) else: charge_rate=2.5 # Nominal battery capacity diff --git a/GivTCP/palm_soc.py b/GivTCP/palm_soc.py index 21a8c58..4a9a3d3 100644 --- a/GivTCP/palm_soc.py +++ b/GivTCP/palm_soc.py @@ -428,8 +428,8 @@ def compute_tgt_soc(self, gen_fcast, weight: int, commit: bool): wgt_50 = weight - 10 wgt_90 = max(0, weight - 50) - logger.info("") - logger.info("{:<20} {:>10} {:>10} {:>10} {:>10} {:>10} {:>10}".format("SoC Calc;", + logger.debug("") + logger.debug("{:<20} {:>10} {:>10} {:>10} {:>10} {:>10} {:>10}".format("SoC Calc;", "Day", "Hour", "Charge", "Cons", "Gen", "SoC")) if stgs.GE.end_time != "": diff --git a/GivTCP/read.py b/GivTCP/read.py index 4256fd2..eda9525 100644 --- a/GivTCP/read.py +++ b/GivTCP/read.py @@ -709,7 +709,7 @@ def getData(fullrefresh): # Read from Inverter put in cache if exists(GivLUT.oldDataCount): os.remove(GivLUT.oldDataCount) - except: + except Exception: e = sys.exc_info() consecFails(e) logger.error("inverter Update failed so using last known good data from cache") @@ -808,18 +808,20 @@ def publishOutput(array, SN): if GiV_Settings.MQTT_Output: if GiV_Settings.first_run: # 09-July-23 - HA is seperated to seperate if check. +# Do this in a thread? updateFirstRun(SN) # 09=July=23 - Always do this first irrespective of HA setting. if GiV_Settings.HA_Auto_D: # Home Assistant MQTT Discovery logger.critical("Publishing Home Assistant Discovery messages") from HA_Discovery import HAMQTT HAMQTT.publish_discovery(tempoutput, SN) GiV_Settings.first_run = False # 09-July-23 - Always set firstrun irrespective of HA setting. - +# Do this in a thread? from mqtt import GivMQTT logger.debug("Publish all to MQTT") if GiV_Settings.MQTT_Topic == "": GiV_Settings.MQTT_Topic = "GivEnergy" GivMQTT.multi_MQTT_publish(str(GiV_Settings.MQTT_Topic+"/"+SN+"/"), tempoutput) +# Do this in a thread? if GiV_Settings.Influx_Output: from influx import GivInflux logger.debug("Pushing output to Influx") diff --git a/buildx.bat b/buildx.bat index a9b1ddd..1a2e172 100644 --- a/buildx.bat +++ b/buildx.bat @@ -1,3 +1,3 @@ -::docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 -t britkat/giv_tcp-dev:2.3.26 -t britkat/giv_tcp-dev:latest --push . +::docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 -t britkat/giv_tcp-dev:2.3.29 -t britkat/giv_tcp-dev:latest --push . ::docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 -t britkat/giv_tcp-dev:latest --push . -docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 -t britkat/giv_tcp-ma:latest -t britkat/giv_tcp-ma:2.3.2 --push . +docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 -t britkat/giv_tcp-ma:latest -t britkat/giv_tcp-ma:2.3.3 --push . diff --git a/config.yaml b/config.yaml index d5bb576..ef4c750 100644 --- a/config.yaml +++ b/config.yaml @@ -1,6 +1,6 @@ name: "GivTCP" description: "TCP Modbus connection to MQTT/JSON for Givenergy Battery/PV Invertors" -version: "2.3.2" +version: "2.3.3" image: britkat/giv_tcp-ma slug: "givtcp" homeassistant_api: true @@ -26,18 +26,18 @@ options: NUMINVERTORS: 1 INVERTOR_IP_1: "" INVERTOR_AIO_1: False - INVERTOR_AC_1: False + INVERTOR_AC_1: True NUMBATTERIES_1: 1 HADEVICEPREFIX: "GivTCP" INVERTOR_IP_2: "" NUMBATTERIES_2: 1 INVERTOR_AIO_2: False - INVERTOR_AC_2: False + INVERTOR_AC_2: True HADEVICEPREFIX_2: "GivTCP2" INVERTOR_IP_3: "" NUMBATTERIES_3: 1 INVERTOR_AIO_3: False - INVERTOR_AC_3: False + INVERTOR_AC_3: True HADEVICEPREFIX_3: "GivTCP3" MQTT_OUTPUT: True MQTT_ADDRESS: "core-mosquitto"