Software update on the 25th of September - CAN Message support in car library, hooks, EV improvements

We found an issue in the image provided on github, so if you have manually reflashed the device with the 26.09.19 image, you will not be able to connect via the LTE network - this is only an issue until the device is updated from the cloud.

So to work around the issue, you can simply connect the device to your home wifi, run the update, and then you can connect to LTE.

This is only an issue if you have manually re-flashed the device with the newest image.
We have temporarily removed the image from github - a fixed version will be uploaded shortly.

Br
/Malte

2019.05.08 also has update issues when using DIY board with RPi3b+

image

image

I’ve gracefully rebooted, and shut down a few times, to no avail. Also yanked power a few times – still nothing. I’m currently running on an OBD2 desktop power supply – not from the car itself. Any way I can trigger the actual update from the command line?

@plord and @MrEricM
I have been looking at the logs to try to figure out what to use as tags.
I want it to be awake when charging and driving, and from the logs the things that make sense are ^vehicle/obd/bus_connected for wake and ^vehicle/battery/discharging for sleep, the first one works fine, but the discharge doesn’t, the dongle doesn’t go to sleep until the power gets below the critical limit.
Did you change the timings to make the sleep work (I have left them at default; delay 10 and period 300)? Or any other ideas?

You can trigger the update with the following command

http://docs.autopi.io/commands/minionutil/#minionutil-update-release
You might need to use the force parameter.

We have seen an issue on another device which might indicate that some devices with a specific combination of settings, is not properly reporting the updated version.
So you can try to set the auto update setting to false in advanced settings, and then restart the device, then it might be able to update + report that it has happened.

I don’t have a great answer. After further testing, mine doesn’t seem to work in all scenarios with how my vehicle works with the discharging event.

If I can get vehicle/obd/bus_disconnected to log in events, I think that could be helpful. You could at least get a pretty good end tag for trip logging, and depending on how your vehicle acts when charging (Is the ODB bus always connected? Does it cycle On/Off like mine seems to do?), probably tweak the timeouts to keep it from entering sleep mode when charging too.

@MrEricM
For trips I use sleep and hibernate as end tags and odb_connected as start tag, works fine.
Keeping the power on works fine with start tag odb_connected, but to get it to hibernate doesn’t, I tried with discharging and bus_disconnected none of them seems to put it to sleep.
I have a working solution with custom code and a job that works fine, I’ll guess I’ll stick to that for now.

1 Like

Interestingly, I cannot force the update even after disabling automatic updates.

ERROR: Another state run is currently active - please wait and try again later

Any tips you can think of? I wouldn’t care about the update, but since it’s queued, none of my settings will commit. Just added an LTE/GPS module and really wanting to see that functioning, but I’m stuck for now.

@scrampker
I had the same problem as you but it finally went through after around three hours.
Not sure if rebooting from the command (cmd.run ‘reboot’), had any impact.
And not sure that I tried to run it from the command (minionutil.update_release), had any impact as I got an error doing it:
anders.odelberg@Anders Ioniq $ minionutil.update_release

‘ERROR: Update is already running - please wait and try again later’

Anyways it installed properly after a few hours.

@Malte
For the power setting “On which event(s) should this sleep timer be enabled?” with ReEx what does that do?
When I tried to use those settings for when to keep it awake and when to sleep, the awake worked fine, but the sleep didn’t
To keep it awake now I have a script that runs every minute checking if the car is either on or charging, if true it enables the sleep timer using power.sleep_timer commands. The result is that the sleep timer is reset to start again from 0 (if the time is not specified 30 minutes is default). So once the check gets a false for on or charging the timer runs out (set to 5 min) and puts the dongle to sleep.

Now for my question: if the same logic applies to the power setting “On which event(s) should this sleep timer be enabled?” that would mean that if the trigger action picked to enable sleep comes to often the sleep timer will just reset itself and never actually send it to sleep.
Is this what happens?

I tried with:
to disable sleep: ^vehicle/obd/bus_connected
to sleep: ^vehicle/battery/discharging and vehicle/obd/bus_disconnected (they both are repeated constantly)

Has anyone with an EV managed to get the sleep function to work in the power settings. The sleep now is only triggerd by critical battery level.

@plord
Does it really work for you with the end tag?
If you look a the events what is the reason for shutting down?

I get multiple vehicle/battery/discharging and I use it as the end tag
However it doesn’t hibernate when that happens instead it does it when I get the following:
First this
October 12th 2019, 20:42:30
vehicle/battery
critical_level
event.vehicle.battery.level: 80

followed by the actual shutdown.
October 12th 2019, 20:42:43
system/power
hibernate
event.system.power.reason: battery_critical_level
event.system.power.interval: 0
event.system.power.delay: 10
event.system.power.uptime: 11277

So my conclusion so far is that any event that is repeated multiple times resets the timer.

Here is a recent trip:
chrome_2019-10-14_07-49-22

The trip ended pretty much right when the discharging event happened at 7:16am. However, this is still not a good solution for my car in my testing because discharging can occur even if the vehicle is operating (I assume the 12v battery is fully charged and in a float charge state). I’m working on some sort of other solution that will work longer term.

My “Engine Off” sleep timer settings:
Delay: 900s
Event Regex: ^vehicle/battery/discharging
Interval: 21600s
Period: 900s

You could be right on multiple events resetting the timer.

I can not restore logger, my library with pid can not modify … I’m astonished …Freaky Update … I advice all people use only monitor personal script with telegram bot … is useful and work always, autopi os is bad

@MrEricM
Yes I am almost sure that the the sleep timer just restarts everytime the the set event happens.
Workaround :slight_smile: The stay awake works fine for the Ioniq: “^vehicle/(obd|battery|battery)/(interface_connected|charging|charging_slow)”
I then set the critical level voltage to 12.5 V, that will shut it down as soon as soon as I’m not driving or charging.
However this is a workaround and not really nice, @Malte any plans on fixing it?

Hi @AndersO

Yes, we are looking into this.
We will get back to you with an update soon.

Best regards
/Malte

@Malte
Good, give can me a shout if you want sample events or logs

1 Like

I’m still not spending too much of my time on this - but for normal driving the rules I mentioned seem to be working. I removed the sleep from my custom scripts and the autopi stays awake whilst driving. However it does go to sleep when charging.

I’m thinking the approach is to either figure out a way to really listen to CAN events on the Kona ( I know there is a “tester present” mode that the openvehicles folks use - maybe thats it ) or poll the car for status ( is is on ? is it off ? is it charging etc ) and send events from custom code. Then we can more easily configure the sleep behaviour based on PID’s.

Looking forward to the updated tutorials.

Hi Alexandro

Can you create a topic in the “issues” category with a description of the issues you are seeing?

br
/Malte

Hi Malte,

I´m interested in creating custom events for my Kona EV. I added PIDs for “Relay_BMS” and “Relay_Ignit” to the community library. How can I do the following custom events:

engine running -> Relay_Ignit==1
engine stopped -> Relay_Ignit==0 or no communication
Charging start -> Relay_BMS==1 AND Relay_Ignit==0
Charging end -> Relay_BMS==0 OR (Relay_BMS==1 AND Relay_Ignit==1) OR no communication

Thanks

Hi

Restoring loggers works fine, but there is no default loggers for electric vehicles - so you will have to create them yourself with the specific PID’s that you need.

We currently have an issue with the PID’s in the library, we are working to resolve it. It only affects PID’s that has already been added to your library, so if you add any additional PID’s they should work fine.

Sorry about the inconvenience.
Best regards