This provides OBS Overlay endpoints to show information about a network printer.
/overlay/progress
: Shows a progress bar/overlay/info
: Shows print info label/api/job
: The endpoint that provides the info to the UI endpoints
OCTOPRINT_API_KEY
: The OctoPrint API KeyOCTOPRINT_HOST
: OctoPrint server Host nameOCTOPRINT_PORT
: OctoPrint server Port
The conainer exposes port 3000. -P
will map the port on the host.
$ docker build --pull --tag camalot/obs-octoprint -f "./Dockerfile" .
$ docker run -d -P \
--restart unless-stopped \
--name "obs-octoprint" \
-e OCTOPRINT_API_KEY="${OCTOPRINT_API_KEY}" \
-e OCTOPRINT_HOST="${OCTOPRINT_HOST}" \
-e OCTOPRINT_PORT="${OCTOPRINT_PORT}" \
-t camalot/obs-octoprint
- Create a
.env
file in theobs-octoprint
directory. - Add the following:
OCTOPRINT_API_KEY=<MY_OCTOPRINT_API_KEY>
OCTOPRINT_HOST=<MY_OCTOPRINT_HOST_NAME>
OCTOPRINT_PORT=5000
- Open shell and run the following:
$ npm install
$ npm start
- Open a browser to http://localhost:3000/overlay/info
cd /obs-octoprint/bin
Nodemon for monitoring for file changes and restart
npm i nodemon
pm2 for autostart see: https://pm2.keymetrics.io/docs/usage/quick-start/
npm install pm2@latest -g
pm2 start nodemon www
pm2 startup
sudo env PATH=$PATH:/usr/bin /usr/local/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi
For status
pm2 status