I am trying to make a local dashboard for the touchscreen on my AutoPi, but I am not experienced with python. My biggest issue is knowing how to call different values from the obd, such as speed and RPM. Does anybody have an idea on how to do this?
Hi, I want to do the same thing but I think’s to do it with a HTML page.
For the moment I try the postman procedure but it’s not really effective.
Well it can be done in different ways.
- Call the modules via the terminal endpoint in the local http rest api running on the device.
- Extend the running service on the device to push data somewhere else other than the current redis buffer.
- Fetch the data directly from redis
Option 2 and 3 will be faster than option 1, but both options will require some changes to either the code, or configuration changes if the data you need is not already included in the stuff that is retrieved from the vehicle.
Option 2 will bypass the whole “put data into redis and load it again” step, so it will be the fastest for realtime data.
Option 3 will not require any modifications or extensions to the autopi-core software, so it can be completely isolated to your project, and therefore it might be the easiest to implement.
Option 1 is the slowest but also the easiest way to interface with the car, but it is also the way to send commands to the car, so it is more request response, than streaming speed data etc. So if your dashboard needs a button that will for instance honk the horn or something, you’d implement that using option 1, and then getting the speed or other data should be done using option 2 or 3, but it is possible using option 1, it’s just slow.
You can try this out by using the local configuration tool on local.autopi.io while being connected to the device hotspot, then opening developer tools will show the requests that are sent when you use the web terminal.
As always, you can check out the source of the code that is running on the device, and how it can be extended and or modified.