Support for electric vehicles

Yea, that bit isn’t working for me yet. I mentioned in How to use the "Car Explorer" feature

1 Like

Ok. Thanks. And before make widgets, we need to do this ?:
image image

And I have this error …

image

Yea, there is a known issue -

So

header='7E4'

rather than

header=7E4

plord do you use custom can settings or standard autodetect ? my code return NO VALUE

I have [6] ISO 15765-4 (CAN 11/500) at 500000 baud. I think it was auto detected.

2 Likes

Ok but do you ve idea about NO VALUE

About ‘…’ I can’t save, value is not accepted

@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 !
06

@asetyde
Did you get data like this ? Can you show me by screen ? Thanks.

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%.

Hi Alexandro

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?

Best regards
/Malte

@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

For display state of charge ? Formula on the kona is -

Mode: 220
Code: 105
Header: 7E4
Bytes: 54
Formula: bytes_to_int(message.data[34:35])/2.0
Unit: %
Min: 0
Max: 100

I recently fixed the formula ( community library should have been updated ).

I’ve also got a number of other PID’s in-place, but not yet shared since I wanted to see them plotted first.

4 Likes