britkat1980 / giv_tcp

TCP connection (from inverter) and MQTT implementation
71 stars 32 forks source link

3 phase Gen 3 inverter. When will GivTCP be compatible? #186

Open LeeFarm11 opened 1 month ago

LeeFarm11 commented 1 month ago

Hi. I had an 11kW 3 phase Gen 3 inverter installed at end of February. As far as I can tell GivTCP is not yet able to communicate with the inverter. Is there a timescale of when it will be added to GivTCP please?

britkat1980 commented 1 month ago

There is a WIP version in the Beta branch of the addon. Add the following repo to the addon store and install the Beta version. Feedback welcome, there's only been limited testing (as I don't have a 3ph).

https://github.com/britkat1980/ha-addons

tonka-truck commented 1 month ago

Hi @britkat1980, Thanks for this. I also have a Gen1 Hybrid 3 phase and having found this thread have installed. After a school boy error of not rebooting HA, I'm now able to run GivTCP and this populates data within MQTT (mosquito on HA).

I get the following error message though in GivTCP Inv1 - read - [ERROR ] - Battery Object empty so skipping

Both Battery_Details and bcu_1 data are being published in MQTT with numbers which appear correct so I'm not sure where this error is.

Not sure if related or not, but the web page also does not load - with no apparent error messages in the log.

tonka-truck commented 1 month ago

I've been looking into this a little more and it could be a problem with how the battery data (although as a rank amateur I could be well off the mark) is being captured.

The MQTT raw inverter data picks up the first battery serial number (not sure if all battery serial numbers should be found here?), however raw batteries bcu_1 identifies the number of modules and cells but the serial number for each battery is not being captured, this means that the first battery v_cell and t_cell data is captured against a blank battery serial number and the remaining batteries are skipped.

Hope this helps.

tonka-truck commented 1 month ago

I've updated my inverter to DA0.003-DD0.003-A0.003 and battery to 2 and now can no longer connect via GivTCP to my inverter with repeated timeout error messages. Tried obvious rebooting of both inverter and HomeAssistant but no joy.

LeeFarm11 commented 1 month ago

I think I have same problem. For about a week or more I have not been able to get any sensor or settings readings. I have tried latest dev and latest beta both with correct IP address which is fixed IP. But everything in Overview says 'unknown'. I just get constant time outs in the log. image

britkat1980 commented 1 month ago

Ah ok, looks like it’s dying when checking for meters… it should handle that gracefully, but seems like it’s not! Let me take a look

britkat1980 commented 1 month ago

Actually, that’s not quite true, it seems to continue after that, but what do you get with debug logging on? I want to see how far it’s getting in the process.

tonka-truck commented 1 month ago

Please see below:

