How to use the "Car Explorer" feature

The contents of this guide have been moved to our documentation website here.

This thread will remain open for discussion.

1 Like

Many thanks for the update :slight_smile: I’ve tried using this to get my Kona state of charge.

Firstly I can use the following to get the the data that I need -

$  obd.query SOC_Display mode=220 pid=105 verify=false force=true 
_type: soc_display
_stamp: '2019-03-02T08:52:16.375263'
value: |-
  7EA037F2212
  7EB037F2212
  7EC102E620105003FFF
  7EC2190000000000000
  7EC220000000000001B
  7EC23A446500001500A
  7EC240003E80403E835
  7EC25C60000CECE0000
  7EC260D00000000AAAA
  7ED037F2212

The data I need is in row 7EC25 - I need to convert C6 to a percentage ( to int then / 2 to get 99% ).

I figured the request header in this case is 7E4 (response is 7EC) and I think the offset is 26 bytes ( in torque pro counting, or perhaps its 32 ), so the GUI gives me a command of -

$ obd.query SOC_Display mode=220 pid=105 header=7E4 bytes=45 formula='bytes_to_int(message[26:])/2' unit=%
 baudrate=500000 protocol=6 verify=false force=true
'ERROR: ''int'' object has no attribute ''encode'''

Indeed, I found I got the same error without the foruma -

$  obd.query SOC_Display mode=220 pid=105 header=7E4 force=true
'ERROR: ''int'' object has no attribute ''encode'''

Have I misunderstood something ? What does this error message mean ?

Apparently I have version 2019.03.01 on my device.

Thanks.

2 Likes

Hi @plord,

As a temporary workaround can you try to quote the header value like so:

obd.query SOC_Display mode=220 pid=105 header=‘7E4’ bytes=45 formula=‘bytes_to_int(message[26:])/2’ unit=%
baudrate=500000 protocol=6 verify=false force=true

There sometimes seem to be a bug when parsing this value unquoted. This will be fixed in the next release.

1 Like

Thanks that helped. I now see -

$ obd.query SOC_Display mode=220 pid=105 header='7E4' force=true
_type: soc_display
_stamp: '2019-03-04T17:24:39.250087'
value: |-
  7EC102E620105003FFF
  7EC2190000000000000
  7EC2200000000000025
  7EC234A430800015008
  7EC240003E80403E835
  7EC25B10000C7C70000
  7EC260A00000000AAAA 

but when I apply a formula I get -

$ obd.query SOC_Display mode=220 pid=105 header='7E4' bytes=45 formula='bytes_to_int(message[26:])/2' unit=% baudrate=500000 protocol=6 verify=false force=true
>-
ERROR: Failed to calculate formula: 'Message' object has no attribute
'__getitem__'

Given that the colon is a python slice operator I also tried a range -

$ obd.query SOC_Display mode=220 pid=105 header='7E4' force=true formula='bytes_to_int(message[2:3])'
>-
  ERROR: Failed to calculate formula: 'Message' object has no attribute
  '__getitem__'

Now I did try ignore the example above and use something like -

 $ obd.query SOC_Display mode=220 pid=105 header='7E4' force=true formula='bytes_to_int(messages[0].data[6:7])'
_type: soc_display
_stamp: '2019-03-04T17:54:48.845947'
value: 144

But the ranges seem to fail when I try to move further into the response -

  $ obd.query SOC_Display mode=220 pid=105 header='7E4' force=true formula='bytes_to_int(messages[0].data[14:15])'
  _type: soc_display
_stamp: '2019-03-04T17:55:21.268868'
  value: |-
    7EC102E620105003FFF
    7EC2190000000000000
    7EC2200000000000025
    7EC239A430800015007
    7EC240003E80403E835
    7EC25B00000C7C70000
    7EC260A00000000AAAA

Any ideas what I can use to extract a single int ?

1 Like

Ah. I tried adding the byes ( presumably there is a default for bytes ) -

$ obd.query SOC_Display mode=220 pid=105 header='7E4' bytes=54 formula='bytes_to_int(messages[0].data[38:39])/2' unit=% baudrate=5000
00 protocol=6 verify=false force=true
value: 99
_stamp: '2019-03-04T18:21:05.640377'
_type: soc_display
unit: '%'

So I have the data !

It would be good to confirm that we need to use messages[0].data[38:39] instead of message[38:39]

2 Likes

Next question, how do I see this on the dashboard ? I was expecting to see SOC_Display on the list of fields but I don’t see it.

2 Likes

Hi Peter

You are absolutely correct, the code i posted is missing the .data attribute - it has been fixed in the guide now.

Regarding the missing fields in the widgets, I have not looked into the data yet, but at the moment, you are unable to do all this in “one sitting”, this is because to create the widget, it needs to have the data in our storage system, so you’d have to configure the logger, and then wait the data to be logged, and then create the widget.

I expect that it just hadn’t gotten any data yet, but if you are still unable to see the fields, please let me know, and I will look into it asap.

Best regards
/Malte

1 Like

Ok. But do we need converter or logger don’t need it ?
It is for SoC
Thanks image image

19

I can’t save mod on formula ‘7E4’ but also I cannot found data , any workaround about it ? also missing attribute can not permit to use widgets … please resolve in few time not month !

Many thanks :slightly_smiling_face:

Well, I’ve added some custom PID’s ( which seem to work when testing ), added a logger and did some test drives. New PID didn’t show up on the dashboard :frowning:

52

I found the car needs to be on to display SOH and SOC … maybe thats it.

I use wake up method every 3 min , therefore data can be done only when is active, I think , when is offline … reply timeout …

In the Kona, I’m seeing that the battery info from OBD port is only available when the car is either ready to drive or plugged in and charging. So unless one of these is true, autopi can’t return any battery data.

1 Like

Ook now this clear my mind , today i test it, therefore is useful if we can aoutonomus or with aoutopi dev a specific widget or logger.

When is active or recharge update
When is inactive last status loaded correct

Is a solution ?
I think as if ll come ! “no value data” change else last

1 Like

Hi, thanks for the update.

It looks like you support only PID which are manually requested. However, on my Renault Zoe, the PID I need is broadcasted regularly by the car. The obd.dump shows some lines with PID 42e which contains the SOC of the car.

In this case, could you clarify how to fill your new “Create new PID” UI?
Best

Still no fields for the dashboard :frowning:

I have several PID’s now, for example -

59

an associated logger -

24

I’ve done a few test trips in the car, and data is getting back to the cloud -

03

But nothing in the list of fields :frowning:

41

Anything I can check locally ?

4 Likes

I think with no brackets log not work , not work no data , no data not showed , I understand this from @Malte previous reply