Read the statement by Michael Teeuw here.
NSW Fuel Prices
-
@k3tan I played around a little bit this weekend. Sadly the api is documented poorly so it will take a while to figure out all pieces.
-
@strawberry-3-141 i’d expect nothing less from our government. thanks for taking a look!
-
@k3tan I just got a response from the support. Hopefully i can create a prototype during the Christmas holidays.
-
@strawberry-3-141 fantastic, looking forward to it. thanks once again.
-
@k3tan I finally finished a protoype.

I’m looking for people who are willing to test prices
- nsw australia
how to test:
- if not already done, clone the repository to your modules
cd ~/MagicMirror/modules/ && git clone https://github.com/fewieden/MMM-Fuel.git - go to the module
cd ~/MagicMirror/modules/MMM-Fuel - run
git fetch - run
git checkout feature/api-nsw - run
npm i - test various config options
[card:fewieden/MMM-Fuel]
-
@strawberry-3-141 hey thanks for putting this together. just trying to test the config options. can you let me know what you put into your config file? API, lat,lng etc?
-
@k3tan https://github.com/fewieden/MMM-Fuel/blob/626b1434e64380475f6430086ce47bebb038b8ed/README.md#nsw-australia-nsw-only
{ module: "MMM-Fuel", position: "top_right", config: { provider: 'nsw', api_key: 'YOUR_API_KEY', secret: 'YOUR_API_SECRET', lat: -33.881964, lng: 151.172128, types: ["diesel", "e5"], sortBy: "diesel", radius: 10, max: 5, } }, -
@strawberry-3-141
thanks. i’ve just done some testing.couple of comments so far:
- your ‘E5’ is picking up P95. Can you change the heading to P95?
- your diesel (DL) price is correct for stations that have diesel. however, if the station has premium diesel (PDL), it shows as “>155.9”.
The possible fuel types the API serves are the following:
Ethanol 94 (E10)
Unleaded 91 (U91)
Ethanol 105 (E85)
Premium 95 (P95)
Premium 98 (P98)
Diesel (DL)
Premium Diesel (PDL)
Biodiesel 20 (B20)
LPG (LPG)
CNG/NGV (CNG)
EV charge (EV)Are all these fuel types supported, or just E5 and Diesel at this stage? If I change the fuel type to E10 for instance, would it work?
Also, I have a list of favorite stations I want to keep tabs on. Is it possible to feed those specific stations in and get the price of those?
thanks for all your help so far, much appreciated!
-
@strawberry-3-141 hey mate, just went through some of your code as well as the API itself. i see there’s a page for ‘closest stations’ and a ‘cheapest stations’. is it possible to get like a page of ‘favorites’ where i can input stationcode and display those?
i don’t really need cheapest and closest.
ps. ive also figured out that only P95 and Diesel work at this stage. all good.
cheers -
@k3tan you’re right e5 => P95 and diesel => DL as their are known here.
If a station is not providing one of the fuel types the module takes the most expensive price for that type that it got as a response and puts a greater than before.
Favourites are not implemented and also not trivial to do, as all data providers are based on nearby searches and limited in the response.
-
@strawberry-3-141 can this be used for other states as well (Qld)?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login