meltaxa / herculis

Use AWS Lambda to fetch your Sungrow Solar metrics and send these to the PVOutput website.
MIT License
11 stars 5 forks source link

not working #1

Closed mikibijon closed 6 years ago

mikibijon commented 6 years ago

serverless invoke --function herculis --log { "stackTrace": [ [ "/var/task/herculis.py", 102, "lambda_handler", "PVOStatus = pvoutz.get_status()" ], [ "/var/task/herculis.py", 42, "get_status", "raise ValueError(response.read())" ] ], "errorType": "ValueError", "errorMessage": "Bad request 400: No status found" }

START RequestId: 19c56963-a4c5-11e7-9ec1-57ea6cbc1b8d Version: $LATEST Bad request 400: No status found: ValueError Traceback (most recent call last): File "/var/task/herculis.py", line 102, in lambda_handler PVOStatus = pvoutz.get_status() File "/var/task/herculis.py", line 42, in get_status raise ValueError(response.read()) ValueError: Bad request 400: No status found

Please help

meltaxa commented 6 years ago

Hi @mikibijon, it is complaining about an API call to PVOutput. Check your pvo_key and pvo_systemid values are correct in the serverless.yml config file.

mikibijon commented 6 years ago

yup its correct.

meltaxa commented 6 years ago

The error indicates you have no status (data uploaded) yet:

ValueError: Bad request 400: No status found

Try manually entering in some data in PVOutput (https://pvoutput.org/addoutput.jsp) and then run the script again.

In the meantime, I'll endeavour to update the code to ignore a status error for first timers.

mikibijon commented 6 years ago

I already manual add data for sep. 29 2017. re run the script. Im still getting same error. can you help me to setup it right? can i have your email? tnx

meltaxa commented 6 years ago

Hi @mikibijon, I've manually added a (test) status using your API and you should now be able to re-run the script to move past this issue. If you need to contact me, my email is my github username at gmail.com. Let me know how you go.

meltaxa commented 6 years ago

Closing issue - Herculis updated to handle a not status found error when checking for PVOutput status.