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

Vendor Scan My Tesla, a CANBUS reader for Android

This site may earn commission on affiliate links.
SMT pack info image link
ZND3bM4.jpg
@amund7 , where does 'Energy buffer' come from?? Above is my sons and is at '3.00'.
Is it calculated or an exact value from Tesla?
I ask because I see other TM3 owners with 'Energy buffer' of '3.50'.

ie. TeslaFi - Battery Degradation Reports (upload your data)
6Ty0Q8e.jpg
 
Will Scan My Tesla every save my custom tabs. With each new version I have to redo them from scratch,

Why? All your tabs are always stored, unless you press the 'factory reset all tabs'. In the old days I sometimes put a message telling you to 'reset all tabs' to get the new signals or redesigns, but I don't do that anymore, I force update the changed tabs. Last version only changed the Temps tab for Model 3, nothing else should be affected. I am also contemplating XML export / import of individual tabs, so you could keep & share your custom ones. Still, there are issues if signals are renamed, moved, or added, that won't work with new versions. I think a full UI remake is the way to go, ditch the tabs and make dashboards.

A few things from my wish list.
separate switch for km/miles and F/C
Inverted color mode. White background, black numbers.
Combined gauges (Min/max/average)

I hear you. I also have these on MY wish list :)

I have just scratched the surface of making an IOS version, which requires redesigning a new UI from scratch in Xamarin.Forms (which is both Android and IOS compatible), and have gotten help from a pro designer. His sketches look amazing!

So my current battle plan is this:
1. Implement a few dashboards in Xamarin.Forms on top of the current Android app. These will look awesome, but not be very customizable (yet). This dashboard UI will live on top of the old UI, feel like 2 different apps, but the old UI will be available like before. It might be clumsy switching between the two.
2. Launch a slim IOS version with dashboards, and absolute necessities (and nothing from the current Android UI)
3. Create new settings UI, with more detailed options. This will deploy to both apps
4. Gradually move old functionality and settings into new UI, and thereby also to the IOS app
5. Create a signal 'list' dashboard, similar to the old UI in list view, but with better design and more intuitive editing
6. Add customizability, editing, redesign or free design possibilities to the dashboards
7. Retire the old Android UI altogether. Or, most probably, keep it around as an option, I bet some people will hate the new stuff, or have special use cases where they prefer the old one. (The IOS app will never get any parts of the current Android UI)
8. Now we have 2 equal apps for IOS and Android, good looking and customizable - with 1 code base. That means any updates will hit both apps without twice the work.

Somewhere in-between this list or below it should also be support for more types of adapters (wifi, USB?), other data sources (phone GPS, phone accelerometer, Tesla API), more logging options (timestamps, "slow" CSV). Also, constantly adding new signals and fixing broken ones whenever Tesla changes the canbus signals, which they do a lot with Model 3, adding new things to Model S and X, and by this time, we will also have Model Y, maybe Cybertruck to figure out!

TL;DR: Big changes coming, perhaps bigger than any of you asked for... :)

Keep the feedback coming!
 
Feature request:
1. Allow me to name Bluetooth adapters.
2. Remember some of us have multiple Tesla's. Can we get something worked up to make switching between 2 cars easier? Its a bit of pain as I never know which Bluetooth is to which car.

Haven't really thought of this before. Sounds like we should allow for mulitple cars, where each car will keep a full list of settings, including car type, dashboard setups, bluetooth setups etc. Noted.


@amund7 , where does 'Energy buffer' come from?? Above is my sons and is at '3.00'.
Is it calculated or an exact value from Tesla?
I ask because I see other TM3 owners with 'Energy buffer' of '3.50'.

Energy buffer is reported directly by the car, yes.

We've had 3 LR AWD's in 2019 (still own 2 in the family), and I believe all of them always showed 3.30, at least mine shows that now (at 18000 km)

I believe the 'energy buffer' is a sort of estimate of what's missing below LVC (low voltage cut-off), the area from around 2.6 volts down to 0V, which we can't use or we would ruin the battery. But that's how 'Nominal' capacity is measured, run the battery in a test bench from 4.2 volts down to absolute destruction. So this number doesn't really mean much to us, we can't use it and can't measure it.

