willemstoker / aps-to-pvoutput

Upload data from AP Systems solar inverters (APS) automatically to PV Output
8 stars 4 forks source link

Error between midnight and first unit of power production #6

Open WesselKraaij opened 3 years ago

WesselKraaij commented 3 years ago

The script works fine, however, starting at midnight, the script probably pulls zero entries from EMA until first light and exits with an error. After first light and power production the script runs fine until midnight

Start time: Wed, 17 Mar 2021 06:10:02 GMT Stop time: Wed, 17 Mar 2021 06:10:04 GMT Current status: 1 (Interrupted) Standard output/error: Traceback (most recent call last): File "/-path-/apstopvoutput.py", line 70, in timesstring = rootdict.get("data").get("time") AttributeError: 'NoneType' object has no attribute 'get'

fdr76 commented 3 years ago

Almost 2 years used this script without a problem but on 27 march I get the same errors. It looks that APSystem has changed something. Finally their site is speedy. In the past it was really slow.

Traceback (most recent call last): File "/volume1/homes/fdr/scripts/logging-zonnepanelen.py", line 70, in timesstring = rootdict.get("data").get("time") AttributeError: 'NoneType' object has no attribute 'get'

After this error er errors is changed: Traceback (most recent call last): File "/volume1/homes/xxxx/scripts/logging-zonnepanelen.py", line 69, in rootdict = getDataFromAPS() File "/volume1/homes/xxxx/scripts/logging-zonnepanelen.py", line 48, in getDataFromAPS return response.json(); File "/usr/local/lib/python2.7/site-packages/requests/models.py", line 812, in json return complexjson.loads(self.text, **kwargs) File "/usr/local/lib/python2.7/site-packages/simplejson/init.py", line 516, in loads return _default_decoder.decode(s) File "/usr/local/lib/python2.7/site-packages/simplejson/decoder.py", line 370, in decode obj, end = self.raw_decode(s) File "/usr/local/lib/python2.7/site-packages/simplejson/decoder.py", line 400, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I hope so that AP Systems come with a open documented API.

TFHFony commented 3 years ago

Same here. I have been using the script without problems for over a year, but last weekend it has stopped working.

WesselKraaij commented 3 years ago

I stumbled upon: https://github.com/ksheumaker/homeassistant-apsystems_ecur

Have not tested it yet.

TFHFony commented 3 years ago

Hi,

Unfortunately that's for the ECU-R (And I still have the old ECU). And I'm also not using Home Assistent. So for the moment, I've hooked up my APC-EVU2PVO again.

https://sites.google.com/site/ecu2pvo/

LauryanFeijen commented 3 years ago

@TFHFony would you care to explain a bit more on how your APC-EVU2PVO works? From looking at it you are still getting the APS data from the internal network, or are you using the Arduino to listen in on the Zigbee communication? Would love to see what we can learn from that implementation if that still works and see if and how I could use that same setup on my Raspberry Pi

TFHFony commented 3 years ago

As far as I understand, the APC-EVU2PVO uses the APC-ECU's webserver to read the information from the HTML page and parses this to PVOutput.

On Thu, Apr 8, 2021 at 9:30 PM LauryanFeijen @.***> wrote:

@TFHFony https://github.com/TFHFony would you care to explain a bit more on how your APC-EVU2PVO works? From looking at it you are still getting the APS data from the internal network, or are you using the Arduino to listen in on the Zigbee communication? Would love to see what we can learn from that implementation if that still works and see if and how I could use that same setup on my Raspberry Pi

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/willemstoker/aps-to-pvoutput/issues/6#issuecomment-816098157, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGWANZADA7VNMBXUPMLXGF3THX76LANCNFSM4ZLCMJ5A .