lephisto / tesla-apiscraper

API Scraper for pulling Vehicle Statistics from the Tesla Owner API into an InfluxDB + Grafana Dashboards
GNU Lesser General Public License v3.0
365 stars 103 forks source link

Expanding ongoing_activity_status and storing as TAG? #43

Closed wishbone1138 closed 5 years ago

wishbone1138 commented 5 years ago

Does it make sense to make car_active_status become a TAG for writes? Could also expand it to use vehicle state otherwise as well. That way series will get TAG'd for charging, driving, offline, sleep, online, etc.. This could (still playing with the idea and I need more data) make for some interesting graphs. One I'm playing with is range loss over time with each part of the graph highlighted by what kind status the car was in. This can help you visually see loss (or gain if you wanted it) for each state the car was in. Originally headed down this path looking for an easy way to reproduce Teslafi's "idle" state or parasitic drain loss graphs and needed an easier way to identify what state the car was in when viewing the data.

lephisto commented 5 years ago

Since car_active_state is not coming throught the Owner API but generated by the Scraper it currentl doesn't go to the Database. But yes, it is planned to ingest Scraper generated Metrics to the Database as well, like Queries/min, scraper state, and we could include the car_active_status as well.

lephisto commented 5 years ago

I would probbly store it as a field, in an own measurement like "scrapermetrics,vin=xxx,vehicle=yyy ongoing_activity_status=,car_active_status= ... etc.

wishbone1138 commented 5 years ago

Makes sense. It's just with influx being so limited for queries across measurements makes it more difficult to use. I saw your post about the influx replacement though so hopefully that limitation won't last long.

lephisto commented 5 years ago

Everything will be good, Fluxlang incoming. Will Update to influx 1.7.x or probably 1.8 with math across measurements.