Read the statement by Michael Teeuw here.
MMM-Gas
-
Great. Now I’ve got Gas. ;-)
Excellent work, as usual. Works beautifully here in NYC.
Great to hear…also hopefully a Cuomo free zone soon! One can only hope…
-
@cowboysdude I am interested in this as well …very cool thank you.
I have two questions does it include on the listing Costco and Sam’s (which are club member prices and what i use mostly) ??? and also is there an option you can add to it so it will start listing from the top with the lowest price instead of by the distance.Denis
-
@richland007 I looked at the top down in price and was JUST thinking about that :) Right now it’s done by distance. As for who is on the list I cannot control that…it’s the data I get :)
-
@cowboysdude Hey buddy i just installed your module and all i get is “updated at XDate@Time” and no other information?? Is the module currently working? can you test it with zip codes 75252 and 75093 and see if you get any info please?? Maybe there is no information on my area
Thank you
Denis -
@cowboysdude . . . I am having the same exact issue. It only displays the [updated] line with nothing else.
@richland007 Hi…the module calls autoblog as follows:
http://www.autoblog.com/[zipcode]-gas-prices/
replace [zipcode] with your zip code to see if your zip code is valid.
-
@3d thank you for the tip did not know that …and of course i would get values, i am in the middle of Dallas and Plano what was i thinking LOL… and i also get values for Costco and Sams that i asked a few posts above…so that’s a good thing cause we always use those 99% of the time as a small business.
Anyhow the issue remains just “Updating…”
D -
@richland007 Excellent. I am having the same issue as well and can’t figure it out yet.
BTW, I lived in Plano as well…actually graduated from Univ Texas Dallas and Baylor Law. Plano is a great place. Glad I could help a bit.
-
Yes they’ve changed their page so the data it’s asking for is incorrect. I will fix it when I can get some time to do it… Sorry everyone.
-
@cowboysdude I just sent you a pull request that should fix their new page.
-
@cowboysdude I just sent you a pull request that should fix their new page.
I got it and it’s been merged!! HUGE Thank you for fixing this…time is killing me right now :)
"You can now get fuel data for regular (default), mid-grade, premium, and diesel. I also threw in a way to sort by price or distance (default). I saw you had an items variable in the default config section as well. I assume that was to only show X number of items. I added that to your for loop that iterates through the gas array. "
He not only fixed it but enhanced it to make it 100% even better! Here’s an example config:
disabled: false, module: "MMM-Gas", position: "top_left", config: { zip: "14904", items: 10, typeGas: "", //premium, mid-grade, diesel, or blank for regular sortBy: "price" //distance, price } },See the // notes for added features! Thank you again @mochman
Do a git pull to update and update your config accordingly :)
-
-
@cowboysdude and @mochman … WOW, nice work!
The only thing I had to fix was put the ITEMS in quotes…the proper syntax for me was:
items: "10", -
@3d Hmm, the code is supposed to use that variable as an integer. What kind of error were you getting when you had
items: 10,?Edit: Guess it doesn’t matter.
Math.min()still works using a string. -
@mochman It wasn’t loading the config.js. So I just stepped through line by line until if failed. Once if failed I put the 10 in quotations and it loaded.
-
Ok, so I deleted my current GAS module. and reinstalled it.
I went to the website to check my zip code, which is good.
I tried it with & without the quotes around the 10.
Still not working for me… :slightly_frowning_face:
-
NVM!!!
When in doubt, Reboot it out!!!
:smiling_face_with_sunglasses:
-
Is there any way to remove the Distance column? I live in a small town and dont really need the distances on the display. I hunted around the files a little bit and didnt see anything that I could maybe edit or delete that would remove it.
Rob
-
@rob73 I haven’t tried this to see how it looks, but you may just be able to comment out a few of the lines in
MMM-Gas.js
Try commenting out the last 2 lines of this code in the getDom() function.var td5 = document.createElement("td"); td5.innerHTML = dist; TDrow.appendChild(td5); weatherTable.appendChild(TDrow);It should look like this when you’re done.
var td5 = document.createElement("td"); td5.innerHTML = dist; //TDrow.appendChild(td5); //weatherTable.appendChild(TDrow);You should also comment out this part as well.
var bjumpy = document.createElement("th"); bjumpy.setAttribute("style", "text-align:center"); bjumpy.classList.add("xsmall"); bjumpy.innerHTML = "Distance"; //xFCRow.appendChild(bjumpy); //weatherTable.appendChild(xFCRow); -
@mochman … Awesome… I followed your instructions and it worked! Thank you! I would have never figured that out on my own…
Thanks again!
Rob
-
New config option to hide or show distance column.
example config:
{ disabled: false, module: "MMM-Gas", position: "top_left", config: { zip: "14904", items: 10, typeGas: "", //premium, mid-grade, diesel, or blank for regular sortBy: "price", //distance, price distance: false //default is true, so using true just don't use distance in your config } },DO a git pull in the MagicMirror/modules/MMM-Gas dir to update!
AND a HUGE Thanks to @mochman for all the help!!!
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
