• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

NSW Fuel Prices

Scheduled Pinned Locked Moved Unsolved Requests
21 Posts 3 Posters 10.3k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    strawberry 3.141 Project Sponsor Module Developer @k3tan
    last edited by strawberry 3.141 Dec 27, 2018, 9:45 AM Dec 27, 2018, 9:41 AM

    @k3tan I finally finished a protoype.

    0_1545903899534_f0504b71-08e9-40ec-8c1c-0f1b31d269fb-grafik.png

    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]

    Please create a github issue if you need help, so I can keep track

    P 1 Reply Last reply Mar 13, 2020, 6:18 AM Reply Quote 0
    • K Offline
      k3tan
      last edited by Dec 28, 2018, 3:39 AM

      @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?

      S 1 Reply Last reply Dec 28, 2018, 3:42 AM Reply Quote 0
      • S Offline
        strawberry 3.141 Project Sponsor Module Developer @k3tan
        last edited by strawberry 3.141 Dec 28, 2018, 3:44 AM Dec 28, 2018, 3:42 AM

        @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,
          }
        },
        

        Please create a github issue if you need help, so I can keep track

        K 2 Replies Last reply Dec 28, 2018, 5:56 AM Reply Quote 0
        • K Offline
          k3tan @strawberry 3.141
          last edited by Dec 28, 2018, 5:56 AM

          @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!

          1 Reply Last reply Reply Quote 0
          • K Offline
            k3tan @strawberry 3.141
            last edited by Dec 28, 2018, 2:57 PM

            @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

            S 1 Reply Last reply Dec 28, 2018, 4:42 PM Reply Quote 0
            • S Offline
              strawberry 3.141 Project Sponsor Module Developer @k3tan
              last edited by Dec 28, 2018, 4:42 PM

              @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.

              Please create a github issue if you need help, so I can keep track

              1 Reply Last reply Reply Quote 0
              • P Offline
                Peter Leemon @strawberry 3.141
                last edited by Mar 13, 2020, 6:18 AM

                @strawberry-3-141 can this be used for other states as well (Qld)?

                1 Reply Last reply Reply Quote 0
                • 1
                • 2
                • 3
                • 2 / 3
                • First post
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Sam, technical setup by Karsten.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy