Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

TeslaMate [megathread]

This site may earn commission on affiliate links.
I tried to go over all this thread, and search, but forgive me if I missed anything since its complex over a 70 pages thread :)
When I view the driving stats in the car, on the trip/odometer window, the Wh/km is net or gross consumption?
When I view the energy graph in the car, does it refer to the current / past X km net or gross consumption?
And just to be clear, net consumption is only what power went to the motors, excluding things like A/C and Sentry, while gross consumption contains them (and I assume is calculated by heuristics based on net consumption + general battery charge state?)
 
Hi. Do I need to configure the geofence to pick up my home charging costs for Octopus Go, which currently report No Data? My YAML looks like this but I have no GeoFence set up as of yet and when I looked was not sure what data to put into it. Any help greatly appreciated!

teslamateagile:
image: mattjeanes/teslamateagile:latest
restart: always
environment:
- DATABASE_USER=teslamate
- DATABASE_PASS=supersecretpassword
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
- TeslaMate__UpdateIntervalSeconds=300
# - TeslaMate__GeofenceId=1
- TeslaMate__Phases=1
- TeslaMate__EnergyProvider=FixedPrice
- FixedPrice__TimeZone=Europe/London # IANA (tz database) time zone code, used for below times
- FixedPrice__Prices__0=04:30-00:30=14.12
- FixedPrice__Prices__1=00:30-04:30=5
 
Yeah, without a geofence, how would teslamateagile know when you charged at home vs somewhere else? So you need to create one (it'll probably be your first), and to confirm the GeofenceId is 1, when you edit it, look at the URL, and if it ends like this (/geo-fences/1/edit) then it is indeed GeofenceId=1.

So long story short: create a Geofence, confirm Id=1, un-comment the GeofenceId line in your docker-compose.yml and then issue docker-compose up -d and the teslamateagile container will get restarted with the correct settings and it should work.

Then wait until you've done your first charge, work out the maths (~8kW x number of hours x 5p) and compare it with what TeslaMate says the charge cost (it should be roughly the same).
 
  • Like
Reactions: Die5el
Yeah, here is the current teslamateagile section of my docker-compose.yml (I commented out the 2 Octopus lines and added the four lines at the bottom):

YAML:
  teslamateagile:
    image: mattjeanes/teslamateagile:latest
    restart: always
    environment:
      - DATABASE_USER=teslamate
      - DATABASE_PASS=supersecretpassword
      - DATABASE_NAME=teslamate
      - DATABASE_HOST=database
      - TeslaMate__UpdateIntervalSeconds=300
      - TeslaMate__GeofenceId=1
      - TeslaMate__Phases=1
      # - TeslaMate__EnergyProvider=Octopus
      # - Octopus__RegionCode=C # Octopus Energy only
      - TeslaMate__EnergyProvider=FixedPrice
      - FixedPrice__TimeZone=Europe/London # IANA (tz database) time zone code, used for below times
      - FixedPrice__Prices__0=00:30-20:30=15.9
      - FixedPrice__Prices__1=20:30-00:30=5

Saved it, docker-compose up -d and that's all I did.
Finally made the switch to go faster and added your four lines with my rates to yml. Will charge up tonight to see if it works. Thank you v much for this again :)
 
  • Like
Reactions: rotor2k
I charged last night for the first time on Go (having moved away from Agile) and teslamateagile did seem to calculate it correctly at 5p per kWh.
Interestingly my charge was calculated in pounds instead of pence. e.g. adding 3kw showed up as £13.92 😳

I'd be bankrupt in no time if I paid £60 for the whopping total of 14 kwh I charged up.

I edited my fixed price to 0.45 and deleted /updated the charges from today. Now it looks more like it but I wonder why mine did that and yours didn't...
 
Interestingly my charge was calculated in pounds instead of pence. e.g. adding 3kw showed up as £13.92 😳

I'd be bankrupt in no time if I paid £60 for the whopping total of 14 kwh I charged up.

I edited my fixed price to 0.45 and deleted /updated the charges from today. Now it looks more like it but I wonder why mine did that and yours didn't...
If you delete the cost from that charge and then restart TeslaMateAgile it'll recalculate that for you.

