Skip to content

Function hosting setup (pre-release 1.25.1rc3)

We want to create a fresh application where we want to host our openOBD functions.

This is a pre-release featuring version 1.25.1rc3 of the Python openobd module

The pre-release can be installed by explicitly defining the 1.25.1rc3 version number. We will update this page when it has been released as a new major version.

The package is hosted at the public repository Pypi.org, 1.25.1rc3

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 openobd package:
    • upm add openobd==1.25.1rc3 and <enter>
  • In the top right click a small button File pane to open the 'File' pane.
  • Open the main.py file and write the following script. This will test if the openobd module is correctly installed.
    from openobd import *
    
    print("My first openOBD function hosting service")
    
  • Click the run button Run
  • 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:

Secrets

  • Click 'new secret' and add the following secrets:
    • OPENOBD_PARTNER_CLIENT_ID
    • OPENOBD_PARTNER_CLIENT_SECRET

Secrets

Run script to test your setup
  • Make sure your file pane on the right is open. (Toggle top right button File pane).
  • 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 <ticketnr> and <enter>

Success

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