Jay Hanke Posted September 1, 2019 Share Posted September 1, 2019 What do you guys think about mileage and supercharger leader boards for the club? Quote Link to comment Share on other sites More sharing options...
mike Posted September 1, 2019 Share Posted September 1, 2019 9 hours ago, Jay Hanke said: What do you guys think about mileage and supercharger leader boards for the club? Flesh this out further. Do you mean trying to figure out how many mile someone is driving and putting that up? Do you mean how many superchargers are tickled along the way? What we are doing with the CO2 item is super easy - it's an API query that requires no authentication that provides data from Tesla. Quote Link to comment Share on other sites More sharing options...
Jay Hanke Posted September 2, 2019 Author Share Posted September 2, 2019 I was thinking ham radio style leader boards. ie every SC in a state, every state etc. I don't think it would be too hard to make a check in web page that would work in the car or on a phone. Quote Link to comment Share on other sites More sharing options...
mike Posted September 3, 2019 Share Posted September 3, 2019 Could be done - you coding it up? If it can be done, securely, and can dump to a database we can probably do something with it. Quote Link to comment Share on other sites More sharing options...
Dan Holtz Posted September 3, 2019 Share Posted September 3, 2019 Both are interesting idea's but at least at this point most of it would have to be user reported. We are steering away from anything that uses an authenticated API to gather data currently because it's just too much of a mess to deal with and the potential security issues that can come along with it. I wouldn't be opposed to a self reported mileage leaderboard but I would guess this would either end up being filled with mostly old or made up data. Quote Link to comment Share on other sites More sharing options...
Jay Hanke Posted September 8, 2019 Author Share Posted September 8, 2019 If i built a little script, What format would be easy to display? Quote Link to comment Share on other sites More sharing options...
Aaron M Posted September 10, 2019 Share Posted September 10, 2019 There is leader board site already and most data is confirmed with TeslaFi I believehttps://twitter.com/TeslaMiles Quote Link to comment Share on other sites More sharing options...
mike Posted September 10, 2019 Share Posted September 10, 2019 Oh ho that's an idea maker right there: Could make a script that uses the generated token from TeslaFi (and maybe others later) that can pull in data and update a field in the database. Perhaps even be smart and display something like this: Jay Hanke *0571 62,917 mike *1819 51,971 Dan Holtz *1225 37,421 Jay Hanke *7317 36,192 ... Could make it even more fun by doing car query directly and walk people through creating a token but then it would have to be refreshed all the time, etc. For many of us that would be a good solution but for the normals out there it would be hard and the TeslaFi (and others) idea would work the better. could be as simple as: #!/bin/sh # and go ahead and have fun with tearing it down to last 4 VIN number - for later - this is an example! MEMBER_ID=$1 INPUT_TOKEN=$2 OUTPUT_TOKENS=`curl -o- -s https://api.teslafi.com/ ... /${INPUT_TOKEN} | jq '.vin|.odometer'` TOKEN_1=`echo ${OUTPUT_TOKENS} | awk '{print $2}'` TOKEN_2=`echo ${OUTPUT_TOKENS} | awk '{print $4}'` echo "update xxx set miles ..." | mysql ... Wouldn't be too bad at all. This example is off the top of my head and would require some interactive playing around, bounds checking, and all that jazz. And, of course, error checking cause no one wants to get banned from querying an API with bad data all the time, amiright?! Quote Link to comment Share on other sites More sharing options...
mike Posted September 10, 2019 Share Posted September 10, 2019 (btw: this only needs to run once a day cause even high mileage peeps like @Jay Hanke won't make a ripple in a single day) Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 11, 2019 Share Posted September 11, 2019 14 hours ago, mike said: Oh ho that's an idea maker right there: Could make a script that uses the generated token from TeslaFi (and maybe others later) that can pull in data and update a field in the database. Perhaps even be smart and display something like this: Jay Hanke *0571 62,917 mike *1819 51,971 Dan Holtz *1225 37,421 Jay Hanke *7317 36,192 ... Could make it even more fun by doing car query directly and walk people through creating a token but then it would have to be refreshed all the time, etc. For many of us that would be a good solution but for the normals out there it would be hard and the TeslaFi (and others) idea would work the better. could be as simple as: #!/bin/sh # and go ahead and have fun with tearing it down to last 4 VIN number - for later - this is an example! MEMBER_ID=$1 INPUT_TOKEN=$2 OUTPUT_TOKENS=`curl -o- -s https://api.teslafi.com/ ... /${INPUT_TOKEN} | jq '.vin|.odometer'` TOKEN_1=`echo ${OUTPUT_TOKENS} | awk '{print $2}'` TOKEN_2=`echo ${OUTPUT_TOKENS} | awk '{print $4}'` echo "update xxx set miles ..." | mysql ... Wouldn't be too bad at all. This example is off the top of my head and would require some interactive playing around, bounds checking, and all that jazz. And, of course, error checking cause no one wants to get banned from querying an API with bad data all the time, amiright?! So much of this looks like gibberish to me. I'm just going to smile and nod. Quote Link to comment Share on other sites More sharing options...
Jay Hanke Posted September 11, 2019 Author Share Posted September 11, 2019 I learned something, I hadn't seen jq before. [feeling bashful] Quote Link to comment Share on other sites More sharing options...
mike Posted September 12, 2019 Share Posted September 12, 2019 On 9/10/2019 at 10:20 PM, Jessica said: So much of this looks like gibberish to me. I'm just going to smile and nod. nerd-spreck << normal-spreck Quote Link to comment Share on other sites More sharing options...
mike Posted September 12, 2019 Share Posted September 12, 2019 19 hours ago, Jay Hanke said: I learned something, I hadn't seen jq before. [feeling bashful] play enough with JSON and you'll find jq to be quite handy though every time I want to use it I have to review help pages and examples. Quote Link to comment Share on other sites More sharing options...
Will Andrews Posted September 12, 2019 Share Posted September 12, 2019 Everything speaks JSON nowadays, so jq is super useful for shell scripts. Oddly enough, it's only been around for 4 years. Alternatively, can use Node.js for first-class JSON handling... trade-off is more work if you want to run shell commands like @mike's example. Quote Link to comment Share on other sites More sharing options...
mike Posted September 17, 2019 Share Posted September 17, 2019 Python can tear things apart nicely as well if you are into that kind of pain. Quote Link to comment Share on other sites More sharing options...
KrisP Posted September 17, 2019 Share Posted September 17, 2019 Python is what makes it painless. Quote Link to comment Share on other sites More sharing options...
Dan Holtz Posted September 17, 2019 Share Posted September 17, 2019 19 minutes ago, KrisP said: Python is what makes it painless. And readable 1 1 Quote Link to comment Share on other sites More sharing options...
mike Posted September 17, 2019 Share Posted September 17, 2019 6 hours ago, KrisP said: Python is what makes it painless. I think you misspelled [censored] which in this forum might be a little much, ya know? Quote Link to comment Share on other sites More sharing options...
KrisP Posted September 30, 2019 Share Posted September 30, 2019 On 9/17/2019 at 3:59 PM, mike said: I think you misspelled [censored] which in this forum might be a little much, ya know? You know I'm self conscious about it. Quote Link to comment Share on other sites More sharing options...
mike Posted October 1, 2019 Share Posted October 1, 2019 so, shall we whip something up? TeslaFi tokens are cheap. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.