Just curious, when my dongle is online and I do a cloud.peek_cache_queue pend I can see some GPS data in there. This never shows on the events panel or updates location yet.
Is that feature still in progress?
Also, I’ve a hybrid and I suspect that when I start rolling that the voltage difference isn’t sufficient to wake the AutoPi from it’s slumber. My drive to work this morning didn’t seem to wake the device at all.
Did some further testing. Forced the engine to run and connected locally. Using obd.status on the local dongle showed the below. No events listed in the minion log file for any engine data. Just voltage.
So, a couple of other users has already reported that some EV and PHEV has problems returning the data directy.
You can see all data available through standard OBD PID’s using this command:
obd.commands
You will most likely discover that your wife’s petrol car har a lot more commands available.
The solution to get the data from the EV, and there is a solution, is to listen to commands flowing on the can bus using socketcan. We are working on a solution for this, but you are more than welcome to investigate this until the “official” solution is ready.
Well, it’s not officially supported yet, but as the system is open source, it is very possible.
You should look into creating a custom salt module, the same as the ec2x module that peter mentioned above.
So does it have to be a salt module? I already have python scripts that run on the pi, I just need to figure out how to access the salt module from shell to get the data for my scripts.
I found I could run s salt command from shell, but it takes a VERY long time to execute.
pi@raspberrypi:~ $ date ; sudo salt-call ec2x.gnss_location ; date
Tue 24 Jul 14:30:15 UTC 2018
local:
----------
_stamp:
2018-07-24T14:31:02.476297
alt:
28.0
cog:
0.0
date_utc:
2018-07-24
fix:
2D
hdop:
2.0
lat:
42.35943
lon:
-71.02703
nsat:
9
sog_km:
0.0
sog_kn:
0.0
time_utc:
14:31:02
Tue 24 Jul 14:31:04 UTC 2018
pi@raspberrypi:~ $
Yeah, it needs to be a salt module, the reason for this, is that it gets a lot of context from the minion instance and ability to talk to other modules this way.
But you don’t need to move everything, you should be able to create a ‘skeleton/shell’ module, that imports your other code and executes it.
Regarding the long run time of the command, then yes, using salt-call is not a good way to do it, as this spins up an entirely new instance of the minion, calls the command and then exists.
This adds a lot of overhead.
If you add a custom module to the modules directory on the minion, remember to restart the salt-minion service. I don’t think it will show up if you dont.
Do you have your code hosted on github by any chance? I’d love to take a look at some point.