Just be aware though that there is an occasional bug with fixed time cost calculation at the moment, looks like an issue with timezone resolution:
 
If you delete the cost from that charge and then restart TeslaMateAgile it'll recalculate that for you.

Just be aware though that there is an occasional bug with fixed time cost calculation at the moment, looks like an issue with timezone resolution:
That's interesting to know. When I changed my fixed time price to 0.45 it calculated it correctly - once I deleted the charge ID's of course. Do you think this bug could have caused mine to be calculated differently? I didn't get an error or a null tho, just that it calculated it in pounds not pence
 
That's interesting to know. When I changed my fixed time price to 0.45 it calculated it correctly - once I deleted the charge ID's of course. Do you think this bug could have caused mine to be calculated differently? I didn't get an error or a null tho, just that it calculated it in pounds not pence
No the bug won't be related to your specific issue - it stops it from generating a cost at all, or produces one slightly too high (calculating using the higher rate instead of the lower). Was just sharing it to the wider board here!

I enter my costs as 0.142 and 0.055 for my Go Faster tarrif and it normally works okay. Unfortunately at the moment it's not calculating anything for me due to this issue.
 
  • Informative
Reactions: s88ats
Up until recently I wasn't charged of anything as well.
Only when my free trial was up and I had to upgrade my billing account, it started to charge costs.

I have a normal micro-f1 server, exactly set up according to that manual you posted, with a standard disk that is.
Also received 7-days notice to upgrade my account and start paying to Google for using GCP. I was also looking at €0.00 invoices until I discovered the checkboxes for Discounts and Promotions. When I unchecked these boxes GCP Billing shows a wopping €20 a month for using the supposedly free tier F1-micro compute engine. I already checked my disk is the regular standard disk. Should I just accept this and upgrade or switch to another credit card and reinstall on a new Free trial?
Schermopname (4).png
 
Last edited:
Also received 7-days notice to upgrade my account and start paying to Google for using GCP. I was also looking at €0.00 invoices until I discovered the checkboxes for Discounts and Promotions. When I unchecked these boxes GCP Billing shows a wopping €20 a month for using the supposedly free tier F1-micro compute engine. I already checked my disk is the regular standard disk. Should I just accept this and upgrade or switch to another credit card and reinstall on a new Free trial?View attachment 680087
Spend about £40 and get a raspberry pi, and run it on there. If you can manage it in GCP, you can probably manage it on a pi.
 
Also received 7-days notice to upgrade my account and start paying to Google for using GCP. I was also looking at €0.00 invoices until I discovered the checkboxes for Discounts and Promotions. When I unchecked these boxes GCP Billing shows a wopping €20 a month for using the supposedly free tier F1-micro compute engine. I already checked my disk is the regular standard disk. Should I just accept this and upgrade or switch to another credit card and reinstall on a new Free trial?View attachment 680087
Mine is still running free on GCP. Check your settings and read the thread you linked to see if there is something else you are getting billed for.
 
I checked the billing report and more than half the bill is for the static ip. Are you not using static ip for teslamate and grafana?
Yes I have a static address but I'm not being billed for anything that you are being billed for. Here are the instructions I followed to set up the free service:


What does you upgrade email say? Does it says you MUST upgrade or are they just telling you that you SHOULD upgrade? I can't recall getting anything that said I must upgrade.
 
Last edited:
Yes I have a static address but I'm not being billed for anything that you are being billed for. Here are the instructions I followed to set up the free service:


What does you upgrade email say? Does it says you MUST upgrade or are they just telling you that you SHOULD upgrade? I can't recall getting anything that said I must upgrade.

Just got my monthly bill of £0.00 yesterday too, so BMW740iL must have something configured incorrectly.

I do occasionally get an email from Google recommending I upgrade some parts, but those would obviously come at a cost, so I'd rahter have occasional slow performance and it be free!
 
Share a picture and it might be easier for us to help you. Or at least tell us the two figures.
I drove 100kilometers the other day.
In the car screen, I view the "Since last charge" trip, and I see 141Wh/km.
When I go to teslamate drive, I see the following:
1625236678542.png


So there is a gap here of about 9Wh/km, which I'm not sure why it is.
Im still a little bit new to teslamate, and I see the "gross" consumption and by reading online I understand that its actually an estimate based on (mostly) percentage reading?

