Mine worked fine for charging the car yesterday but the battery didn’t charge overnight,despite the schedule. Not sure why yet.
Firstly a disclosure: I’m a OpenHAB user but hanging arose here to see how the other half does it.
I’m using GivTCP via an execution call rather than to drive REST or MQTT. I have noticed an issue with the GivEnergy system where I can change parameters (eg charging time or target SoC) only to find they randomly revert, sometimes a day or more later.
I’ve had it when making changes with either the app or GivTCP. Technical support have finally acknowledged the issue but haven’t yet suggested a solution. If you have log files that show parameters changing without your intervention then it might be helpful to send them in so they get more perspectives on what it going on.
Thanks. Oddly it now isn’t discharging either, so:
2 days ago teh 8kWh battery discgharged from 100% to empty in 1 kWh, then charged full with the same
Yesterday it stayed full and didn’t discharge
This morning it shows 96% full, no discharge.
All of which is a bit odd
Hi Mark
I saw there was a new image pushed - 2022.03.12 and updated my system to run it but unfortunately, it would not return valid data with the following logs:
/app/GivTCP/settings.py does not exist, creating.
Running Invertor read loop every 10s…
1647340430: mosquitto version 2.0.11 starting
1647340430: Config loaded from /app/GivTCP/mqtt.conf.
1647340430: Opening ipv4 listen socket on port 1883.
1647340430: mosquitto version 2.0.11 running
Starting Mosquitto on port 1883
Starting Gunicorn on port 6345
[2022-03-15 10:33:50 +0000] [9] [INFO] Starting gunicorn 20.1.0
[2022-03-15 10:33:50 +0000] [9] [INFO] Listening at: http://0.0.0.0:6345 (9)
[2022-03-15 10:33:50 +0000] [9] [INFO] Using worker: sync
[2022-03-15 10:33:50 +0000] [10] [INFO] Booting worker with pid: 10
[2022-03-15 10:33:50 +0000] [11] [INFO] Booting worker with pid: 11
[2022-03-15 10:33:50 +0000] [12] [INFO] Booting worker with pid: 12
ERROR:GivTCP:Lockfile set so aborting getData
ERROR:GivTCP:Lockfile set so aborting getData
ERROR:givenergy_modbus:Did not receive expected response type: ReadHoldingRegistersResponse != ErrorResponse
ERROR:givenergy_modbus:Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response
NoneType: None
ERROR:givenergy_modbus:Did not receive expected response type: ReadInputRegistersResponse != ModbusIOException
ERROR:GivTCP:Error collecting registers: (<class ‘KeyError’>, KeyError(HR:120), <traceback object at 0x7feeac1b0680>)
ERROR:GivTCP:Removing lock file due to read error
ERROR:GivTCP:Lockfile set so aborting getData
ERROR:GivTCP:Lockfile set so aborting getData
I reverted to the prior image (:test - -19 days) and all is good again. Undoubtedly something I missed…
The error is suggesting that there is a lock file set in the container (possibly a dead file left by mistake) if you conclusive into the container and delete .lockfile it should run.
Thanks - I’ll give that a go when I get home later.
Hi,
Appologies for replying to an old comment but just want to check my understanding of this comment.
Are you saying that eventually (and I’m not asking for ETA here), this custom component might eventually get developed into an auto discoverable component within HA that is much more plug and play? Or are you saying it will always be a custom component but one that doesn’t require docker and all the other stuff to get properly working?
I’m pretty much a HA noobie with disparate tech bought together in HA currently. I’m looking at getting a solar + battery solution at my home and the primary battery that the installer I’m looking at uses in GivEnergy. They also install SolarEdge but I can see this is Cloud Polling and limited to 300 requests a day, Tesla Powerwall (though this is probably cost prohibative for me) and they are looking at Fox ESS which doesn’t seem to have an integration.
Just trying to figure out what my best option would be whilst I still have the option to decide which brands I want to bring into my home / home assistant world.
The current version of GivTCP (which is run as a separate docker) can publish mqtt auto-discovery and if you run it, point it to your HA MQTT broker it will auto create all the entities and devices you need
Thanks,
I’ve not used MQTT but definately something I can look into if I were to go down the GivEnergy route. From what I can see, the GivEnergy battery with local polling rather than cloud based would be the best option batterywise for my circumstances so appreciate all the hard work all you guys have done getting this to where it is!
Ok - I looked and there was a .lockfile which I deleted, but it re-appeared roughly 1 minute later and either way no stats were returned. Aside that is from the control-mode value which on “test” is 1 and on “2022.3.12” is “eco”.
If I am moving from the “test” image is there anything else I should be doing other than pulling the new one and downing the old?
The old one is doing what I need very nicely but I’m always nervous about getting behind and later hitting a breaking change
Running the latest givtcp on docker, my house battery hasn’t discharged for 2 days. Discharge enable is set to enable (though it was on disable briefly) and I’ve tried every mode. Any ideas?
Is the discharge rate set to 100%?
Yes it is. Output from Runall
{ “Battery_Details”: { “BG2103G098”: { “Battery_Capacity”: 29.86, “Battery_Cell_10_Voltage”: 3.225, “Battery_Cell_11_Voltage”: 3.229, “Battery_Cell_12_Voltage”: 3.229, “Battery_Cell_13_Voltage”: 3.23, “Battery_Cell_14_Voltage”: 3.224, “Battery_Cell_15_Voltage”: 3.227, “Battery_Cell_16_Voltage”: 3.229, “Battery_Cell_1_Temperature”: 11.5, “Battery_Cell_1_Voltage”: 3.224, “Battery_Cell_2_Temperature”: 10.4, “Battery_Cell_2_Voltage”: 3.227, “Battery_Cell_3_Temperature”: 10.7, “Battery_Cell_3_Voltage”: 3.227, “Battery_Cell_4_Temperature”: 10.0, “Battery_Cell_4_Voltage”: 3.225, “Battery_Cell_5_Voltage”: 3.225, “Battery_Cell_6_Voltage”: 3.225, “Battery_Cell_7_Voltage”: 3.229, “Battery_Cell_8_Voltage”: 3.227, “Battery_Cell_9_Voltage”: 3.229, “Battery_Cells”: 16, “Battery_Cycles”: 357, “Battery_Design_Capacity”: 158.72, “Battery_Firmware_Version”: 3005, “Battery_Remaining_Capcity”: 26.6, “Battery_SOC”: 89, “Battery_Serial_Number”: “BG2103G098”, “Battery_Temperature”: 12.5, “Battery_USB_present”: true, “Battery_Voltage”: 51.617 } }, “Control”: { “Battery_Charge_Rate”: 100, “Battery_Discharge_Rate”: 100, “Battery_Power_Reserve”: 100, “Enable_Charge_Schedule”: “enable”, “Enable_Discharge”: “enable”, “Enable_Discharge_Schedule”: “enable”, “Mode”: “Unknown”, “Target_SOC”: 100 }, “Energy”: { “Today”: { “AC_Charge_Energy_Today_kWh”: 0.1, “Battery_Charge_Energy_Today_kWh”: 0.1, “Battery_Discharge_Energy_Today_kWh”: 0.0, “Battery_Throughput_Today_kWh”: 0.1, “Export_Energy_Today_kWh”: 10.4, “Import_Energy_Today_kWh”: 17.9, “Invertor_Energy_Today_kWh”: 15.3, “Load_Energy_Today_kWh”: 22.7, “PV_Energy_Today_kWh”: 14.9, “Self_Consumption_Energy_Today_kWh”: 4.5 }, “Total”: { “AC_Charge_Energy_Total_kWh”: 1233.4, “Battery_Charge_Energy_Total_kWh”: 1576.2, “Battery_Discharge_Energy_Total_kWh”: 1479.6, “Battery_Throughput_Total_kWh”: 3055.8, “Export_Energy_Total_kWh”: 1193.3, “Import_Energy_Total_kWh”: 4746.2, “Invertor_Energy_Total_kWh”: 3332.1, “Load_Energy_Total_kWh”: 5651.599999999999, “PV_Energy_Total_kWh”: 2390.8, “Self_Consumption_Energy_Total_kWh”: 1197.5000000000002 } }, “Invertor_Details”: { “Battery_Capacity_kWh”: 8.192, “Battery_Type”: “Lithium”, “Invertor_Serial_Number”: “SA2103G193”, “Invertor_Temperature”: 21.1, “Invertor_Type”: “Hybrid”, “Meter_Type”: “EM115”, “Modbus_Version”: 1.4 }, “Last_Updated_Time”: “2022-03-15T20:43:17.571884+00:00”, “Power”: { “Flows”: { “Battery_to_Grid”: 0, “Battery_to_House”: 0, “Grid_to_Battery”: 0, “Grid_to_House”: 661, “Solar_to_Battery”: 0, “Solar_to_Grid”: 0, “Solar_to_House”: 0 }, “Power”: { “AC_Charge_Power”: 0, “Battery_Power”: 0, “Charge_Power”: 0, “Discharge_Power”: 0, “EPS_Power”: 0, “Export_Power”: 0, “Grid_Power”: -661, “Import_Power”: 661, “Invertor_Power”: 0, “Load_Power”: 661, “PV_Power”: 0, “PV_Power_String_1”: 0, “PV_Power_String_2”: 0, “PV_Voltage_String_1”: 11.4, “PV_Voltage_String_2”: 0.3, “SOC”: 92, “Self_Consumption_Power”: 0 } }, “Time_Since_Last_Update”: 4.820247, “Timeslots”: { “Charge_end_time_slot_1”: “04:29:00”, “Charge_end_time_slot_2”: “00:04:00”, “Charge_start_time_slot_1”: “00:30:00”, “Charge_start_time_slot_2”: “00:01:00”, “Discharge_end_time_slot_1”: “23:00:00”, “Discharge_end_time_slot_2”: “18:00:00”, “Discharge_start_time_slot_1”: “16:00:00”, “Discharge_start_time_slot_2”: “00:00:00” }, “raw”: { “batteries”: {}, “invertor”: { “active_power_rate”: 100, “arm_firmware_version”: 451, “battery_charge_limit”: 50, “battery_discharge_limit”: 50, “battery_discharge_min_power_reserve”: 100, “battery_low_force_charge_time”: 6, “battery_nominal_capacity”: 160.0, “battery_percent”: 92, “battery_power_mode”: 1, “battery_soc_reserve”: 4, “battery_type”: 1, “battery_voltage_adjust”: 0, “charge_and_discharge_soc”: [ 0, 3 ], “charge_slot_1”: [ “00:30:00”, “04:29:00” ], “charge_slot_2”: [ “00:01:00”, “00:04:00” ], “charge_soc_stop_1”: 0, “charge_soc_stop_2”: 0, “charge_status”: 0, “charge_target_soc”: 100, “charger_warning_code”: 0, “ct_adjust”: 2, “dci_1_i”: 0.0, “dci_1_time”: 0, “dci_2_i”: 0.0, “dci_2_time”: 0, “device_type_code”: “2001”, “discharge_slot_1”: [ “16:00:00”, “23:00:00” ], “discharge_slot_2”: [ “00:00:00”, “18:00:00” ], “discharge_soc_stop_1”: 0, “discharge_soc_stop_2”: 0, “dsp_firmware_version”: 450, “e_battery_charge_day”: 0.1, “e_battery_charge_day_2”: 0.0, “e_battery_charge_total”: 0.0, “e_battery_discharge_day”: 0.0, “e_battery_discharge_day_2”: 0.0, “e_battery_discharge_total”: 0.0, “e_battery_throughput_total”: 3055.8, “e_discharge_year”: 0.0, “e_grid_in_day”: 17.9, “e_grid_in_total”: 4746.2, “e_grid_out_day”: 10.4, “e_grid_out_total”: 1193.3, “e_inverter_in_day”: 0.1, “e_inverter_in_total”: 1233.4, “e_inverter_out_day”: 15.3, “e_inverter_out_total”: 3332.1, “e_pv1_day”: 14.9, “e_pv2_day”: 0.0, “e_pv_total”: 2390.8, “e_solar_diverter”: 0.0, “enable_60hz_freq_mode”: false, “enable_ammeter”: true, “enable_auto_judge_battery_type”: true, “enable_bms_read”: true, “enable_buzzer”: false, “enable_charge”: true, “enable_charge_target”: true, “enable_discharge”: true, “enable_drm_rj45_port”: true, “f_ac1”: 50.09, “f_ac_high_c”: 52.0, “f_ac_high_in”: 52.0, “f_ac_high_in_time”: 28, “f_ac_high_out”: 51.98, “f_ac_high_out_time”: 28, “f_ac_low_c”: 47.0, “f_ac_low_in”: 47.45, “f_ac_low_in_time”: 948, “f_ac_low_out”: 47.0, “f_ac_low_out_time”: 24, “f_eps_backup”: 50.08, “fault_code”: 0, “firmware_version”: “D0.450-A0.451”, “first_battery_bms_firmware_version”: 3005, “first_battery_serial_number”: “BG2103G098”, “gfci_1_i”: 0.0, “gfci_1_time”: 0, “gfci_2_i”: 0.0, “gfci_2_time”: 0, “grid_power_adjust”: 0, “grid_r_voltage_adjust”: 0, “grid_s_voltage_adjust”: 0, “grid_t_voltage_adjust”: 0, “i_ac1”: 0.0, “i_battery”: 0.0, “i_grid_port”: 3.61, “i_pv1”: 0.0, “i_pv2”: 0.0, “inverter_countdown”: 30, “inverter_modbus_address”: 17, “inverter_model”: “Hybrid”, “inverter_module”: 198706, “inverter_restart_delay_time”: 30, “inverter_serial_number”: “SA2103G193”, “inverter_start_time”: 30, “inverter_state”: [ 0, 1 ], “inverter_status”: 0, “island_check_continue”: 0, “meter_type”: 1, “modbus_version”: 1.4, “num_mppt”: 2, “num_phases”: 1, “p_battery”: 0, “p_eps_backup”: 0, “p_grid_apparent”: 879, “p_grid_out”: -661, “p_grid_port_max_output”: 6000, “p_inverter_out”: 0, “p_load_demand”: 661, “p_pv1”: 0, “p_pv2”: 0, “pf_inverter_out”: -0.751, “power_factor”: -1, “pv1_power_adjust”: 0, “pv1_voltage_adjust”: 0, “pv2_power_adjust”: 0, “pv2_voltage_adjust”: 0, “reactive_power_rate”: 0, “reverse_115_meter_direct”: false, “reverse_418_meter_direct”: false, “select_arm_chip”: false, “soc_force_adjust”: 0, “system_mode”: 1, “system_time”: “2022-03-15 20:43:38”, “temp_battery”: 11.0, “temp_charger”: 21.5, “temp_inverter_heatsink”: 21.1, “usb_device_inserted”: 2, “v_ac1”: 241.8, “v_ac_high_c”: 283.7, “v_ac_high_in”: 262.0, “v_ac_high_in_time”: 52, “v_ac_high_out”: 274.0, “v_ac_high_out_time”: 27, “v_ac_low_c”: 175.5, “v_ac_low_in”: 184.0, “v_ac_low_in_time”: 126, “v_ac_low_out”: 184.0, “v_ac_low_out_time”: 126, “v_battery”: 50.22, “v_battery_over_protection_limit”: 58.5, “v_battery_under_protection_limit”: 43.2, “v_eps_backup”: 239.2, “v_highbrigh_bus”: 9, “v_n_bus”: 0.0, “v_p_bus”: 66.2, “v_pv1”: 11.4, “v_pv2”: 0.3, “v_pv_input_start”: 150.0, “work_time_total”: 5450 } }, “status”: “online” }
Your Battery_Power_Reserve is set to 100. This means the invertor won’t let the battery discharge below 100%! This should normally be 4%
Set it to 4 and it should then Discharge as expected
Spotted! Wonder how it did that. Not deliberately changed. Thanks
/idiot
Changed it to 4, still not discharging.
Did this get resolved?
Battery completely failed and they installed a new one just now!
Are you setting up a new sensor here, or just overriding the existing one?
I’ve created a state of charge sensor based on kWh which I wanted as an alternative to the %
- platform: template
sensors:
givtcp_battery_soc_kwh:
value_template: "{{ ((states.sensor.givtcp_battery_soc['state']|float) / 100 * (states.sensor.givtcp_battery_capacity_kwh['state']|float))|round(2) }}"
unit_of_measurement: "kWh"
friendly_name: "Battery kWh"