Battery API offline already?

12 comments started 2022-03-31 last 2022-04-04
APIsHome Automation
C
#1 chrisdev

I'm getting status code 500 and "Internal Server Error" message when setting the /chargeBattery parameters on the battery API this evening, I didn't think it was going away just yet...anyone else seeing the same?

#2 hoggy

It's been doing this for a week for me. Thought it was just my shoddy coding to be honest.
The "fix" is to cancel your bound API Key and then Bind a new one (the api.givenergy.cloud/signup thing) which then seems to work for a day or two and then 500 errors again.

This does however rely on the fact that you've saved your "old" portal API key somewhere given the old portal is now gone so you cant find it.
If not I think you might be F'd - I've just started the transition to the new API now because of this (despite the 10 week grace period something has fallen over somewhere.) i'm 90% done on my own portal, i'll sort my app thing when i've got the energy to go through all that again...

C
#3 chrisdev

hoggy Thanks, glad it's not just me (and it's not you either!). I run my script every night at 9pm and it's been working fine this week, last night was the first time for me that I got a status 500 error.

Thanks for the tips, if it really has been deprecated already, then I guess I've found my job for the weekend!!

#4 hoggy

chrisdev Yes I think i'll be doing similar. I just posted some of the registers over on the API thread if it helps (that get used with the below call)
https://api.givenergy.cloud/v1/inverter/$SerialNum/settings/73/write

#5 Mickey (GivEnergy)

Hi chrisdev,

I've just tested the charge battery route and I don't see an issue with retrieving the information. If you can replicate the error. I'd be able to better diagnose the issue

#6 hoggy

You can try mine - It's seemingly expired again:

L
#8 locked

@Mickey (GivEnergy) I am also getting 500 internal server errors. Just checked my logs and it started yesterday and is still continuing today. Can you check at your end? the logic I use to set the battery charge period and percent is called 3 times a day at 15:00, 19:00 and 21:00

L
#9 locked

@Mickey (GivEnergy) just tried from postman and get the same result
{
"timestamp": "2022-04-01T16:42:08.276+00:00",
"status": 500,
"error": "Internal Server Error",
"message": "For input string: \"\"",
"path": "/chargeBattery"
}
using a payload of
{
"enable": true,
"start": "2330",
"finish": "0130",
"chargeToPercent": "54"
}
a URI of 'https://api.givenergy.cloud/chargeBattery' + the API key

#10 Mickey (GivEnergy)

Hi all,

Apologies for the delay, The issues with the battery API came from the portal redirect we issued a few days ago. This meant the responses emitted from the battery API on unsuccessful authentication came back with something unintended. I've redeployed the API so please inform me of any issues you encounter