2024-05-29 10:55:27,055 - startup - [DEBUG] - SUPERVISOR_TOKEN is: 86429bbf67722ebd2cbe564afd459fff6a62c07f330e2fe706e89cd733ff48e73f1ebc5d8e8aba7e993275d2eac57f517ede27c21b423788 2024-05-29 10:55:27,059 - startup - [CRITICAL] - HA MQTT Service has been found at core-mosquitto 2024-05-29 10:55:27,062 - startup - [INFO] - Supervisor Timezone: Europe/London 2024-05-29 10:55:29,067 - startup - [INFO] - Searching for Inverters 2024-05-29 10:55:29,067 - startup - [DEBUG] - Networks available for scanning are: {0: '192.168.73.1'} 2024-05-29 10:55:29,068 - startup - [CRITICAL] - Scanning network for GivEnergy Devices... 2024-05-29 10:55:29,068 - startup - [DEBUG] - EVC- Scanning network (1):192.168.73.1 2024-05-29 10:55:30,186 - startup - [DEBUG] - EVC- Scanning network (2):192.168.73.1 2024-05-29 10:55:31,303 - startup - [DEBUG] - INV- Scanning network (1):192.168.73.1 2024-05-29 10:55:39,687 - startup - [DEBUG] - 1 Inverters found on 192.168.73.1 - {1: '192.168.73.41'} 2024-05-29 10:55:39,688 - startup - [DEBUG] - Getting inverter stats for: 192.168.73.41 2024-05-29 10:56:16,004 - givenergy_modbus_async.client.client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x04 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:56:16,007 - startup - [ERROR] - Gathering inverter details for 192.168.73.41 failed. 2024-05-29 10:56:52,320 - givenergy_modbus_async.client.client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x04 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:56:52,320 - startup - [ERROR] - Gathering inverter details for 192.168.73.41 failed. 2024-05-29 10:56:52,324 - startup - [DEBUG] - GivTCP isAddon: True 2024-05-29 10:56:52,325 - startup - [DEBUG] - Config directory already exists 2024-05-29 10:56:52,326 - startup - [CRITICAL] - Running Redis 2024-05-29 10:56:52,339 - startup - [CRITICAL] - Running Config Frontend 2024-05-29 10:56:52,341 - startup - [CRITICAL] - Setting up invertor: 1 of 1 2024-05-29 10:56:52,384 - startup - [DEBUG] - Copying in a template settings.json 2024-05-29 10:56:52,386 - startup - [DEBUG] - Recreating settings.json for invertor 1 2024-05-29 10:56:52,387 - startup - [DEBUG] - Using found MQTT data to autosetup settings.json 2024-05-29 10:56:52,387 - startup - [DEBUG] - Using found Inverter data to autosetup settings.json 2024-05-29 10:56:52,388 - startup - [DEBUG] - Recreating settings.py for invertor 1 2024-05-29 10:56:52,390 - startup - [CRITICAL] - Running RQ worker to queue and process givernergy-modbus calls 2024-05-29 10:56:52,390 - startup - [CRITICAL] - Running Invertor (192.168.73.41) read loop every 30/120s 2024-05-29 10:56:52,393 - startup - [CRITICAL] - Subscribing MQTT Broker for control 2024-05-29 10:56:52,397 - startup - [CRITICAL] - Starting Gunicorn on port 6345 [2024-05-29 10:56:53 +0100] [78] [INFO] Starting gunicorn 22.0.0 [2024-05-29 10:56:53 +0100] [78] [INFO] Listening at: http://0.0.0.0:6345 (78) [2024-05-29 10:56:53 +0100] [78] [INFO] Using worker: sync [2024-05-29 10:56:53 +0100] [85] [INFO] Booting worker with pid: 85 [2024-05-29 10:56:53 +0100] [86] [INFO] Booting worker with pid: 86 [2024-05-29 10:56:53 +0100] [87] [INFO] Booting worker with pid: 87 2024-05-29 10:56:54,418 - Inv1 - selector_events - [DEBUG ] - Using selector: EpollSelector 2024-05-29 10:56:54,422 - Inv1 - read - [INFO ] - Starting watch_plant loop... 2024-05-29 10:56:54,428 - Inv1 - read - [CRITICAL] - Detecting inverter charateristics... 2024-05-29 10:56:54,775 - Inv1 - mqtt_client - [CRITICAL] - Connecting to MQTT broker for control- core-mosquitto

givtcp-vuejs@0.0.0 dev vite --host -l silent

