batpred icon indicating copy to clipboard operation
batpred copied to clipboard

Predbat 8.25.4 using GEcloud integration despite it being disabled

Open gcoan opened this issue 2 months ago • 4 comments

Describe the bug I noticed today that the real time register count on my inverters had increased from zero, and that real time registers was turned on on both of my inverters.

I've tracked it down to predbat turned it on via the GEcloud interface when I upgraded to 8.25.4:

2025-10-05 18:45:57.855752: Requested install of latest version v8.25.4
2025-10-05 18:45:57.857325: Update Predbat to version v8.25.4
...
2025-10-05 18:46:40.884173: Stopping Predbat
2025-10-05 18:46:40.885503: Predbat terminating
2025-10-05 18:46:41.887047: Predbat terminated
2025-10-05 18:46:43.198201: Info: Web socket stopping
2025-10-05 18:46:43.202228: Info: Web socket stopping
2025-10-05 18:47:05.632259: Loading apps.yaml
2025-10-05 18:47:05.669708: Predbat: Startup predbat hass version 2
2025-10-05 18:47:05.694814: --------------- PredBat - update at 2025-10-05 18:45:00+01:00 with clock skew 0 minutes, minutes now 1125
2025-10-05 18:47:05.695941: Config root is /config
2025-10-05 18:47:05.697326: --------------- PredBat - update at 2025-10-05 18:45:00+01:00 with clock skew 0 minutes, minutes now 1125
2025-10-05 18:47:05.697496: Initializing Home Assistant Interface interface
2025-10-05 18:47:05.707263: Info: Add-on slug is 6adb4f0d_predbat
2025-10-05 18:47:05.717888: Initializing Web Interface interface
2025-10-05 18:47:05.718050: Initializing GivEnergy Cloud Direct interface
2025-10-05 18:47:05.718104: Initializing plugin system
2025-10-05 18:47:05.718158: Scanning for plugins in: /config
2025-10-05 18:47:05.718261: Plugin discovery complete. Loaded 0 plugins.
2025-10-05 18:47:05.718281: Starting Home Assistant Interface interface
2025-10-05 18:47:05.718297: Creating task: <coroutine object HAInterface.start at 0x7fe8acc91780>
2025-10-05 18:47:05.721148: Info: Starting HA interface
2025-10-05 18:47:05.721504: Info: Start socket for url http://192.168.70.0:8123/api/websocket
2025-10-05 18:47:05.723851: HAInterface: Waiting for API to start
2025-10-05 18:47:05.723983: Starting Web Interface interface
2025-10-05 18:47:05.724011: Creating task: <coroutine object WebInterface.start at 0x7fe8ad17a350>
2025-10-05 18:47:05.730567: Web: Waiting for API to start
2025-10-05 18:47:05.732591: Info: Web Socket active
2025-10-05 18:47:06.731820: Starting GivEnergy Cloud Direct interface
2025-10-05 18:47:06.731991: Creating task: <coroutine object GECloudDirect.start at 0x7fe8ad56fdf0>
2025-10-05 18:47:06.739451: GECloud: Waiting for API to start
2025-10-05 18:47:07.348523: GECloud: Found device {'serial_number': 'WO2236G416', 'firmware_version': None, 'type': 'GPRS', 'commission_date': '2023-01-07T00:00:00Z', 'inverter': {'serial': 'SD2237G395', 'status': 'NORMAL', 'last_online': '2025-10-05T17:46:13Z', 'last_updated': '2025-10-05T17:46:47Z', 'commission_date': '2023-01-07T00:00:00Z', 'info': {'battery_type': 'LITHIUM', 'battery': {'nominal_capacity': 102, 'nominal_voltage': 51.2, 'depth_of_discharge': 1}, 'model': 'GIV-HY5.0', 'max_charge_rate': 2600, 'max_discharge_rate': 2600}, 'warranty': {'type': 'Standard', 'expiry_date': '2035-01-07T00:00:00Z'}, 'firmware_version': {'ARM': 187, 'DSP': 187}, 'connections': {'batteries': [{'module_number': 1, 'serial': 'BJ2238G271', 'firmware_version': 3022, 'capacity': {'full': 92.37, 'design': 102}, 'cell_count': 16, 'has_usb': True, 'nominal_voltage': 51.2}], 'meters': []}, 'flags': ['full-power-discharge-in-eco-mode', 'is-controllable']}, 'site_id': 21348}
2025-10-05 18:47:07.348823: GECloud: Found device {'serial_number': 'WO2236G995', 'firmware_version': None, 'type': 'GPRS', 'commission_date': '2023-01-07T00:00:00Z', 'inverter': {'serial': 'SD2237G182', 'status': 'NORMAL', 'last_online': '2025-10-05T16:00:56Z', 'last_updated': '2025-10-05T17:44:29Z', 'commission_date': '2023-01-07T00:00:00Z', 'info': {'battery_type': 'LITHIUM', 'battery': {'nominal_capacity': 186, 'nominal_voltage': 51.2, 'depth_of_discharge': 1}, 'model': 'GIV-HY5.0', 'max_charge_rate': 2600, 'max_discharge_rate': 2600}, 'warranty': {'type': 'Standard', 'expiry_date': '2035-01-07T00:00:00Z'}, 'firmware_version': {'ARM': 187, 'DSP': 187}, 'connections': {'batteries': [{'module_number': 1, 'serial': 'DX2327G139', 'firmware_version': 3015, 'capacity': {'full': 200, 'design': 186}, 'cell_count': 16, 'has_usb': True, 'nominal_voltage': 51.2}], 'meters': []}, 'flags': ['full-power-discharge-in-eco-mode', 'is-controllable']}, 'site_id': 21348}
2025-10-05 18:47:07.533630: GECloud: Starting up, found devices ['sd2237g395', 'sd2237g182'] evc_devices []
2025-10-05 18:47:08.742309: GECloud: Device sd2237g395 battery capacity 5.22 max charge rate 2600
2025-10-05 18:47:09.887005: GECloud: Device sd2237g182 battery capacity 9.52 max charge rate 2600
2025-10-05 18:47:35.674011: GECloud: Enabling real-time control for sd2237g395 as current value is False
2025-10-05 18:47:36.136076: GECloud: Enabling real-time control for sd2237g182 as current value is False

