Skip to content

LeipeLeon/zonneplan

Repository files navigation

Generate an image for the TRMNL display.

This image can be used with the Image display or Alias plugin

  1. Make a screenshot of https://www.zonneplan.nl/energie/dynamische-energieprijzen
  2. crop out the graphic w/ imagemagick
  3. create a diffused image
  4. Upload it to github-pages
  5. PROFIT!

Further reading for investigation

Scrape site

Content is in <script id="__NEXT_DATA__" type="application/json"> -> "props.pageProps.data.templateProps.energyData.electricity.hours[]"

divide element values by 100000

{
  "props": {
    "pageProps": {
      "data": {
        "templateProps" : {
          "energyData": {
            "__typename": "EnergyData",
            "electricity": {
              "__typename": "Electricity",
              "hours": [
                {
                  "__typename": "ElectricityHour",
                  "dateTime": "2025-05-31T21:00:00.000000Z",
                  "priceTotalTaxIncluded": 2636093,
                  "marketPrice": 997900,
                  "priceInclHandlingVat": 1407459,
                  "priceEnergyTaxes": 1228634,
                  "priceCbsAverage": 0.4,
                  "pricingProfile": "normal"
                },
                {
                  // ....
                }
              ]
            }
          },
        }
      }
    }
  }
}

About

Create an image for use in a TRMNL display

Topics

Resources

License

Stars

Watchers

Forks