plord
March 8, 2019, 6:48pm
#41
Many thanks for the update - I guess results could be string, int or float.
Looking through todays debug log, its looking good from my end. Some snippets -
2019-03-08 12:30:20,668 [salt.loaded.ext.engines.obd_manager:65 ][DEBUG ][913] Querying: SOC_Display
2019-03-08 12:30:21,365 [salt.loaded.ext.engines.obd_manager:104 ][DEBUG ][913] Got query result: 97.0
2019-03-08 12:31:03,132 [salt.loaded.ext.engines.obd_manager:65 ][DEBUG ][913] Querying: SOH
2019-03-08 12:31:03,318 [salt.loaded.ext.engines.obd_manager:104 ][DEBUG ][913] Got query result: 100.0
2019-03-08 12:31:38,220 [salt.loaded.ext.engines.obd_manager:65 ][DEBUG ][913] Querying: Batt_Current
2019-03-08 12:31:38,389 [salt.loaded.ext.engines.obd_manager:104 ][DEBUG ][913] Got query result: 67.1
2019-03-08 12:31:38,416 [salt.loaded.ext.engines.obd_manager:65 ][DEBUG ][913] Querying: Batt_Volts
2019-03-08 12:31:38,585 [salt.loaded.ext.engines.obd_manager:104 ][DEBUG ][913] Got query result: 396.4
2019-03-08 12:33:51,106 [salt.loaded.ext.engines.obd_manager:65 ][DEBUG ][913] Querying: Indoor_Temperature
2019-03-08 12:33:51,261 [salt.loaded.ext.engines.obd_manager:104 ][DEBUG ][913] Got query result: 9.5
2019-03-08 12:33:51,279 [salt.loaded.ext.engines.obd_manager:65 ][DEBUG ][913] Querying: Outdoor_Temperature
2019-03-08 12:33:51,419 [salt.loaded.ext.engines.obd_manager:104 ][DEBUG ][913] Got query result: 3.5
2019-03-08 12:33:51,451 [salt.loaded.ext.engines.obd_manager:65 ][DEBUG ][913] Querying: Batt_Temp1
2019-03-08 12:33:51,640 [salt.loaded.ext.engines.obd_manager:104 ][DEBUG ][913] Got query result: 7
2019-03-08 12:33:51,647 [salt.loaded.ext.engines.obd_manager:65 ][DEBUG ][913] Querying: Batt_Temp2
2019-03-08 12:33:51,810 [salt.loaded.ext.engines.obd_manager:104 ][DEBUG ][913] Got query result: 7
2019-03-08 12:33:51,817 [salt.loaded.ext.engines.obd_manager:65 ][DEBUG ][913] Querying: Batt_Temp3
2019-03-08 12:33:51,984 [salt.loaded.ext.engines.obd_manager:104 ][DEBUG ][913] Got query result: 7
Normal driving -
2019-03-08 12:39:57,924 [salt.loaded.ext.engines.obd_manager:65 ][DEBUG ][913] Querying: Batt_Power
2019-03-08 12:39:58,116 [salt.loaded.ext.engines.obd_manager:104 ][DEBUG ][913] Got query result: 29.45954
Regen -
2019-03-08 17:38:51,291 [salt.loaded.ext.engines.obd_manager:65 ][DEBUG ][809] Querying: Batt_Power
2019-03-08 17:38:51,497 [salt.loaded.ext.engines.obd_manager:104 ][DEBUG ][809] Got query result: -2.23098
Uploads -
2019-03-08 12:29:54,038 [requests.packages.urllib3.connectionpool:400 ][DEBUG ][919] https://api.autopi.io:443 "POST /logbook/storage HTTP/1.1" 200 0
2019-03-08 12:29:54,160 [cloud_cache :158 ][INFO ][919] Uploaded batch with 5 entries from queue 'pend'
2 Likes
plord
March 9, 2019, 3:58pm
#42
exec1216:
I am working on Renault Zoe, and inspired by CanZE app ( https://github.com/fesch/CanZE ). From there, I know that if I send [0x03,0x22,0x32,0x06,0,0,0,0] on PID 7E4, I will get an answer from PID 7EC.
In this example, could you clarify which values I should set for mode, code and header?
Can you locate a torque pro config for the zoe ? I can attempt a conversion to autopi from that.
Hi plord,
thanks for your answer, but I can’t find anything related to both torque pro and Zoe.
Let me reword my question. obd.dump is already returning this kind of format: ‘42E#46D7D0DBC405C048’
What I need is to send ‘7E4#0322320600000000’, and to filter answers like ‘7EC#…’
Does it make sense? Or do I miss something important in the behaviour of obd.query?
Malte
March 12, 2019, 10:21am
#44
Hi @exec1216
I believe the formatting pads the value with zeroes if it is less than 2 characters.
I’m not sure exactly how the Zoe works, but it may be that the data is not request-able from a pid, but instead needs to be fetched from the CAN bus.
@plord
What data types do you think should be supported when retrieving data from your vehicle?
Currently we have no data-type on a PID, but as mentioned earlier, this has caused some issues in our storage system, as only numeric values are shown when you want to create widgets, as we cant really show string values on a line chart, so I’m thinking about setting the type to float for all loggers.
But I wanted to hear what data you have seen from your vehicle first?
Best regards
/Malte
plord
March 12, 2019, 11:02am
#45
Malte:
What data types do you think should be supported when retrieving data from your vehicle?
Currently we have no data-type on a PID, but as mentioned earlier, this has caused some issues in our storage system, as only numeric values are shown when you want to create widgets, as we cant really show string values on a line chart, so I’m thinking about setting the type to float for all loggers.
But I wanted to hear what data you have seen from your vehicle first?
This is a list I’ve been tinkering with -
State of charge - float ( percentage )
State of health - float ( percentage )
Current - float ( amps )
Voltage - float ( volts )
Normal charging - boolean
Rapid charging - boolean
Indoor temperature - float ( degrees )
Outdoor temperature - float ( degrees )
Battery power - float (KW)
Motor speed - integer ( rpm )
Battery temperature - float ( degrees )
Tyre pressure - float ( psi )
Real speed - float (km/h)
Debugging - dump hex dumps periodically … currently to minion logs
I suppose we might also see -
VIN number - string
Tyre sensor id - string
Gear - boolean
Break lights on - boolean
So I would say we have -
Mostly float types - line chart or gauge
String - new visualization type ?
Boolean - new visualization with icon ??
plord
March 13, 2019, 11:19am
#46
Wooo … just noticed some ( but not all ) plotting is starting to work ! Major breakthrough !
4 Likes
plord
March 13, 2019, 12:00pm
#47
and a charging test -
State of charge is going up with negative battery power ( initially trickle charge then 7Kw ).
( at some point I would like to have seperate patter power charts - one for charging and one for driving with the “right” sign … one for later )
3 Likes
Malte
March 13, 2019, 4:29pm
#48
Hi Peter
Yes, we have made changes to our storage to make sure data is inserted in the correct datatype.
Unfortunately… We have had to remove some data to ensure that the new data was inserted using the correct types, so the charts may not look so fancy until you drive/charge your vehicle again
Sorry about that
I am extending the way types work for PID’s so it will allow a few different types, currently string, float and boolean, but more may be added if we discover the need. But for now the default type for everything is float.
Best regards
/Malte
2 Likes
Just out of curiosity, why are you grouping mode an pid by 3 nibbles?
Usually it’s 22 01 05, not 220 105.
plord
March 23, 2019, 12:08am
#50
Well, autopi accepts mode and pid. I found sometimes I need mode=21 pid=0001
and other times mode=220 pid=101
… not really sure why, but it boils down to “what works” !
keep in mind that the standard mode is just one byte, and the DID is 2, so the correct handling should be:
21 0001
What’s the best way to start capturing data on the canbus? I see in Car Explorer there are many different protocols of can bus and baud rates, do I just start with 1 and record, and then just keep going down the list? Are there some that might be better to start with than others? same with baud rate? I really want to find the signal that turns off the “auto stop/start” feature on my new Jeep.
Thanks for any insight