and in the givenergy portal log:

Image

in my apps.yaml I had GEcloud configured but disabled so I could easily swap to it in case of givtcp issues:

Image

Expected behaviour Predbat should not be making changes via the GEcloud integration when the integration is turned off 'geclouddata: false'

It is also repeatedly retrieving data from the cloud that appears in the logs, again shouldn't be doing this:

2025-10-05 18:56:26.729167: GECloud: Device sd2237g395 battery capacity 5.22 max charge rate 2600
2025-10-05 18:56:27.940871: GECloud: Device sd2237g182 battery capacity 9.52 max charge rate 2600
2025-10-05 18:57:29.305280: GECloud: Device sd2237g395 battery capacity 5.22 max charge rate 2600
2025-10-05 18:57:30.673202: GECloud: Device sd2237g182 battery capacity 9.52 max charge rate 2600
2025-10-05 18:58:32.340555: GECloud: Device sd2237g395 battery capacity 5.22 max charge rate 2600
2025-10-05 18:58:33.583100: GECloud: Device sd2237g182 battery capacity 9.52 max charge rate 2600

As a workaround I have commented out the gecloud entries in apps.yaml

Predbat version 8.25.4

Environment details HAOS 2025.9.3 Gen 1 hybrid x2

Log file predbat.3.log

gcoan avatar Oct 06 '25 11:10 gcoan

I commented out the three GECloud lines in my apps.yaml some time ago. It may have been its presence in log entries that prompted me. Although I had ge_cloud_data set as false, there was still activity related to GECloud.

Under the 'Remote Control' button, Real-time Control is turned on although I cannot remember doing this myself In Remote Control History, cannot see any entries showing Real-time control. I haven't turned off RTM but I do wonder whether I should do so.

My daily register writes are about 50.

Looking back through my last 10 logs, I have no entries linked to GECloud.

In WEbUI/Components, I do have an entry. I think that this option is being populated more with each release.

Image

Rob

SwiftRR avatar Oct 06 '25 13:10 SwiftRR

This is as expected, the data option defines if HA history is used or cloud history, but the you set the API key it will connect to the cloud.

springfall2008 avatar Oct 11 '25 16:10 springfall2008

This is as expected, the data option defines if HA history is used or cloud history, but the you set the API key it will connect to the cloud.

OK, its not the way I expected it to work, but I will update the documentation to make it clearer

gcoan avatar Oct 11 '25 19:10 gcoan

Hi @springfall2008 it is partly as you say, setting ge_cloud_data controls whether predbat uses cloud data or local (HA) data.

And setting the API key gives Predbat access to ge_cloud.

I have tidied up the documentation (will be in my next PR)

However, having gone through the code I think I see what the problem is. The docs and template apps.yaml mention boolean values for ge_cloud_direct and ge_cloud_automatic, but whilst these are defined in the config.py, they are never used in gecloud.py or predbat.py (or anywhere else in the predbat code).

What I think should be happening is that predbat should not be trying to communicate with the ge cloud unless ge_cloud_direct is set to True (this check is currently missing from the code), and it should be trying to auto configure if ge_cloud_automatic is set to True, or else using ge_cloud_serial (this check is also missing, the code appears to auto configure always unless ge_cloud_serial is set).

Its ge_cloud_direct:False I needed to set (was muddling this up with ge_cloud_data), but per the above the code checks for this are missing

gcoan avatar Oct 11 '25 22:10 gcoan