SpoturDeal / MMM-rain-forecast

Magic Mirror module
MIT License
9 stars 4 forks source link

Use homepage API, Get 2.5h forecast #4

Closed mrvanes closed 2 years ago

mrvanes commented 5 years ago

This PR changes the API to the internal buienradar homepage API, which serves json (easier to parse) but more important: 2,5h of forecast instead of 2 on the public API.

I made some design choices like using the "original" field instead of precipitation, because it contained ready-to-use numbers, but I don't know where they go for rain showers, might go off chart. Also, I don't parse the datetime field, but simply cut the time using substring.

The testdata is manipulated to show only peaks at exactly the start en end of graph, so that the svg creator can be tested for the edge cases.

Last: I'm not sure about the legality of using the homepage API...

SpoturDeal commented 5 years ago

Hi

Thanks for your PR, I really like your idea of using the graphdata, but as you already mentioned it might be an infringement of the right to use their API. I quickly checked on line 2144 of their source code it says copyright to Buienradar.

If I merge the pull request and buienradar stands by their rights we loose the module. Therefor at this moment until I have certainty I can't merge the request. Feel free to make another branch and see where we end up with.

mrvanes commented 5 years ago

I understand and agree. I will personally keep using graphdata for now, it's a significant gain.

SpoturDeal commented 2 years ago

@mrvanes Today have decided to add your PR i really like the new view