When I calculated the expected percentage drop, for my 2021 model 3 performance,
Based on online research it should have usable battery of about 78-79Kwh, and If I calculate the percentage in total for driving 100kilometers, 141Wh/km is equivalent to about 17-18%, and 150Wh/km is 19%, so it makes sense that the figures shown by teslamate are more accurate.
So my question is probably - what is the taken into account in:
1. The car reading "Since last charge" / "Since <time>"
2. The consumption figures shown by teslamate
3. The gross consumption shown by teslamate
 
I drove 100kilometers the other day.
In the car screen, I view the "Since last charge" trip, and I see 141Wh/km.
When I go to teslamate drive, I see the following:
View attachment 680666

So there is a gap here of about 9Wh/km, which I'm not sure why it is.
Im still a little bit new to teslamate, and I see the "gross" consumption and by reading online I understand that its actually an estimate based on (mostly) percentage reading?

When I calculated the expected percentage drop, for my 2021 model 3 performance,
Based on online research it should have usable battery of about 78-79Kwh, and If I calculate the percentage in total for driving 100kilometers, 141Wh/km is equivalent to about 17-18%, and 150Wh/km is 19%, so it makes sense that the figures shown by teslamate are more accurate.
So my question is probably - what is the taken into account in:
1. The car reading "Since last charge" / "Since <time>"
2. The consumption figures shown by teslamate
3. The gross consumption shown by teslamate
The car doesn't report it's actual consumption via the API, Teslamate has to calculate it from the observed trip distance, reported battery level and reported current range.

