Converting from Torque Pro to Autopi

I’ve started to get some data from my Kona Electric via Torque Pro and so I’m trying to replicate retrieving the data on my autopi.

For example, I believe auxillary battery voltage can be obtained from “2102”. Torque Pro shows this as -

Result for equation: 11.98

Command:
	2102

Response :
	7EA10276102F8FFFC00
	7EA2101000000007900
	7EA22016F5F2F000026
	7EA2301CC2E7C794EEC
	7EA2417630000010101
	7EA2500000004410000

Variables used in equation:
	U=46 (hex=2E, binary=00101110)
	T=204 (hex=CC, binary=11001100)

Equations steps:
	=(SIGNED(U)*256+T)/1000
	=(46*265+T)/1000
	=11980/1000

I understand that Torque Pro the command consists of OBD2 Mode + PID. So I believe the equivalent is -

 $ obd.query test mode=21 pid=02 force=true
_type: test
_stamp: '2018-12-05T16:10:34.285025'
value: |-
  7EA10276102F8FFFC00
  7EA210101000000962D
  7EA22CA70813A3611A6
  7EA239D783960865057
  7EA2422670000010101
  7EA2500000007000000
  7EB103A610207FFFFFF
  7EB210000000000001C
  7EB2200040405050100
  7EB2301000714CDABC2
  7EB24CD7C0084345B00
  7EB25AC96F9267428C1
  7EB26CD000085340000
  7EB2700000000000000
  7EB2800000000000000
  7ED1022610200000000
  7ED216F0679206F4079
  7ED22206A2379196DDC
  7ED23791E74BF791572
  7ED2493792275637905
  7EE037F2112

Giving a battery voltage of T=0x78 (120) U=0x39 (57), = 14.7V … could be right.

However in a different case, Command “220101” on Torque Pro contains the state of charge of the battery -

Result for equation: 94.0

Command:
	220101

Response:
	7EC103E620101FFF7E7
	7EC21FFBC16AE430800
	7EC2200000FCF090808
	7EC2308080900000ACE
	7EC2430CE4A00007800
	7EC250015B2000012F4
	7EC2600000840000006
	7EC27D10005F7060900
	7EC28030000000003E8

Variables used in equation:
E=188 (hex=BC, binary=10111100)

Equation steps:
=E/2

But translating this to autopi I see -

$ obd.query test mode=22 pid=101 force=true
_type: test
_stamp: '2018-12-05T16:13:59.936936'
value: 7EB037F2212

Anyone know how I can get the equivalant of Torque Pro command “220101” on my auto pi ?

Thanks.

1 Like

Hi @plord,

Awesome work. Looks really good.

Just quickly looking at your last command, are you not missing a zero? Try:

obd.query test mode=220 pid=101 force=true

Alternatively you can try the send command;

obd.send 220101 expect_response=true

The send command also takes a ECU number before the # in the string, but it might work without. Give it a try.

best
Peter

1 Like

Good point, thanks :slight_smile:

obd.query test mode=220 pid=101 force=true
_type: test
_stamp: '2018-12-06T08:16:24.201486'
value: |-
  7EA037F2212
  7EB037F2212
  7EC103E620101FFF7E7
  7EC21FFBB1B36465003
  7EC2200250FC50B0B0A
  7EC230A0A0A00000BCE
  7EC244BCD4A00009100
  7EC250015B2000012FB
  7EC2600000840000006
  7EC27D3000601020D01
  7EC28930000000003E8
  7ED037F2212

So the next step here is to add an OBD logger -

I found that the cloud doesn’t accept mode 220 … also, of course, we are still pending a way to filter on ECU and the sums to extract and calculate the value.

1 Like

Hi @plord,

Right now the cloud is limited to standard OBD mode, which only allows two digits. This is to follow the OBD standard.

But have you tried the obd.send command I recommended? It should be able to allow filtering on ECU already:

obd.send xxx#yyyy expect_response=true

where xxx is the ECU number and yyy is the data payload.

best
Peter

1 Like

No, that didn’t work. I just tried -

obd.query test mode=220 pid=101 force=true
_type: test
_stamp: '2018-12-07T16:29:59.325613'
value: |-
  7EA037F2212
  7EB037F2212
  7EC103E620101FFF7E7
  7EC21FFBD19BE465003
  7EC2200170FCE0C0B0B
  7EC230B0B0A00000ACE
  7EC2427CE4600008100
  7EC250015D200001307
  7EC260000084D000006
  7EC27D7000613C60D01
  7EC28940000000003E8
  7ED037F2212

obd.send 220101 expect_response=true
_stamp: '2018-12-07T16:30:09.884377'
values:
  - 7EB 00 00 00 00 00 00 00 00
  - 7ED 00 00 00 00 00 00 00 00

obd.send 7EC#220101 expect_response=true
_stamp: '2018-12-07T16:28:54.657530'
value: NO DATA
2 Likes

Hi @plord,

With the latest update, this should have been fixed.

best
Peter

1 Like