Function hosting tutorial
In these steps we will explain how to create a fresh application with openOBD functions that are accessible from your partner dashboard. Since the functions and their execution remain under control of the owner we need a way to trigger function calls from the Jifeline dashboard. Here we will explain step-by-step how to serve your functions to the Jifeline network.
Info
- Make sure that you use at least version 1.25.3 of the
openobdPython module. - This documentation makes use of the Replit.com on-line Python service to explain how you can host your functions, but be aware that for reliable hosting we strongly advice you to serve the functions from your own managed infrastructure. For testing and limited usage the Replit.com solution might suffice.
Configure your new openOBD hosting app in Replit
- Go to the 'Home' page of your Replit.com account
- In the menu of your Replit.com account select
Developers frameworks - Under 'Languages' select 'Python'
- Click the 'Remix' button to initialize a Python project app.
- Define a 'Name' and 'Description' and click 'Use framework'
- Click the tab 'Tools & files' and search for 'shell', click on 'shell'
-
In the shell make sure to install the
openobdpackage:upm add openobd
-
In the top right click a small button
to open the 'File' pane. - Open the
main.pyfile and write the following script. This will test if theopenobdmodule is correctly installed. - Click the run button

- When everything is correctly installed the ouput in the 'Console' window will show the text
My first openOBD function hosting service
Configure your credentials
- In your hosting project on Replit.com go to the tab 'Tools & files' and search for 'secrets', click on it.
- The following screen opens:

- Click 'new secret' and add the following secrets:
OPENOBD_PARTNER_CLIENT_IDOPENOBD_PARTNER_CLIENT_SECRET

Run script to test your setup
- Make sure your file pane on the right is open. (Toggle top right button
). - Create a folder 'myfunctions' in your project.
- In this folder create a new python file (extension .py).
- In this file create a very simple script that can run on an ticket in your dashboard. Paste the following:
from openobd import *
class EOBDReadVIN(OpenOBDFunction):
def run(self):
logging.info("Everything is setup fine!")
- When you have no shell, click the tab 'Tools & files' and search for 'shell', click on 'shell'
-
In the shell we can start the simple script with the following command:
python -m openobd run --file myfunctions/<yourfile.py> --ticket <TICKET_NR>

- The output should show you the log line and finish without errors.