You can see an example of the data available from the unofficial API documentation below:
JSON:
{
  "response": {
    "id": 45226696177987462,
    "user_id": 134950,
    "vehicle_id": 163057375,
    "vin": ":vin",
    "display_name": ":name",
    "option_codes": "AD15,AF02,AH00,APF0,APH2,APPA,AU00,BCMB,BP00,BR00,BS00,BTX4,CC02,CDM0,CH05,COUS,CW02,DRLH,DSH7,DV4W,FG02,FR01,GLFR,HC00,HP00,IDBO,INBPB,IX01,LP01,LT3B,MDLX,ME02,MI02,PF00,PI01,PK00,PMBL,QLPB,RCX0,RENA,RFPX,S02B,SP00,SR04,ST02,SU01,TIC4,TM00,TP03,TR01,TRA1,TW01,UM01,USSB,UTAB,WT20,X001,X003,X007,X011,X014,X021,X025,X026,X028,X031,X037,X040,X042,YFFC,SC05",
    "color": null,
    "tokens": [
      ":token1",
      ":token2"
    ],
    "state": "online",
    "in_service": false,
    "id_s": ":ids",
    "calendar_enabled": true,
    "api_version": 6,
    "backseat_token": null,
    "backseat_token_updated_at": null,
    "charge_state": {
      "battery_heater_on": false,
      "battery_level": 74,
      "battery_range": 186.57,
      "charge_current_request": 48,
      "charge_current_request_max": 48,
      "charge_enable_request": true,
      "charge_energy_added": 29.64,
      "charge_limit_soc": 90,
      "charge_limit_soc_max": 100,
      "charge_limit_soc_min": 50,
      "charge_limit_soc_std": 90,
      "charge_miles_added_ideal": 117.0,
      "charge_miles_added_rated": 91.5,
      "charge_port_cold_weather_mode": null,
      "charge_port_door_open": false,
      "charge_port_latch": "Engaged",
      "charge_rate": 0.0,
      "charge_to_max_range": false,
      "charger_actual_current": 0,
      "charger_phases": null,
      "charger_pilot_current": 48,
      "charger_power": 0,
      "charger_voltage": 0,
      "charging_state": "Disconnected",
      "conn_charge_cable": "<invalid>",
      "est_battery_range": 146.18,
      "fast_charger_brand": "<invalid>",
      "fast_charger_present": false,
      "fast_charger_type": "<invalid>",
      "ideal_battery_range": 238.93,
      "managed_charging_active": false,
      "managed_charging_start_time": null,
      "managed_charging_user_canceled": false,
      "max_range_charge_counter": 0,
      "not_enough_power_to_heat": false,
      "scheduled_charging_pending": false,
      "scheduled_charging_start_time": null,
      "time_to_full_charge": 0.0,
      "timestamp": 1558229319159,
      "trip_charging": false,
      "usable_battery_level": 74,
      "user_charge_enable_request": null
    },
    "climate_state": {
      "battery_heater": false,
      "battery_heater_no_power": false,
      "climate_keeper_mode": "off",
      "driver_temp_setting": 20.0,
      "fan_status": 0,
      "inside_temp": 29.0,
      "is_auto_conditioning_on": false,
      "is_climate_on": false,
      "is_front_defroster_on": false,
      "is_preconditioning": false,
      "is_rear_defroster_on": false,
      "left_temp_direction": -240,
      "max_avail_temp": 28.0,
      "min_avail_temp": 15.0,
      "outside_temp": 24.0,
      "passenger_temp_setting": 20.0,
      "remote_heater_control_enabled": false,
      "right_temp_direction": -240,
      "seat_heater_left": 0,
      "seat_heater_rear_left": 0,
      "seat_heater_rear_right": 0,
      "seat_heater_right": 0,
      "seat_heater_third_row_left": 0,
      "seat_heater_third_row_right": 0,
      "side_mirror_heaters": false,
      "smart_preconditioning": false,
      "steering_wheel_heater": false,
      "timestamp": 1558229319159,
      "wiper_blade_heater": false
    },
    "drive_state": {
      "gps_as_of": 1558229088,
      "heading": 163,
      "latitude": 40.459698,
      "longitude": -79.92347,
      "native_latitude": 40.459698,
      "native_location_supported": 1,
      "native_longitude": -79.92347,
      "native_type": "wgs",
      "power": null,
      "shift_state": null,
      "speed": null,
      "timestamp": 1558229319160
    },
    "gui_settings": {
      "gui_24_hour_time": false,
      "gui_charge_rate_units": "mi/hr",
      "gui_distance_units": "mi/hr",
      "gui_range_display": "Rated",
      "gui_temperature_units": "F",
      "timestamp": 1558229319160
    },
    "vehicle_config": {
      "can_accept_navigation_requests": true,
      "can_actuate_trunks": true,
      "car_special_type": "base",
      "car_type": "modelx",
      "charge_port_type": "US",
      "eu_vehicle": false,
      "exterior_color": "MetallicBlack",
      "has_air_suspension": true,
      "has_ludicrous_mode": false,
      "motorized_charge_port": true,
      "perf_config": "P1",
      "plg": true,
      "rear_seat_heaters": 3,
      "rear_seat_type": 3,
      "rhd": false,
      "roof_color": "None",
      "seat_type": 0,
      "spoiler_type": "Passive",
      "sun_roof_installed": 0,
      "third_row_seats": "FuturisFoldFlat",
      "timestamp": 1558229319160,
      "trim_badging": "90d",
      "wheel_type": "AeroTurbine20"
    },
    "vehicle_state": {
      "api_version": 6,
      "autopark_state_v2": "ready",
      "autopark_style": "dead_man",
      "calendar_supported": true,
      "car_version": "2019.12.1.1 4b1dd29",
      "center_display_state": 0,
      "df": 0,
      "dr": 0,
      "ft": 0,
      "homelink_nearby": false,
      "is_user_present": false,
      "last_autopark_error": "no_error",
      "locked": true,
      "media_state": {
        "remote_control_enabled": true
      },
      "notifications_supported": true,
      "odometer": 20101.093888,
      "parsed_calendar_supported": true,
      "pf": 0,
      "pr": 0,
      "remote_start": false,
      "remote_start_enabled": true,
      "remote_start_supported": true,
      "rt": 0,
      "sentry_mode": false,
      "software_update": {
        "expected_duration_sec": 2700,
        "status": ""
      },
      "speed_limit_mode": {
        "active": false,
        "current_limit_mph": 85.0,
        "max_limit_mph": 90,
        "min_limit_mph": 50,
        "pin_code_set": false
      },
      "sun_roof_percent_open": null,
      "sun_roof_state": "unknown",
      "timestamp": 1558229319158,
      "valet_mode": false,
      "vehicle_name": ":name"
    }
  }
}
 
  • Informative
Reactions: Dave EV