Jump to content

TheRussian

Members
  • Content Count

    29
  • Joined

  • Last visited

  • Days Won

    1

TheRussian last won the day on May 25

TheRussian had the most liked content!

Community Reputation

1 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Well, I can send you the code that was actually working for me in the past, if you wish to look for the differences... ๐Ÿ˜… Anyway, I've just reset my AutoPi completely: now the behavior of your last script is that it's only triggered once every minute by the cronjob, so I can confirm that something is not working correctly with the script itself.
  2. The problem is that it's not even updating every 30 seconds, while more than once every 2 minutes... So I wonder if it's really related to that additional part of the script or something else... One more question: In the Kona the flag is_driving is always true except when is_charging is true, correct?
  3. Thanks for the guide, I may try this out later in the week. As of now, the current "Excecution script" has for sure some troubles (at least for me) as it doesn't update on 5 seconds basis during running (but it is basically run by the cronjob every minute), but it actually works fine when charging... I don't have a direct SSH access while running, do you have some other hints to debug or get extra debug data from the web interface?
  4. I'm trying to configure the script as a service, to see if it gets unstuck: can you write down all the AutoPi configuration steps you used for your test?
  5. I'm having a lot of troubles after updating to the new release, but it seems like it's not running at all in AutoPi, so there's nothing really wrong with the code itself: I'll try to figure that out and let you know asap...
  6. Ok, I'm testing the new one and let you know if it works better! ๐Ÿ˜…
  7. I think it has something to do with the is_driving calculation you did for the Kona: if you give me the specific command line to test, I can run it from the web interface while driving and let you know (unluckily I don't have a SSH connection setup while driving, but I can run the commands from the web terminal, no problem). My feeling is that is_driving is not working correctly, so the script runs on the cronjob basis instead, skipping some values when Mobile Data connection is not strong enough.
  8. Actually I have a pretty low number of loggers and just 5 scripts, all very slowly triggered, so I donโ€™t think this is the issue. I donโ€™t know if it is due to the addition of the speed obd query, but now ABRP script runs only once every couple of minutes when driving, while everything is normal during charging. I did a 32 km trip and only got 8 data points in ABRP, while all the data are recorded correctly in AutoPi... Do you have any idea how this is possible and what could cause this issue in your latest script?
  9. First testing today shows all the additional information correctly on the Hyundai Kona, BUT the data were not polled every 5 seconds as usually. Iโ€™m doing more testing later and let you know how it goes (maybe itโ€™s an AutoPi issue, not related to your script at all. EDIT: yes, I think the problem was AutoPi dongle temperature that went up to 60 deg and the system shut down... ๐Ÿ˜… No worries apparently on your script side.
  10. Thanks Jason, I've updated the script now, tomorrow I'm testing it and let you know if everything is in place. ๐Ÿ™‚
  11. No problem, here they are! ๐Ÿ˜‰ I already know they work correctly, as I use them constantly in my AutoPi scripts. ODOMETER: $ obd.query Veh_Odometer mode=22 pid=B002 header=7C6 bytes=64 formula='bytes_to_int(message.data[10:12])' unit=km baudrate=500000 protocol=6 verify=false force=true VEHICLE SPEED: $ obd.query Veh_Speed mode=220 pid=100 header=7B3 bytes=63 formula='bytes_to_int(message.data[32:33])' unit=kph baudrate=500000 protocol=6 verify=false force=true CUMULATIVE ENERGY CHARGED (this is a cumulative absolute value, in order to get the energy charged during a session, you need to do the difference between: value@chargeEND - value@chargeSTART): $ obd.query CEC mode=220 pid=101 header=7E4 bytes=64 formula='(bytes_to_int(message.data[41:45]))/10.0' unit=kWh baudrate=500000 protocol=6 verify=false force=true Let me know when you update the code, I'm ready to test it. ๐Ÿ˜‰
  12. Moreover, I subscribed in order to do some more testing and found out that if I export a typical day of usage to Excel, ABRP doesn't show the following (I blackened locations and vehicle name for privacy, but they're accurate): - Energy Added - Start Odometer - End Odometer Is this due to missing KonaEv PIDs or it's something else on ABRP side? Apart from that, I'm still running one of your older release and Drive/Charge are detected flawlessly, so I wouldn't add anything else honestly on KonaEv side.
  13. Hi Jason, I tested your obd.query scripts, here's the result (you have to force=True both of them, otherwise AutoPi replies that are not supported: IS_CHARGING (formula is not supported in the way you wrote it, so I launched other queries as separate tests, without success): obd.query is_charging mode=220 pid=101 formula= (((bytes_to_int(message.data[12:13])&32)/32) or ((bytes_to_int(mess age.data[12:13])&64)/64)) header=7E4 force=True >- Passed invalid arguments to obd.query: query() got multiple value s for keyword argument 'pid' obd.query is_charging mode=220 pid=101 formula= (((bytes_to_int(message.data[12:13])&32)/32)) header=7E4 force=True 'Failed to calculate formula: unexpected EOF while parsing (<string>, line 1)' MOTOR: obd.query motor mode=220 pid=101 formula=twos_c omp((bytes_to_int(message.data[56:57])*256+bytes_to_int(message.dat a[57:58])),16) header=7E4 force=True _type: motor _stamp: '2020-06-13T07:33:39.436058' value: 0
  14. I can definitely do some tests on those PIDs and give you the result. Give me a couple of days to test. ๐Ÿ˜‰ On the Add-On side, I haven't got exactly how to use them (the Readme is not really a step by step description ๐Ÿ˜›), so if you could give me some more hints about implementation I can try and test it for you.
  15. I made some more tests and it seems everything works fine now (3x charging sessions, icons went ON and OFF correctly, on a regular basis). I actually use those two PIDs to determine whether the driving mode is on or not: BMS relay = 1 means the car is on (either charging or driving, you cannot tell from this), while Ignition relay = 1 means that your vehicle key is turned to start (I have never checked what happens in case you're charging and you also start the Ignition key though). Following code for PIDs in AutoPi: def get_bms(): # bms relay 1=on means "charging or driving" # obd.query Relay_Ignit mode=220 pid=101 header=7E4 bytes=64 formula='((bytes_to_int(message.data[12:13]))&1)/1' # unit=OnOff baudrate=500000 protocol=6 verify=false force=true try: args = ['Relay_BMS'] kwargs = { 'mode': '220', 'pid': '101', 'header': '7E4', 'bytes': 64, 'baudrate': 500000, 'formula': 'bytes_to_int(message.data[12:13])', 'protocol': '6', 'verify': False, 'force': True, } return (int(__salt__['obd.query'](*args, **kwargs)['value']) & 1) / 1 except: return -1 def get_ignit(): # ignition relay 1=on means "driving" # obd.query Relay_Ignit mode=220 pid=101 header=7E4 bytes=64 formula='((bytes_to_int(message.data[53:54]))&4)/4' # unit=OnOff baudrate=500000 protocol=6 verify=false force=true try: args = ['Relay_Ignit'] kwargs = { 'mode': '220', 'pid': '101', 'header': '7E4', 'baudrate': 500000, 'bytes': 64, 'formula': 'bytes_to_int(message.data[53:54])', 'protocol': '6', 'verify': False, 'force': True, } return (int(__salt__['obd.query'](*args, **kwargs)['value']) & 4) / 4 except: return -1

Contact Us

Bo - Lead Developer and Tesla owner: bo@abetterrouteplanner.com

Jason - New Car Models, Developer and Bolt owner : jason@abetterrouteplanner.com

Idreams - Forums Administrator, Forums Developer and Tesla owner : idreams@abetterrouteplanner.com

ร—
×
  • Create New...