It adds up nicely in Scan My Tesla, the 'Usable remaining' is calculated by 'Nominal remaining' minus buffer. And that seems to hit zero exactly when the car reports 0 miles or 0 % on the screen. It actually seems, come to think of it, that the car goes the other way around - it calculates the 'usable' as it sees it - this is capacity BMS can measure as we charge & discharge - probably by Coloumb counting - then adds the buffer as a theoretical missing piece to get to Nominal. (I am sure there are many other variables in the BMS we can't see.)
 
Last edited:
  • Helpful
Reactions: scottf200
Hah! I went out and bought an Android phone just for SMT!

I used one of my old phones, but I would have bought separate one if I didn't have one. I need my normal phone for all kinds of other things. Looking up things, running Waze, calling people, messaging, email. I want ScanMyTesla always visible like a gauge on the dash screen. So a separate phone is a must for me.
 
  • Like
Reactions: HostileHarry
I said I'd share my powershell script to reduce the data, so here it is. I'm not a wonderful programmer (hobby), so I'm certain there are better ways to do things, but this script works for me and I thought I'd share since SMT CSV files can be SO BIG!

Example of size reduction:
NOTE: SMT on 'ALL' tab recording for 90 minutes. Resulted in CSV file with more than 1.3 Million rows
Original file size: 181.3 MB
no switch (combine only): 147.1 MB
-ms 1000 switch: 2.7 MB
-ms 60000 switch: 52 KB

In a nutshell, since SMT spits out data that might be the SAME millisecond timestamp, but for different measures, the CSV files always have extra rows and this script was born to combine the data of different rows that share the same exact timestamp. This did result in a smaller file, but not by very much. Then I added 2 different ways to reduce the data by throwing out data:

Option 1 is using the '-skipevery' switch. This simply combines N rows into one keeping the last value. Combining vs tossing is important because different measures have different poll rates. So if you used '-skipevery 3', the script would combing 3 rows into 1 row. If any measure has a value in any row, they are kept. The most recent measures win.

Option 2 is using the '-ms' switch. This does the same thing as '-skipevery', only you specify the number of millisceconds to combine. So if you used '-ms 1000' you'd 'combine' the data measured for 1 second, again, most recent wins. If you used '-ms 60000', you'd combine the data for 1 minute.

The intent is to use option 1 OR option 2, not at the same time.

Final example of use, you'd type this in powershell:
.\fixcsv.ps1 -filein "MyData.csv" -ms 1000

The output file would be in the same folder called "MyData_out_1000ms.csv"

Hope you find the script useful
Code:
param([string]$filein = $null, [int]$skipevery = 0, [int]$ms = 0) #Looks for -filein "C:\filename" from command line

write-host "INPUT FILE: '$($filein)'"

if ($skipevery -eq 0) { write-host "Note: option '-skipevery X' groups and skips every X lines." } else { $skip = $true }
if ($ms -eq 0) { write-host "Note: option '-ms X' groups and outputs data every X milliseconds." } else { $skipms = $true }

if ($filein.length -eq 0) { write-host "No input file specified.  Use syntax '.\fixcsv.ps1 -filein ""C:\path\yourfile"" and re-try.  Note: Command assumes filein will end with '.csv'" ; exit }
$filein_csv_result = select-string -pattern ".csv" -InputObject $filein
$fullpath_result = select-string -pattern ":" -InputObject $filein
if ($filein_csv_result.length -eq 0) { write-host ".csv NOT found in input filename.  This script requires filename end with .csv" ; exit }

$MyFileIn = $filein
$MyPath = get-location
if ($fullpath_result.length -eq 0) { $MyFileIn = "$($MyPath)\$($MyFileIn)" }

#remove \.\ if it exists
$pathfix_result = select-string -pattern "\\.\\" -InputObject $MyFileIn
if ($pathfix_result.length -ne 0) { $MyFileIn = $MyFileIn.replace("\.\","\") }

#output file name
if ($ms -ne 0) {
    $MyFileOut = $MyFileIn.replace(".csv","_out_$($ms)ms.csv")
} elseif ($skipevery -ne 0) {
    $MyFileOut = $MyFileIn.replace(".csv","_out_skip$($skipevery).csv")
} else { $MyFileOut = $MyFileIn.replace(".csv","_out.csv") }

$file = New-Object System.IO.StreamReader -Arg $MyFileIn
$fileout = New-Object System.IO.StreamWriter $MyFileOut
write-host "OUTPUT FILE: '$($MyFileOut)'"
$i = 0
$a = 0
$filerow = 0
$valuescounted = $false

#Get header and count elements per line
$header = $file.ReadLine()
$filerow++
$Split = $header.Split(",")
Foreach ($value in $Split) {
            #write-host "$($a)=$value"
            #$MyArray[0,$a] = $value #array not init yet
            #write-host "$($i),$($a) = $($MyArray[$i,$a])"
            $a++
        }
#a is now the number of tokens (because it started at zero, but incremented at the end)
$values = [INT]$a
write-host "Found $($values) data elements:"
$valuescounted = $true
write-host "$($header)"
$fileout.Writeline($header)

#Setup array.  0 could be header, 1 and 2 are for comparing
$MyArray = New-Object 'object[,]' 3,($values+1)

$line1 = $file.Readline()
$Split1 = $line1.Split(",")
$time1 = $Split1[0]
$deltaStart = $time1
$skipdelta = 0
    
$TimesMatch = $false

$line2 = $file.Readline() #cue up line2 for do loop

if ($skip) { $skipcount = 0; write-host "Skipping every $($skipevery) lines." }
if ($skipms) { $skipdelta = 0; write-host "Grouping every $($ms) milliseconds." }

$LinesRead = 2
$ChunkSize = 10000 #ChunkSize is how many rows to process before reporting in command window
$report = 0

do
    {
            $filerow++
            $line1_ = $null
            $Split2 = $line2.Split(",")
            $time2 = $Split2[0]
            # Combine entries if same timestamp
            if ($time1 -eq $time2) { $TimesMatch = $true } else { $TimesMatch = $false }
            if (($TimesMatch) -or (($skip) -and !($skipcount -eq $skipevery)) -or (($skipms) -and ($skipdelta -le $ms))) {
                #write-host "DEBUG: Combining R:$($filerow) T:$($time1) with R:$($filerow+1) T:$($time2) skipdelta=$($skipdelta)ms."
                #Fill MyArray 1 and 2
                $a=1
                Foreach ($value in $Split1) {$MyArray[1,$a] = $value ; $a++ }
                $a=1
                Foreach ($value in $Split2) {$MyArray[2,$a] = $value; $a++ }
                $a=1
                #Add values from line2 into line1
                Foreach ($value in $Split1) {
                    if ($MyArray[2,$a].length -gt 0) {
                        $MyArray[1,$a] = $MyArray[2,$a]
                        if ($a -eq 1) { $line1_ += "$($MyArray[1,1])"} else { $line1_ += ",$($MyArray[1,$a])" }
                    } else {
                        if ($a -eq 1) { $line1_ += "$($value)" } else { $line1_ += ",$($value)" }
                    }
                    $a++
                    }
                $line1 = $line1_   
                $Split1 = $line1.Split(",") #new split includes line2 elements just added
                $time1 = $Split1[0]
                if ((($skip) -or ($skipms)) -and !($TimesMatch)) {
                        $skipcount++
                        $skipdelta = ($time2 - $deltaStart)
                        if (($skip) -and ($skipcount -gt $skipevery)) { $skipcount = 0 }
                        
                    }
            } else {
                    #Replace INFINITY with 99999
                     $fileout.Writeline($line1.replace("Infinity","99999"))
                    #Move line2 into line1 position
                    $line1 = $line2
                    $Split1 = $line1.Split(",")
                    $time1 = $Split1[0]
                    if ($skip) {
                        $skipcount++
                        if ($skipcount -gt $skipevery) { $skipcount = 0 }
                    }
                    if (($skipms) -and ($skipdelta -gt $skipms)) { $deltaStart = $time2 ; $skipdelta = 0 }
            }
            
            $LinesRead++
            $Report++
            if ($Report -gt $ChunkSize) { $Report = 0 ; write-host ("{0:N0} lines processed." -f $LinesRead) }
    } while ($line2 = $file.ReadLine())

write-host ("DONE.")
$file.close()
$fileout.close()
 
@amund7 , where does 'Energy buffer' come from?? Above is my sons and is at '3.00'.
Is it calculated or an exact value from Tesla?
I ask because I see other TM3 owners with 'Energy buffer' of '3.50'.

ie. TeslaFi - Battery Degradation Reports (upload your data)
6Ty0Q8e.jpg

As mentioned above, the buffer is not a fixed kWh value but a percentage of the nominal full pack value, about 4.5%.
4.5% of your son's nominal full pack value of 65.6kWh is about 3kWh, whereas 4.5% of the 77.2kWh pack shown in the other owner's screenshot is about 3.5kWh.
 
  • Like
Reactions: scottf200
I have just scratched the surface of making an IOS version, which requires redesigning a new UI from scratch in Xamarin.Forms (which is both Android and IOS compatible), and have gotten help from a pro designer. His sketches look amazing!

This is really exciting!! Would an iOS version require a compatible bluetooth-capable OBD2 device, such as the OBDLink MX+?
(and please please do make ºC available at the same time as miles instead of km, thank you!)
 
  • Like
Reactions: amund7
BTW. Here's a quick example of why you'd use the script I shared above. I took a custom "performance" tab export for about 42 seconds, with only 22 fields. Original CSV was 727 Kb and 17.8K rows. Not too much data, but the graph was busy with data compared to the "trending" I was looking to analyze. I ran it through my fixcsv script with the -ms 250 setting and the new file was 19 Kb and 162 rows. Here are the graphs of both the original and the "fixed" version. Notice the simple one still tells the story? If I was looking for very rapidly changing fields, the script would NOT be a good idea, but for analyzing slower data I'm finding it priceless (which is exactly what I'm charging ;) ). But I simply wanted to plot power/speed across 45 seconds. Just sayin'.....

Orig:
regen not 85kw_raw.png

Simplified:
regen not 85kw.png
 
  • Like
Reactions: amund7
Question which information tab can I find the Battery heater. I'd like to monitor when it's on or off.

Temps, HVAC, and Battery tab all contain 'Coolant heater', which is power in %
'Battery heater temp' is under the Eff tab.
I realize that both the naming and placement of the latter is not great, more like a blunder if I'm honest. Will fix for next version.

Power draw from it is included in 'Thermal controller 400V' and also 'Thermal controller' (which is total of 12v + 400v)


This is really exciting!! Would an iOS version require a compatible bluetooth-capable OBD2 device, such as the OBDLink MX+?
(and please please do make ºC available at the same time as miles instead of km, thank you!)

C/mi is on the list.

I think to begin with there will be only BLE support. I already have an MX+, so that will be the start, but it should then support any ELM327 compatible BLE device. Then hopefully wifi further down the line (for both platforms).
 
C/mi is on the list.

I think to begin with there will be only BLE support. I already have an MX+, so that will be the start, but it should then support any ELM327 compatible BLE device. Then hopefully wifi further down the line (for both platforms).

Awesome on both counts! I will buy the MX+ then. What's your rough estimate on availability of iOS version? (need to see if I can wait, else need to buy an Android device)
 
Awesome on both counts! I will buy the MX+ then. What's your rough estimate on availability of iOS version? (need to see if I can wait, else need to buy an Android device)

Very hard to say, I have just got all the macs, iphones and PCs set up to compile, build and deploy a demo application, and that has taken several months struggling with Mac OS upgrades, virtual machines, hackintoshes and other things. Now I just need to learn Xamarin.Forms and Xamarin.IOS, so it's a long steep hill. I have a dream that a very awful limited functionality beta version could show up in 1 or 2 months at best, and a nicely working good looking one maybe 3 to 6 months.
 
  • Like
Reactions: ord3r
Very hard to say, I have just got all the macs, iphones and PCs set up to compile, build and deploy a demo application, and that has taken several months struggling with Mac OS upgrades, virtual machines, hackintoshes and other things. Now I just need to learn Xamarin.Forms and Xamarin.IOS, so it's a long steep hill. I have a dream that a very awful limited functionality beta version could show up in 1 or 2 months at best, and a nicely working good looking one maybe 3 to 6 months.

Got it, I will acquire an Android device for now then. Good luck with the learning curve! Looking forward to the finished product :)
 
  • Love
Reactions: amund7