So, the first part of the EV update is here. This update contains the possibilities to add your own codes specific to your EV. You can now add specific formulas to each code, to make sure it’s formatted correctly. This should make it possible for you to add a code, setup a logger for the code and then have the code visualized in the dashboard. See this guide on how to get started with everything:
The next update will contain more about how to configure the trips settings for the EV.
@Malte please update code to resolve quote issue, therefore is useful an editor text box to modify directly and save
at now I use custom code to collect data manually !
Thanks for the great work adding this! I suspect the SoC reading/formula might not be quite right though. My car is currently charging and is somewhere in the mid-70% range, but the value reported when running the query is 94%.
The fix to the quote issue should be out in a few hours.
But to avoid the issue, you can just add quotes around the header as @plord says.
The preview code is just a preview, if you want to edit it, just copy and paste the code into the terminal, that way you can edit it before executing it.
The custom code module that you show does not quite work like that. (FYI @Remy_Tsuihiji)
You can execute modules like the obd.query via the custom code modules, but you will have to call the module like this instead.
def test():
"""
This calls the salt module obd.query, with the specified args and kwargs
"""
args = [
'SOH'
]
kwargs = {
'mode': '220',
'pid': '105',
'header': '7E4',
'bytes': '54',
'formula': '(bytes_to_int(messages[0].data[31:32])*256+bytes_to_int(messages[0].data[32:33]))/10',
'baudrate': 500000,
'protocol': '6',
'verify': False,
'force': True,
}
return __salt__['obd.query'](*args, **kwargs)
NOTE:
The above example is just to say that it’s possible to do that, I’m still not sure exactly why you would not just create a logger that uses the PID?
@plord also I not find correct formula, with 94% result 101 , I see excel documenti but I not find a legend to understand it and correct idi I can, probably new sms update change something, BMS is update to adapt new WLTP cycle correction done by Hyundai 3 month ago