Read the statement by Michael Teeuw here.
Does anyone have any idea on how to implement prices from Gas Buddy. I was thinking that maybe it could be done using MMM-Iframe, but with a bit of Googling I can’t seem to find any sort of Iframe by them. I also checked out this: https://github.com/fewieden/MMM-Fuel But as far as I understand this works for Germany and Austria?
I do a lot of driving because of work, and I thought such a module could be really neat!
I have a similar module where I get the prices from a German gas station. With some small changes it should be possible to show prices from other sources as well. But it’s not looking for different prices in a region, only at one gas station, displaying their current price. If you have one station you’re always going to, check if the brand/station has a website with live prices. Even if you have one favorite station on Gas Buddy, it might work with some changes. But as I saw, that’s a system where other users have to put in the prices (or the station itself), so not very accurate compared to live data.
@doubleT I would be very interested in this! I do frequent usually three different gas stations.
I did some digging but wasn’t able to find a usable alternative.
Company Website (& API)
I don’t know if the website is down or geo-blocked for me, I can’t reach www.speedway.com
If I could, I’d check if they have pages for each station with live prices available and if they have an API.
Google Knowledge Graph
I searched that station on Google and found the result page had a right hand sidebar (Google Knowledge Graph) with live prices. So I thought I could get it via the Knowledge Graph API (if you have a Google Dev API key (and activated KG), you can try it with this link) but the itemList is empty, or maybe I did something wrong. Wrong queries?
Google Maps – or Places?
Then I found out that when you search that station on Google Maps, it’ll also show the live prices in the sidebar on the left. But the latest info I found (some months old) say that there’s no way to access these as they’re not in the Google Maps API (or was it Places?).
Getting the live price from the actual gas station itself, or at least from Google, would be the best solution, as the GasBuddy price is not really live, it’s only updated when a user shares the newest price.
Here are some mockups how such a module might look:
All/selected prices from one station:
(Note: The boxes have classes that identify the fuel and can be highlighted, if wanted.)
Prices from several stations:
The reason behind this differentiation: Instead of four calls, like in the second mode, there’s only one call in the first mode. Why is this important? Load time, traffic, …
At the bottom of each box we see the last time the price was updated. I’m not quite satisfied with the mockup, yet.
One thing I’m trying to work out in the design at the moment is adding some sort of “advice” that lets you know if the price is good. What I had in mind was an arrow element that would show if the current price is higher or lower (or same) than the last one.
And similar to that how about adding the highest and the lowest price of the last 7 days so you can make a decission based on that? That’d mean a redesign of the whole thing.
Is there anything you’d like to see in a module like that, that I didn’t mention? Would you like the address/place of the station somewhere? Let me know what you think.
@doubleT I think this looks great! I really like how simple and sleek it looks. Really all I was looking for was a simple gas price display. The price history functionality sounds interesting, and I’m not sure what more could be added beyond that.
I wrote a request to Speedway to see if they have an API that I could make use of. I didn’t write to Gasbuddy as their site didn’t make it easy to contact them.
In the meantime, I’ll look about for a free API that has accurate results