question

tashbee avatar image
tashbee asked

Historical data via API

Hi,

I am sorry if this question has been answered before, but I can not find anything.

I wonder if there is a way, either via the API or MQTT to get historical data. I don't mind if it is just yesterdays data.

Specifically I want to extract Solar generated and consumption from the day before, so I can build predicted solar from forecast.solar and what actually happened.

I am aware that it is available to download from VRM, but I would like to automate it.

Thank you in advance

Tom


solarapi
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
si-mon avatar image
si-mon answered ·

I tried with Chat GPT, it just doesn't get you there....

I'm currently working on downloading all the history of my system and making graphs etc.

What you need to download via API is the log files to get the forecast, it's also in the history.

if you just want a forecast you can download a set of times like tomorrow, and it just has the forecast in it

I've got the basic's running in python if you want a copy PM me.

Kindest regards

Si

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

darren-tan avatar image darren-tan commented ·
Hi Si, would be great if you could send the end point you used?
0 Likes 0 ·
Guy Stewart (Victron Community Manager) avatar image
Guy Stewart (Victron Community Manager) answered ·

Hi @tashbee,

That should be possible - the VRM API is documented here - https://vrm-api-docs.victronenergy.com/

Depending how confident you are with API level programming, you might want to try and enlist the help of a tool like https://chat.openai.com/ to walk you through the necessary steps and assist with coding the script to behave like you want it too. It isn't perfect, and you WILL need to clean up the code it generates, but it can be helpful when getting started.


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

tashbee avatar image
tashbee answered ·

Hi Guy,

This all looks great, I just need to get an api key as mentioned my Chat GPT.

I have made myself an installer, but it says that I can generate myself a key via the gear icon in vrm.

"Click on the gear icon at the top right corner of the screen to access the installation's settings."

Maybe I'm being blind, but I can not find anywhere.

Sorry if I'm being thick.

Regards

Tom

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources

Additional resources still need to be added for this topic