2024-05-29 10:57:31,023 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x04 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:57:31,035 - Inv1 - read - [ERROR ] - Error in inital detect/refresh: (<class 'TimeoutError'>, TimeoutError(), <traceback object at 0x7fe4fd006c80>) 2024-05-29 10:57:31,037 - Inv1 - read - [INFO ] - Starting watch_plant loop... 2024-05-29 10:57:31,045 - Inv1 - read - [CRITICAL] - Detecting inverter charateristics... 2024-05-29 10:57:31,266 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x05 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:57:31,518 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x06 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:57:31,768 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x07 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:57:32,260 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x08 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:58:07,362 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x04 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:58:07,372 - Inv1 - read - [ERROR ] - Error in inital detect/refresh: (<class 'TimeoutError'>, TimeoutError(), <traceback object at 0x7fe4fd01e800>) 2024-05-29 10:58:07,374 - Inv1 - read - [INFO ] - Starting watch_plant loop... 2024-05-29 10:58:07,381 - Inv1 - read - [CRITICAL] - Detecting inverter charateristics... 2024-05-29 10:58:07,612 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x05 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:58:07,863 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x06 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:58:08,114 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x07 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:58:08,366 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x08 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:58:43,707 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x04 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:58:43,713 - Inv1 - read - [ERROR ] - Error in inital detect/refresh: (<class 'TimeoutError'>, TimeoutError(), <traceback object at 0x7fe4fd01f800>) 2024-05-29 10:58:43,713 - Inv1 - read - [INFO ] - Starting watch_plant loop... 2024-05-29 10:58:43,720 - Inv1 - read - [CRITICAL] - Detecting inverter charateristics... 2024-05-29 10:58:43,953 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x05 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:58:44,203 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x06 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:58:44,454 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x07 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:58:44,705 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x08 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:59:20,054 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x04 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:59:20,059 - Inv1 - read - [ERROR ] - Error in inital detect/refresh: (<class 'TimeoutError'>, TimeoutError(), <traceback object at 0x7fe4fd020e80>) 2024-05-29 10:59:20,060 - Inv1 - read - [INFO ] - Starting watch_plant loop... 2024-05-29 10:59:20,063 - Inv1 - read - [CRITICAL] - Detecting inverter charateristics... 2024-05-29 10:59:20,303 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x05 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:59:20,554 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x06 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:59:20,805 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x07 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:59:21,057 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x08 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:59:56,372 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x04 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:59:56,373 - Inv1 - read - [ERROR ] - Error in inital detect/refresh: (<class 'TimeoutError'>, TimeoutError(), <traceback object at 0x7fe4fd021f80>) 2024-05-29 10:59:56,375 - Inv1 - read - [INFO ] - Starting watch_plant loop... 2024-05-29 10:59:56,378 - Inv1 - read - [CRITICAL] - Detecting inverter charateristics... 2024-05-29 10:59:56,622 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x05 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:59:56,872 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x06 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:59:57,124 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x07 base_register=60) after 11 tries at 3s, giving up 2024-05-29 10:59:57,375 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x08 base_register=60) after 11 tries at 3s, giving up 2024-05-29 11:00:32,688 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x04 base_register=60) after 11 tries at 3s, giving up 2024-05-29 11:00:32,689 - Inv1 - read - [ERROR ] - Error in inital detect/refresh: (<class 'TimeoutError'>, TimeoutError(), <traceback object at 0x7fe4fd022200>) 2024-05-29 11:00:32,691 - Inv1 - read - [INFO ] - Starting watch_plant loop... 2024-05-29 11:00:32,696 - Inv1 - read - [CRITICAL] - Detecting inverter charateristics... 2024-05-29 11:00:32,939 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x05 base_register=60) after 11 tries at 3s, giving up 2024-05-29 11:00:33,190 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x06 base_register=60) after 11 tries at 3s, giving up 2024-05-29 11:00:33,440 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x07 base_register=60) after 11 tries at 3s, giving up 2024-05-29 11:00:33,691 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x08 base_register=60) after 11 tries at 3s, giving up 2024-05-29 11:01:04,978 - Inv1 - mqtt_client - [ERROR ] - No serial_number found in MQTT queue. MQTT Control not available. Double check logs for connection errors and restart GivTCP or ensure correct AIO/firmware settings 2024-05-29 11:01:12,265 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x04 base_register=60) after 11 tries at 3s, giving up 2024-05-29 11:01:12,267 - Inv1 - read - [ERROR ] - Error in inital detect/refresh: (<class 'TimeoutError'>, TimeoutError(), <traceback object at 0x7fe4fd023e40>) 2024-05-29 11:01:12,269 - Inv1 - read - [INFO ] - Starting watch_plant loop... 2024-05-29 11:01:12,271 - Inv1 - read - [CRITICAL] - Detecting inverter charateristics... 2024-05-29 11:01:12,516 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x05 base_register=60) after 11 tries at 3s, giving up 2024-05-29 11:01:12,766 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x06 base_register=60) after 11 tries at 3s, giving up 2024-05-29 11:01:13,017 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x07 base_register=60) after 11 tries at 3s, giving up 2024-05-29 11:01:13,268 - Inv1 - client - [CRITICAL] - Timeout awaiting 2:4/ReadInputRegistersResponse(slave_address=0x08 base_register=60) after 11 tries at 3s, giving up

britkat1980 commented 1 month ago

Ok, so it is meter data failing… not sure why it’s not handling gracefully, I’ll look at this and push out a new dev build today/tomorrow

britkat1980 commented 1 month ago

Try dev version 2.4.269, should now work...

tonka-truck commented 1 month ago

2.4.269 starts up again and passes data to HA dashboard - yah.

Unfortunately enabling the web interface it fails and does not start with the following as the final error message

2024-05-29 13:45:42,587 - Inv1 - mqtt_client - [ERROR ] - No serial_number found in MQTT queue. MQTT Control not available. Double check logs for connection errors and restart GivTCP or ensure correct AIO/firmware settings

LeeFarm11 commented 1 month ago

I too now have readings. Except - all the power readings are bak to 10x too high which was fixed in DEV 262 but seems now broken again, Like this - image

and all the readings of all batteries are still 0C and 0V. Like this - image

LeeFarm11 commented 1 month ago

Hi. In the GivTCP Inverter Details section I have some strange readings. I have a few Unknowns -

GivTCP Battery Priority GivTCP DC Status GivTCP Inverter Time GivTCP System Mode

GivTCP Inverter Firmware is showing the wrong version. Showing D0.0-A0.0 but I have image

GivTCP Inverter Type shows as Gen 1 - Hybrid_3ph but I believe it is Gen 3.