BlueWave Studio forum
Check out my open-source OBDII application for OpenAuto - Printable Version

+- BlueWave Studio forum (https://bluewavestudio.io/community)
+-- Forum: OpenAuto Pro (https://bluewavestudio.io/community/forum-86.html)
+--- Forum: OBD-II (https://bluewavestudio.io/community/forum-103.html)
+--- Thread: Check out my open-source OBDII application for OpenAuto (/thread-3691.html)

Pages: 1 2


Check out my open-source OBDII application for OpenAuto - guntada - 02-08-2023

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




RE: Check out my open-source OBDII application for OpenAuto - Daniel_BlueWave - 02-08-2023

Looks very well. Congratulation of your good work.


RE: Check out my open-source OBDII application for OpenAuto - KreAch3R - 02-09-2023

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?


RE: Check out my open-source OBDII application for OpenAuto - guntada - 02-09-2023

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.


RE: Check out my open-source OBDII application for OpenAuto - KreAch3R - 02-09-2023

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?


RE: Check out my open-source OBDII application for OpenAuto - guntada - 02-09-2023

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.


RE: Check out my open-source OBDII application for OpenAuto - KreAch3R - 03-09-2023

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.


RE: Check out my open-source OBDII application for OpenAuto - guntada - 03-09-2023

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/linux-postinstall/#manage-docker-as-a-non-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.


RE: Check out my open-source OBDII application for OpenAuto - TechyTP - 04-04-2023

(03-09-2023, 11:37 PM)guntada Wrote: 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/linux-postinstall/#manage-docker-as-a-non-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.

I am getting some issues as well, I have posted the log files to you as an issue on git, hope you can help. Can get this to work on a clean pi install but have issues when using the one that has OAP installed.


RE: Check out my open-source OBDII application for OpenAuto - guntada - 04-05-2023

Hi Techy,

Thank you so much for submitting your log files to me. It has reminded me that the OAP 16 image is slightly out-of-date and comes with a version of the libseccomp package that is not compatible with Docker/Docker compose. I pinned the fix in your github issue, but it can be found here in case others run into the same problem. Let me know if that works for you and you can get it running!