BlueWave Studio forum
  • Login
  • Register
  • Login Register
    Login
    Username:
    Password:
  • Home
  • Help
  • View Today's Post
  • More
    • BlueWave Studio
    • Shop
User Links
  • Login
  • Register
  • Login Register
    Login
    Username:
    Password:

    Quick Links Home Help View Today's Post
    More
    • BlueWave Studio
    • Shop
    BlueWave Studio forum OpenAuto Pro OBD-II Check out my open-source OBDII application for OpenAuto

    Check out my open-source OBDII application for OpenAuto
    guntada
    Offline

    Junior Member

    Posts: 5
    Threads: 2
    Joined: Jun 2022
    Reputation: 1
    #1
    02-08-2023, 04:50 PM
    Hey everyone,

    For a while in my spare time I have been developing a web based OBD2 application called OnBoardPi meant to be ran on a Raspberry Pi. I started before I knew about OAP but have recently switched to it. The application allows you to watch/unwatch OBD pids dynamically on the provided GUI but also injects the values back to OAP via its API. OnBoardPi parses the config files for PIDs/guages so theres no need to manually change anything other than disabling OAP from connecting to the OBD adapter. Please check it out and feel free to ask any questions related to set up or configuration. I can post more documentation/videos if it gains any traction here.

    Thanks,

    Bennett

    GitHub Repository 

    Demo application

    Daniel_BlueWave
    Offline

    BlueWave Team member

    Posts: 1,213
    Threads: 45
    Joined: Jul 2019
    Reputation: 53
    #2
    02-08-2023, 06:11 PM
    Looks very well. Congratulation of your good work.
    KreAch3R
    Offline

    Member

    Posts: 196
    Threads: 18
    Joined: Apr 2020
    Reputation: 13
    #3
    02-09-2023, 01:13 PM
    Hello! Your app looks great, I wanted to try it! Following your instructions on Github, I saw that it needed docker, is that completely necessary? I hadn't installed in my image thus far and I want to keep it as minimal as possible. But anyway, I gave it a try on my test RPi and docker-compose needs Python 3.5, which the OAP image doesn't have. Have you had it installed? Does it mess with the OAP system anywhere, did you need to set it as default or change anything else because of it?
    guntada
    Offline

    Junior Member

    Posts: 5
    Threads: 2
    Joined: Jun 2022
    Reputation: 1
    #4
    02-09-2023, 05:32 PM (This post was last modified: 02-09-2023, 05:35 PM by guntada.)
    Docker is not completely necessary, however it makes it much easier to handle the required dependencies and runtimes (NodeJS, PostgreSQL database, and python, etc). I can look into creating and testing some binaries/systemd services if you would like. Part of me wants to migrate the whole application over to python which would make install from source easier. The reasons it is structured how it is is a long story for another time.

    As far as docker-compose goes, it seems to be included in fresh installs of Docker now so try the command:

    docker compose up -d

    (docker compose without the '-')

    If that doesn't work uninstall docker-compose (if it was) and install it specifically with python3 which should be included as part of the OAP image. So,

    python3 -m pip install docker-compose

    Then, retry the above up command, or with the hyphen 'docker-compose'.

    Let me know if that helps. And no it runs completely separate of the OAP install and you can disable the OAP API injection if you wish just know if you use OAP's built-in OBD connection, then OnBoardPi will not be able to connect to the adapter. It only reads the OAP config files on startup to get the gauge/pids which are needed for the dashboards on OAP.
    KreAch3R
    Offline

    Member

    Posts: 196
    Threads: 18
    Joined: Apr 2020
    Reputation: 13
    #5
    02-09-2023, 08:54 PM (This post was last modified: 02-09-2023, 09:31 PM by KreAch3R.)
    Thanks for the fast reply, yes, I managed to install it using your modified way.

    How do you open it from inside OAP? Using a Chrome tab to launch the address?

    EDIT: I get ERR_NETWORK_CHANGED at raspberrypi.local and ERR_CONNECTION_REFUSED at 127.0.0.1 but it could also be a problem on my connectivity setup. (I'm using Teamviewer to check the pi). Is there anything I can try on your end to check if your page is up correctly?
    guntada
    Offline

    Junior Member

    Posts: 5
    Threads: 2
    Joined: Jun 2022
    Reputation: 1
    #6
    02-09-2023, 11:40 PM (This post was last modified: 02-09-2023, 11:49 PM by guntada.)
    First off, thank you for doing this and helping me make OnBoardPi more accessible for others. I will continuously update the repo wiki with toubleshooting advice based on what we have done here.

    So, let's check if the containers are running properly. In a terminal on the Pi, cd to the directory where you installed with docker compose and run:

    docker compose ps

    You should see some output like:
    NAME                COMMAND                  SERVICE            STATUS              PORTS
    onboardpi-db-1      "docker-entrypoint.s…"  db                  running            5432/tcp
    onboardpi-obd-1    "python3 server.py"      obd                running            0.0.0.0:60000->60000/tcp
    onboardpi-web-1    "docker-entrypoint.s…"  web                running            0.0.0.0:80->8080/tcp
    

    The web GUI is served by the web container so if it is not running, that could be the reason you are not able to access it. Note my instance is mapping the Pi's port 80 to the containers 8080 so you should be able to get to the web app by opening a browser tab and entering http://localhost - tls is not used so make sure you do not enter 'https'. From TeamViewer/VNC/RDP/or similar you should also use localhost or 127.0.0.1.

    From another device, make sure it and the Pi are on the same LAN and try raspberrypi.local assuming that is the hostname of your Pi. Else, use ifconfig on the Pi to get its IP and enter e.g. http://192.168.0.1 in a browser.

    Now, to launch OnBoardPi from OAP, you can add it as an external application. I have written steps on how to do that here:

    https://github.com/bgunson/onboardpi/wiki/OpenAuto-Pro

    Edit:
    If docker compose ps looks good and you still cannot access the web page, run docker compose logs web obd, if there are errors please PM me the output or attach it in a file in a reply.
    KreAch3R
    Offline

    Member

    Posts: 196
    Threads: 18
    Joined: Apr 2020
    Reputation: 13
    #7
    03-09-2023, 10:22 PM
    Thank you for the reply. I just found the time to play around with it. I think it is still a problem with the install steps. I think you're assuming I'm installing it as root / using sudo? These are the errors I get if I try the docker compose up -d command without sudo:

    permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json?filters=%7B%22label%22%3A%7B%22com.docker.compose.config-hash%22%3Atrue%2C%22com.docker.compose.oneoff%3DFalse%22%3Atrue%2C%22com.docker.compose.project%3Donboardpi%22%3Atrue%7D%7D": dial unix /var/run/docker.sock: connect: permission denied

    And if I try the docker compose ps command:

    permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json?filters=%7B%22label%22%3A%7B%22com.docker.compose.config-hash%22%3Atrue%2C%22com.docker.compose.oneoff%3DFalse%22%3Atrue%2C%22com.docker.compose.project%3Donboardpi%22%3Atrue%7D%7D": dial unix /var/run/docker.sock: connect: permission denied


    Lastly, after sudoing the above command:
    NAME                IMAGE                               COMMAND                  SERVICE             CREATED             STATUS                                    PORTS
    onboardpi-db-1      timescale/timescaledb:latest-pg14   "docker-entrypoint.s…"   db                  3 minutes ago       Restarting (1) 9 seconds ago
    onboardpi-obd-1     bgunson/onboardpi-obd:latest        "python3 server.py"      obd                 3 minutes ago       Restarting (1) 21 seconds ago
    onboardpi-web-1     bgunson/onboardpi-web:latest        "docker-entrypoint.s…"   web                 3 minutes ago       Restarting (133) Less than a second ago

    everything keeps restarting.
    guntada
    Offline

    Junior Member

    Posts: 5
    Threads: 2
    Joined: Jun 2022
    Reputation: 1
    #8
    03-09-2023, 11:37 PM (This post was last modified: 03-09-2023, 11:41 PM by guntada.)
    Hi,

    Docker requires root becuase it uses a Unix socket for the daemon, which you cannot connect to as seen in your above output. Please use sudo for all docker commands, or follow these steps: https://docs.docker.com/engine/install/l...-root-user and retry the docker compose up command. If the containers are still continuously restarting can you run docker compose logs obd web and forward me the output.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)



    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Help · BlueWave Studio · Shop

    Copyright © bluewavestudio.io. All rights reserved.

    Linear Mode
    Threaded Mode