how do I scrape a dynamic graph of the internet?
the url is:
https://mijn.nextenergy.nl/Website_CW/MarketPrices
i want to scrape the basic+ graph and display the whole graph in my home assistant (that’s what we pay)
can not get it to work… not even with chatgpt
so what in Home Assistant would be able to display this?
If @Hellis81’s suggestion doesn’t get you anywhere, the data that makes up that graph is from here:
…which I found using browser DevTools. Note that it’s a POST request with some parameters that you’ll have to duplicate. On my browser, these were:
{"versionInfo":{"moduleVersion":"5Hr44MwI_1DxLWhyy61m7A","apiVersion":"Bc8_XAfp3W7kn4dKB4nXdg"},"viewName":"MainFlow.MarketPrices","screenData":{"variables":{"Graphsize":348,"Filter_CurrentHour":8,"Filter_PriceDate":"2024-09-11","Filter_CostsLevelId":1,"IsOpenPopup":false,"HighchartsJSON":"","DistributionId":3,"IsDesktop":false,"IsTablet":false,"CurrentElectricityPrice_Local":"","CurrentElectricityPricePlus_Local":"","IsLoading":true,"NE_StartDate":"2022-07-01"}}}
That then returns:
{
"versionInfo": {
"hasModuleVersionChanged": false,
"hasApiVersionChanged": false
},
"data": {
"DataPoints": {
"List": [
{
"Label": "0",
"Value": "0.05",
"DataSeriesName": "Stroom",
"Tooltip": "0u €0,05",
"Color": "var(--color-orange-shade)"
},
{
"Label": "1",
"Value": "0.04",
"DataSeriesName": "Stroom",
"Tooltip": "1u €0,04",
"Color": "var(--color-orange-shade)"
},
[…and so on]
You’d need to build a set of sensors using the RESTful integration to pull in the data, then create a graph to display it.
You’re wasting your time even trying.
1 Like