r/tasker • u/DannyGi2 • Sep 28 '19
[PROFILES] Torque and tasker integration + kwgt + tablet as car infotainment
Hi, I wanna share my setup for car information. In my A5 it work very well.
The power on profile
Profile: Sveglia (13)
Priority: 7 Restore: no Enforce: no Notification: no
State: Power [ Source:Any ]
Enter: Accendi (11)
A1: Turn On [ Block Time (Check Help):100 ]
A2: Airplane Mode [ Set:Off ]
A3: Bluetooth [ Set:On ]
A4: Location Mode [ Mode:Device Only ]
A5: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
A6: Media Volume [ Level:15 Display:Off Sound:Off ]
A7: Tasker SQLite Plugin [ Configuration:%dbreturn: The data returned from your sql statement
%dbrows(): An array of rows returned from your sql statment
%dbreturncount: The number of rows returned
%dbcolumnname(): An array of values for each column (replace columnname with the actual column name)
%dberr: The error message (if any)
SQLite command: sqlite %Path 'CREATE TABLE IF NOT EXISTS carburante(
consumo
);' Timeout (Seconds):10 ]
A8: Launch App [ App:Torque Data: Exclude From Recent Apps:Off Always Start New Copy:Off Continue Task After Error:On ]
A9: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]
A10: Launch App [ App:Deezer Data: Exclude From Recent Apps:Off Always Start New Copy:Off Continue Task After Error:On ]
A11: Wait [ MS:0 Seconds:3 Minutes:0 Hours:0 Days:0 ]
A12: Go Home [ Page:0 ] The values read and write profile
Profile: Obd (47)
Cooldown: 1 Priority: 7 Restore: no Enforce: no Notification: no
State: Power [ Source:Any ]
Enter: Checkvar (25)
A1: Wait [ MS:0 Seconds:30 Minutes:0 Hours:0 Days:0 ]
A2: Perform Task [ Name:Variabili Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off ]
A3: Variable Set [ Name:%OBDLOG5 To:round(%OBDLOG5) Recurse Variables:Off Do Maths:On Append:Off Max Rounding Digits:1 ]
A4: Variable Set [ Name:%OBDLOG4 To:round(%OBDLOG4) Recurse Variables:Off Do Maths:On Append:Off Max Rounding Digits:2 ]
A5: AutoTools Time [ Configuration:Convert Time Span: %OBDLOG7
Use Seconds: true
Output Variable: tempotrue Timeout (Seconds):30 Continue Task After Error:On ]
A6: KWGT Send Variable [ Configuration:Set: kml Timeout (Seconds):0 ]
A7: KWGT Send Variable [ Configuration:Set: extemp Timeout (Seconds):0 ]
A8: KWGT Send Variable [ Configuration:Set: intake Timeout (Seconds):0 ]
A9: KWGT Send Variable [ Configuration:Set: enginecool Timeout (Seconds):0 ]
A10: KWGT Send Variable [ Configuration:Set: trip Timeout (Seconds):0 ]
A11: KWGT Send Variable [ Configuration:Set: tempoore Timeout (Seconds):0 ]
A12: KWGT Send Variable [ Configuration:Set: tempomin Timeout (Seconds):0 ]
A13: KWGT Send Variable [ Configuration:Set: temposec Timeout (Seconds):0 ]
A14: KWGT Send Variable [ Configuration:Set: speed Timeout (Seconds):0 ]
A15: Perform Task [ Name:Sql Fuel Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off ]
A16: Wait [ MS:500 Seconds:0 Minutes:0 Hours:0 Days:0 ]
A17: Goto [ Type:Action Number Number:1 Label: ] The "variabili" task called in previous profile
Variabili (54)
A1: Run Shell [ Command:tail -1 /storage/emulated/0/torqueLogs/trackLog.csv Timeout (Seconds):2 Use Root:On Store Output In:%OBDLOG Store Errors In: Store Result In: Continue Task After Error:On ]
A2: Variable Split [ Name:%OBDLOG Splitter:, Delete Base:Off ] The "SQL fuel" task called in previous profile
Sql Fuel (40)
A1: If [ %OBDLOG2 ~ 0 ]
A2: Tasker SQLite Plugin [ Configuration:%dbreturn: The data returned from your sql statement
%dbrows(): An array of rows returned from your sql statment
%dbreturncount: The number of rows returned
%dbcolumnname(): An array of values for each column (replace columnname with the actual column name)
%dberr: The error message (if any)
SQLite command: sqlite %Path 'INSERT INTO carburante(consumo)
VALUES( 0.00005);' Timeout (Seconds):10 ]
A3: Tasker SQLite Plugin [ Configuration:%dbreturn: The data returned from your sql statement
%dbrows(): An array of rows returned from your sql statment
%dbreturncount: The number of rows returned
%dbcolumnname(): An array of values for each column (replace columnname with the actual column name)
%dberr: The error message (if any)
SQLite command: sqlite %Path 'SELECT
SUM(consumo)
FROM
carburante;' Timeout (Seconds):10 ]
A4: Variable Set [ Name:%dbreturn To:round(%dbreturn*100)/100 Recurse Variables:Off Do Maths:On Append:Off Max Rounding Digits:3 ]
A5: KWGT Send Variable [ Configuration:Set: litriconsumati Timeout (Seconds):0 ]
A6: Variable Set [ Name:%dbreturn To:round(%dbreturn*140)/100 Recurse Variables:Off Do Maths:On Append:Off Max Rounding Digits:3 ]
A7: KWGT Send Variable [ Configuration:Set: costocarb Timeout (Seconds):0 ]
A10: End If
A11: Variable Set [ Name:%cons To:1 Recurse Variables:Off Do Maths:On Append:Off Max Rounding Digits:8 ]
<Formula consumo>
A12: JavaScriptlet [ Code:var cons = (global( '%OBDLOG8' ) * 0.000139) * ((1/global( '%OBDLOG2' )) * 1,72413) Libraries: Auto Exit:On Timeout (Seconds):2 ]
A13: Tasker SQLite Plugin [ Configuration:%dbreturn: The data returned from your sql statement
%dbrows(): An array of rows returned from your sql statment
%dbreturncount: The number of rows returned
%dbcolumnname(): An array of values for each column (replace columnname with the actual column name)
%dberr: The error message (if any)
SQLite command: sqlite %Path 'INSERT INTO carburante(consumo)
VALUES( %Cons);' Timeout (Seconds):0 Continue Task After Error:On ]
A14: Tasker SQLite Plugin [ Configuration:%dbreturn: The data returned from your sql statement
%dbrows(): An array of rows returned from your sql statment
%dbreturncount: The number of rows returned
%dbcolumnname(): An array of values for each column (replace columnname with the actual column name)
%dberr: The error message (if any)
SQLite command: sqlite %Path 'SELECT
SUM(consumo)
FROM
carburante;' Timeout (Seconds):0 Continue Task After Error:On ]
A15: Variable Set [ Name:%dbreturn To:round(%dbreturn*100)/100 Recurse Variables:Off Do Maths:On Append:Off Max Rounding Digits:3 ]
A16: KWGT Send Variable [ Configuration:Set: litriconsumati Timeout (Seconds):0 ]
A17: Variable Set [ Name:%dbreturn To:round(%dbreturn*140)/100 Recurse Variables:Off Do Maths:On Append:Off Max Rounding Digits:3 ]
A18: KWGT Send Variable [ Configuration:Set: costocarb Timeout (Seconds):0 ] The %Path global variable for SQL database is "/storage/emulated/0/ciao.db" I use SQL to store and read value for fuel consumption because all other pids value is in a real time and don,'t need to be stored.
The shutdown profile
Profile: Spegni (15)
Priority: 6 Restore: no Enforce: no Notification: no
State: Not Power [ Source:Any ]
Enter: Power OFF (5)
A1: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
A2: If [ %Powerplug ~ 0 ]
A3: WiFi [ Set:Off ]
A4: Airplane Mode [ Set:On ]
A5: Location Mode [ Mode:Off ]
A6: Bluetooth [ Set:Off ]
A7: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
A8: Variable Set [ Name:%dbreturn To:-- Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
A9: KWGT Send Variable [ Configuration:Set: litriconsumati Timeout (Seconds):0 ]
A10: KWGT Send Variable [ Configuration:Set: costocarb Timeout (Seconds):0 ]
A11: Variable Set [ Name:%OBDLOG2 To:-- Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
A12: Variable Set [ Name:%OBDLOG3 To:-- Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
A13: Variable Set [ Name:%OBDLOG4 To:-- Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
A14: Variable Set [ Name:%OBDLOG5 To:-- Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
A15: Variable Set [ Name:%OBDLOG6 To:-- Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
A16: Variable Set [ Name:%OBDLOG7 To:-- Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
A17: Variable Set [ Name:%OBDLOG8 To:-- Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
A18: KWGT Send Variable [ Configuration:Set: kml Timeout (Seconds):0 ]
A19: KWGT Send Variable [ Configuration:Set: extemp Timeout (Seconds):0 ]
A20: KWGT Send Variable [ Configuration:Set: intake Timeout (Seconds):0 ]
A21: KWGT Send Variable [ Configuration:Set: enginecool Timeout (Seconds):0 ]
A22: AutoTools Time [ Configuration:Convert Time Span: --
Use Seconds: true
Output Variable: tempotrue Timeout (Seconds):30 ]
A23: KWGT Send Variable [ Configuration:Set: trip Timeout (Seconds):0 ]
A24: KWGT Send Variable [ Configuration:Set: tempoore Timeout (Seconds):0 ]
A25: KWGT Send Variable [ Configuration:Set: tempomin Timeout (Seconds):0 ]
A26: KWGT Send Variable [ Configuration:Set: temposec Timeout (Seconds):0 ]
A27: KWGT Send Variable [ Configuration:Set: speed Timeout (Seconds):0 ]
A28: Tasker SQLite Plugin [ Configuration:%dbreturn: The data returned from your sql statement
%dbrows(): An array of rows returned from your sql statment
%dbreturncount: The number of rows returned
%dbcolumnname(): An array of values for each column (replace columnname with the actual column name)
%dberr: The error message (if any)
SQLite command: sqlite %Path 'DROP TABLE carburante' Timeout (Seconds):10 ]
A29: Show Recents
A30: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
A31: AutoInput Action [ Configuration:Type: Point
Value: 1749,106
Action : Click Timeout (Seconds):20 ]
A32: Secure Settings [ Configuration:Sleep Device Timeout (Seconds):0 ]
A33: End If The variable for powerplug is
Profile: Power On (2)
State: Power [ Source:Any ]
Enter: On (12)
A1: Variable Set [ Name:%Powerplug To:1 Recurse Variables:Off Do Maths:On Append:Off Max Rounding Digits:3 ]
Profile: Power Off (4)
State: Not Power [ Source:Any ]
Enter: Off (14)
A1: Variable Set [ Name:%Powerplug To:0 Recurse Variables:Off Do Maths:On Append:Off Max Rounding Digits:3 ] The kwgt code to read tasker variable is
(Example of intake temp)
$br(tasker, intake)$
in a text format into kwgt widget.
This is the result
Sorry for my bad English
This is videos
7
u/BiiigMooe Sep 28 '19
Would love to see a video walk through of this. What an effort.. ๐๐พ๐๐พ๐๐พ
2
u/DannyGi2 Sep 29 '19
Post update with videos
2
u/SpecialFX99 Sep 29 '19
Nice job! Also nice car and music choices. What OBD adapter do you use? VAG cars are picky and I already have one that doesn't work on my gti
2
u/BiiigMooe Sep 29 '19
Nice, we finally have the video.. Let me put the kids to sleep and jump to watch my future project.. Thanks mate..
1
u/[deleted] Sep 29 '19
Remind me tomorrow
1
u/CB00874 Apr 29 '22
Hi at all, i am new to all of this and want to have this for my car. I have set up my android car radio with tasker and kwgt. I am not so familiar with coding, so is this profile public and can I download it to tasker and modify it for my needs?
Greets, Sebastian