SunGather to PVOutput timing issues

Hi all,

I’m hoping someone can point me in the right direction using SunGather docker container to upload date from a Sungrow SG5.0RS inverter using modbus tcp on port 502.

Problem:
Data points with 0 values all except for voltage, which seems to copy the previous record uploaded.

Things tried:
Changing timing of the inverter polling from 30sec back to 25sec, intil I found 26sec misses the least amount of points. With 30sec I have a 0 value every hour.

Changing rate limit from 60 to 300 made no difference.

Data upload output:
It seems the correct data is being uploaded, but possibly to late/early?
Below is a typical data format.

Correct page for date below:
https://pvoutput.org/intraday.jsp?id=131598&sid=111607&dt=20260221

2026-02-21 11:55:17 DEBUG    PVOutput: Request; https://pvoutput.org/service/r2/addbatchstatus.jsp, {'X-Pvoutput-Apikey': 'XXXXXXX', 'X-Pvoutput-SystemId': 'XXXXXX', 'Content-Type': 'application/x-www-form-urlencoded', 'cache-control': 'no-cache'} : {'data': '20260221,11:55,,2732,,552,,242.3,,,,,,', 'c1': 1}

2026-02-21 11:55:17 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	11:55:00	2732	552	242.3	 'c1': 1}
2026-02-21 12:00:47 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	12:00:00	3277	568	244.6	 'c1': 1}
2026-02-21 12:06:17 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	12:06:00	3494	623	243.7	 'c1': 1}
2026-02-21 12:11:47 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	12:11:00	3480	669	244.5	 'c1': 1}
2026-02-21 12:17:17 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	12:17:00	3475	570	243.8	 'c1': 1}
2026-02-21 12:22:47 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	12:22:00	3502	626	243.8	 'c1': 1}
2026-02-21 12:28:17 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	12:28:00	3563	788	243.9	 'c1': 1}
2026-02-21 12:33:47 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	12:33:00	3524	614	243.4	 'c1': 1}
2026-02-21 12:39:17 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	12:39:00	3268	479	242.8	 'c1': 1}
2026-02-21 12:44:47 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	12:44:00	3375	467	243.9	 'c1': 1}
2026-02-21 12:50:17 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	12:50:00	3415	684	243.6	 'c1': 1}
2026-02-21 12:55:47 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	12:55:00	2939	411	242.4	 'c1': 1}
2026-02-21 13:01:17 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	13:01:00    3230	636	242.9	 'c1': 1}
2026-02-21 13:06:47 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	13:06:00	3203	574	242.5	 'c1': 1}
2026-02-21 13:12:17 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	13:12:00	3278	474	242.3	 'c1': 1}
2026-02-21 13:17:47 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	13:17:00	3092	466	240.3	 'c1': 1}
2026-02-21 13:23:17 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	13:23:00	3131	614	241.1	 'c1': 1}
2026-02-21 13:28:47 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	13:28:00	3209	466	242.4	 'c1': 1}
2026-02-21 13:34:17 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	13:34:00	2940	569	242.1	 'c1': 1}
2026-02-21 13:35:10 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	13:35:00	2990	647	243.1	 'c1': 1}
2026-02-21 13:40:22 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	13:40:00	3007	511	243.7	 'c1': 1}
2026-02-21 13:45:34 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	13:45:00	2974	698	243.7	 'c1': 1}
2026-02-21 13:50:46 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	13:50:00	2973	604	242.6	 'c1': 1}
2026-02-21 13:55:58 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	13:55:00	3110	651	241.8	 'c1': 1}
2026-02-21 14:01:10 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	14:01:00	3324	680	241.7	 'c1': 1}
2026-02-21 14:06:22 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	14:06:00	3468	637	242.4	 'c1': 1}
2026-02-21 14:11:34 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	14:11:00	3643	676	243.3	 'c1': 1}
2026-02-21 14:16:46 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	14:16:00	3693	576	242.7	 'c1': 1}
2026-02-21 14:21:58 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	14:21:00	3582	545	243	     'c1': 1}
2026-02-21 14:27:10 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	14:27:00	3544	583	242.4	 'c1': 1}
2026-02-21 14:32:22 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	14:32:00	3592	634	242.4	 'c1': 1}
2026-02-21 14:37:34 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	14:37:00	3620	719	242.6	 'c1': 1}
2026-02-21 14:42:46 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	14:42:00	3536	553	243.8	 'c1': 1}
2026-02-21 14:47:58 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	14:47:00	3484	541	243	     'c1': 1}
2026-02-21 14:53:10 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	14:53:00	3476	501	242.7	 'c1': 1}
2026-02-21 14:58:22 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	14:58:00	3218	610	241.4	 'c1': 1}
2026-02-21 15:03:34 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	15:03:00	3424	527	241.6	 'c1': 1}
2026-02-21 15:03:57 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	15:03:00	3566	411	242.2	 'c1': 1}
2026-02-21 15:09:19 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	15:09:00	3428	531	242.1	 'c1': 1}
2026-02-21 15:14:41 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	15:14:00	3348	507	243.1	 'c1': 1}
2026-02-21 15:20:03 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	15:20:00	3157	532	242.8	 'c1': 1}
2026-02-21 15:25:25 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	15:25:00	3541	531	242.1	 'c1': 1}
2026-02-21 15:30:47 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	15:30:00	3326	533	241.4	 'c1': 1}
2026-02-21 15:34:07 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	15:34:00    3222	452	241.1	 'c1': 1}
2026-02-21 15:39:28 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	15:39:00	3543	562	240.9	 'c1': 1}
2026-02-21 15:40:56 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	15:40:00	4012	460	239	     'c1': 1}
2026-02-21 15:46:18 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	15:46:00	3769	513	239.4	 'c1': 1}
2026-02-21 15:51:40 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	15:51:00	3291	435	238.9	 'c1': 1}
2026-02-21 15:57:02 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	15:57:00	2990	474	239.9	 'c1': 1}
2026-02-21 16:02:24 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	16:02:00	3480	576	242	     'c1': 1}
2026-02-21 16:07:46 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	16:07:00	3598	498	241.2	 'c1': 1}
2026-02-21 16:13:08 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	16:13:00	3218	509	240.3	 'c1': 1}
2026-02-21 16:18:30 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	16:18:00	3476	545	242.4	 'c1': 1}
2026-02-21 16:23:52 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	16:23:00	3197	525	240.7	 'c1': 1}
2026-02-21 16:29:14 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	16:29:00	2775	487	239.6	 'c1': 1}
2026-02-21 16:34:36 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	16:34:00	3198	518	239.5	 'c1': 1}
2026-02-21 16:39:58 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	16:39:00	3614	505	240.1	 'c1': 1}
2026-02-21 16:45:20 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	16:45:00	3205	471	238.7	 'c1': 1}
2026-02-21 16:50:42 DEBUG     	 'cache-control': 'no-cache'} : {'data': '20260221	16:50:00	2993	532	239.6	 'c1': 1}

My assumption looking at the data again, looks like its missing the cut off window. 3mins either side of 5min interval.

Thanks,
Greg

I’ve been playing around and found a post from the owner of the following git repo, which is a fork of SunGather. He was having issues with time float also, so I’m trying his version of pvoutput.py

Update:

Purely a SunGather issue with the upload timings. I’ve raised an issue on Bohdans git repo.

For anyone else having this issue in the future, read on. https://github.com/bohdan-s/SunGather/issues/244

I’m running your sungather git & docker image latest to try and fault find my problem.

I found the following:
I’ve noticed the pvoutput times drifting as per this post #212 where a patch was added to fix this issue. When cloning your git repo, I still get the old pvoutput.py with the issue. Since updating the pvoutput.py from the patch, the times are rock solid 5min intervals.

I had been switching back and forth between docker and python execution, chasing my tail, because I’d edit the file and nothing would change when I run the docker version (preferred), until I woke up and realised the container is built and packaged separately. I entered the container (latest) and it still has old issues also.

Issue 1: The backslash between “exports{export” instead of a space giving the warning below in sungather.py.

/opt/sungather/sungather.py:139: SyntaxWarning: invalid escape sequence ‘{’
logging.info(f"Loading Export: exports{export.get(‘name’)}")

Issue 2: Is the pvoutput.py file needing patching like above in the git.

Sorry for the noise,
Greg

Hi Greg I’ve got a Sungrow SG3.0RS inverter with the smart meter. I’m connecting via http and wifi. I found that i would get the best results by running python3 sungather.py -c config.yaml --runonce using scheduling once every 5 mins. I found that only the first data scrape was acceptable to PVOutput so a waste of time configuring to 60 or 300 secs.

Hi rjjaa,

I ended up forking the SunGather repo to my own and making the required changes, that had already been suggested in the link above.

I then created my own docker account and built a docker image from my git. It is running rock solid now with no missed data.

I want to try the docker route, as I previously ran the python command on a raspi w, but had to do the odd restart,

Thanks,
Greg