Accessing Givenergy API from Node-RED

4 comments started 2022-02-08 last 2022-02-08
Home AutomationNodeRed
T
#1 Tim

After help from people in the Givenergy developer community and some clues from the Terravolt website, I've been able to access the API functions from Node-RED. I've uploaded the flow to the Node-RED contributed flows. It does nothing other than return the API call payload to the debug node, but once you can see the JSON, you can choose how to process the key values.

The key for me is that I was struggling with finding how to enable access to the APIs (Userid/Password or Auth key?) and I was clueless of how to attach a cookie to an HTTP Request (thanks Mickey Wang). The rest was relatively straighforward.

#2 hoggy

Tim Hi Tim,
I am the Terravot guy. Didn't realise there was much call for my stuff but nice to know at least 1 person has looked at it i guess.
I do have it all in Powershell instead now which is far far easier to manage variables like session cookies than when I did all of it in Batch (which was down to me being stubborn and not wanting to learn something more modern.)

I'll do another post on it at some point soon for others (the same works for GivTCP without the hassle of cookies at all) but sounds like your sorted now.

T
#3 Tim

hoggy I had really struggled getting successful responses from the API because I couldn't find any documentation or other web resources on how authentication worked. Your "how to" on your website was the only clue I found to this, so thank you. Including the session cookie was another headache, but sorted now thanks to help from Mickey.