I suppose It's important to share my Coding Projects too

I got an electric car, so I built a website/API to track and update the car's performance realtime.

Long before I went on a creativity bender onset by the lockdown, I wrote code in my spare time. Back in December of 2019, we bought our first EV. A 2019 Chevy Bolt in a beautifully mysterious dark grey. I went all in on the EV life, but also had a really bad case of range anxiety. That coupled with the Bolt's UI gamifying efficient driving led me to the idea of tracking my driving efficiency on different routes over time and displaying that information in an interesting way.

Hardware

In order to get the data to begin with, I got a bluetooth OBD reader that connected to an app called TorquePro. This app has a lot of cool features, including deciphering the codes from the car into a readable format, and sending that data to an external API endpoint.

Software

So I went a little overboard. In hindsight, I probably should have run an express server with serverside rendering and a SQLlite db setup, but you live and learn. Instead of taking the easy road, I built an express server to transfer data, a separate mysql server and a static react site to render the data.

Server Repo: https://gitlab.com/nbeeson/cartracker\ UI Repo: https://gitlab.com/nbeeson/cartracker-ui

Lessons learned

Lesson 1: I drive more efficiently if I'm tracking myself. I found myself comparing different routes to work to see which used the least Kw/h.

Lesson 2: I should have built a queue for incoming data. my phone was pinging the server every 3 seconds, and between the phone's connection and the server, some entries got lost. I wish i could have batched data and sent it in bigger sends but over a greater amount of time. But due to the limitations of the app's settings, that wasn't an option.

Lesson 3: Just don't host a vanilla mysql server unprotected. I had set up a lot of mysql instances for side projects, but either changed the port, username, password, and often kept it internal. However, I was lazy and let a friend use it and opened up the port publically, and in one week, I lost the instance to a ransomware attack. That incident abruptly ended this project, as I really didn't want to try and rebuild it and I had reached the limits of what the TorquePro app solution was capable of.

This is the only screenshot I was able to find of it, which was kind of weird, but at least I had proof it existed.

Data

I had a couple different Plotly graphs, but my favorites were the Watt Hours Per Mile and Battery Percentage.