TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker and becoming a Supporting Member. For more info: Support TMC
  1. TMC is currently READ ONLY.
    Click here for more info.

TeslaMate [megathread]

Discussion in 'The UK and Ireland' started by Roy W., Apr 20, 2020.

  1. s88ats

    s88ats Member

    Joined:
    Jul 12, 2020
    Messages:
    288
    Location:
    London
    Talking of pros, does anyone know how I can make a panel within Grafana to display the max power/ top speed output from all drives?

    From the driving panel, I can see speed but it seems an average rather than top but within each journey, it does contain top.
     
  2. init6

    init6 Member

    Joined:
    Oct 16, 2020
    Messages:
    199
    Location:
    Scotland
    What output do you want? Just one figure for your highest speed or highest speed per drive in a table of drives?

    Edit: Ditto power
     
  3. Durzel

    Durzel Active Member

    Joined:
    Jul 17, 2019
    Messages:
    2,593
    Location:
    Bath, UK
    Is there any way of getting the full vehicle details via TeslaMate?

    I'm talking this endpoint specifically: Vehicle Config
     
  4. s88ats

    s88ats Member

    Joined:
    Jul 12, 2020
    Messages:
    288
    Location:
    London
    TBH I don't mind, whichever is the easiest to implement. If I had to choose I'd say ideally the highest speed per drive.

    The speed within each drive is already present in the drives table, but it's an average instead of the top, which then I have to click into each individual drive.
     
  5. s88ats

    s88ats Member

    Joined:
    Jul 12, 2020
    Messages:
    288
    Location:
    London
    "heating_steering_wheel" = true :D
     
  6. 26ct2143

    26ct2143 Member

    Joined:
    Nov 22, 2020
    Messages:
    175
    Location:
    Burton-on-Trent, UK
    you can use the python library:
    tdorssers/TeslaPy
    then use the python api, or issue a python command and it'll come back.
    shouldn't too hard
     
    • Helpful x 1
  7. aCilnv

    aCilnv Member

    Joined:
    Feb 18, 2021
    Messages:
    18
    Location:
    Surrey,UK
    Thanks! I have no idea what it was - great thing of docker is just delete containers and start over .. worked on my dev server.. then just ported to my NAS !
     
  8. init6

    init6 Member

    Joined:
    Oct 16, 2020
    Messages:
    199
    Location:
    Scotland
    Not too sure on how to share these, but try this.
    For Max speed across drives:
    {
    "description": "",
    "fieldConfig": {
    "defaults": {
    "custom": {
    "align": null,
    "filterable": false
    },
    "thresholds": {
    "mode": "absolute",
    "steps": [
    {
    "color": "green",
    "value": null
    },
    {
    "color": "red",
    "value": 80
    }
    ]
    },
    "mappings": []
    },
    "overrides": [
    {
    "matcher": {
    "id": "byName",
    "options": "Time"
    },
    "properties": [
    {
    "id": "custom.width",
    "value": 190
    }
    ]
    }
    ]
    },
    "gridPos": {
    "h": 7,
    "w": 9,
    "x": 0,
    "y": 0
    },
    "id": 28,
    "options": {
    "reduceOptions": {
    "values": false,
    "calcs": [
    "mean"
    ],
    "fields": ""
    },
    "orientation": "auto",
    "textMode": "auto",
    "colorMode": "value",
    "graphMode": "area",
    "justifyMode": "auto"
    },
    "pluginVersion": "7.3.7",
    "targets": [
    {
    "format": "table",
    "group": [],
    "metricColumn": "none",
    "rawQuery": true,
    "rawSql": "SELECT\n\tconvert_km(max(speed), '$length_unit') AS \"Speed [$length_unit/h]\"\n\nFROM\n\tpositions\nWHERE\n car_id = $car_id\n \n",
    "refId": "A",
    "select": [
    [
    {
    "params": [
    "odometer"
    ],
    "type": "column"
    }
    ]
    ],
    "table": "positions",
    "timeColumn": "date",
    "timeColumnType": "timestamp",
    "where": [
    {
    "name": "$__timeFilter",
    "params": [],
    "type": "macro"
    }
    ]
    }
    ],
    "timeFrom": null,
    "timeShift": null,
    "title": "Max Speed",
    "type": "stat",
    "datasource": null
    }
     
    • Helpful x 1
  9. init6

    init6 Member

    Joined:
    Oct 16, 2020
    Messages:
    199
    Location:
    Scotland
    For Power:

    {
    "fieldConfig": {
    "defaults": {
    "custom": {},
    "thresholds": {
    "mode": "absolute",
    "steps": [
    {
    "color": "green",
    "value": null
    },
    {
    "color": "red",
    "value": 80
    }
    ]
    },
    "mappings": []
    },
    "overrides": []
    },
    "gridPos": {
    "h": 7,
    "w": 9,
    "x": 9,
    "y": 0
    },
    "id": 30,
    "options": {
    "reduceOptions": {
    "values": false,
    "calcs": [
    "mean"
    ],
    "fields": ""
    },
    "orientation": "auto",
    "textMode": "auto",
    "colorMode": "value",
    "graphMode": "area",
    "justifyMode": "auto"
    },
    "pluginVersion": "7.3.7",
    "targets": [
    {
    "format": "table",
    "group": [],
    "metricColumn": "none",
    "rawQuery": true,
    "rawSql": "SELECT\n\tmax(power) AS \"Power [kW]\"\n\nFROM\n\tpositions\nWHERE\n car_id = $car_id\n \n",
    "refId": "A",
    "select": [
    [
    {
    "params": [
    "odometer"
    ],
    "type": "column"
    }
    ]
    ],
    "table": "positions",
    "timeColumn": "date",
    "timeColumnType": "timestamp",
    "where": [
    {
    "name": "$__timeFilter",
    "params": [],
    "type": "macro"
    }
    ]
    }
    ],
    "timeFrom": null,
    "timeShift": null,
    "title": "Max Power",
    "type": "stat",
    "datasource": null
    }
     
    • Helpful x 1
  10. init6

    init6 Member

    Joined:
    Oct 16, 2020
    Messages:
    199
    Location:
    Scotland
    Let me see if I can get a table of max speed per drive
     
  11. s88ats

    s88ats Member

    Joined:
    Jul 12, 2020
    Messages:
    288
    Location:
    London
    Both worked flawlessly thank you so much!

    Would it be difficult to link or show the drive when that highest value was done? I don't know if that's complicating things or if it would be easier to amend the average speed that's currently being shown in the default, showing the max instead?
     

Share This Page

  • About Us

    Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.
  • Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


    SUPPORT TMC