Skip to content

Commit

Permalink
Merge pull request #37 from jeffeb3/merge
Browse files Browse the repository at this point in the history
Merge
  • Loading branch information
jeffeb3 authored Jan 6, 2022
2 parents f0ab2d5 + 39862b8 commit a507bad
Show file tree
Hide file tree
Showing 14 changed files with 73 additions and 49 deletions.
23 changes: 0 additions & 23 deletions .circleci/config.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/docs_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build mkdocs
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
name: Build docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: mkdocs build
run: mkdocs build --clean --strict
20 changes: 20 additions & 0 deletions .github/workflows/docs_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish docs via GitHub Pages
on:
push:
branches:
- master

jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v2

- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
# Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REQUIREMENTS: requirements.txt
11 changes: 7 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ name: Build Image

on:
schedule:
# At 10:15 each day. No idea what time zone this is...
# At 10:15 UTC each day.
- cron: '15 10 * * *'

pull_request: {}
push:
branches:
- master
tags:
- v*

Expand Down Expand Up @@ -52,7 +54,7 @@ jobs:
submodules: true

- name: Download Raspbian Image
run: cd repository/src/image && wget -q -c --trust-server-names 'https://downloads.raspberrypi.org/raspbian_lite_latest'
run: cd repository/src/image && wget -q -c --trust-server-names 'https://downloads.raspberrypi.org/raspios_lite_armhf_latest'

- name: Update CustomPiOS Paths
run: cd repository/src && ../../CustomPiOS/src/update-custompios-paths
Expand All @@ -64,12 +66,13 @@ jobs:
run: sudo modprobe loop && cd repository/src && sudo bash -x ./build_dist

- name: Copy Output
run: cp ${{ github.workspace }}/repository/src/workspace/*-raspbian-buster-lite.img "v1pi-${{ env.V1PI_VERSION }}-${{ matrix.hotspot }}".img
run: cp ${{ github.workspace }}/repository/src/workspace/*-raspios-bullseye-armhf-lite.img "v1pi-${{ env.V1PI_VERSION }}-${{ matrix.hotspot }}".img

- name: Zip Output
run: zip -prq "v1pi-${{ env.V1PI_VERSION }}-${{ matrix.hotspot }}".zip "v1pi-${{ env.V1PI_VERSION }}-${{ matrix.hotspot }}".img

- uses: actions/upload-artifact@v1
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: v1pi-${{ env.V1PI_VERSION }}-${{ matrix.hotspot }}
path: v1pi-${{ env.V1PI_VERSION }}-${{ matrix.hotspot }}.img
Expand Down
2 changes: 1 addition & 1 deletion dependencies/OctoPi
Submodule OctoPi updated 37 files
+65 −0 .github/workflows/build.yml
+3 −0 .gitignore
+12 −6 README.rst
+ media/rpi-imager-OctoPi.png
+3 −1 src/config
+5 −0 src/image-raspios_lite_arm64/README
+2 −2 src/image/README
+10 −13 src/modules/octopi/config
+22 −1 src/modules/octopi/filesystem/boot/octopi.txt
+10 −0 src/modules/octopi/filesystem/home/pi/scripts/safemode
+2 −0 src/modules/octopi/filesystem/home/root/bin/git
+32 −0 src/modules/octopi/filesystem/home/root/bin/streamer_select
+79 −29 src/modules/octopi/filesystem/home/root/bin/webcamd
+0 −22 src/modules/octopi/filesystem/root/etc/default/octoprint
+0 −13 src/modules/octopi/filesystem/root/etc/default/webcamd
+68 −0 src/modules/octopi/filesystem/root/etc/haproxy/errors/503-no-webcam-hls.http
+8 −1 src/modules/octopi/filesystem/root/etc/haproxy/haproxy.1.x.cfg
+49 −0 src/modules/octopi/filesystem/root/etc/haproxy/haproxy.2.x.cfg
+0 −141 src/modules/octopi/filesystem/root/etc/init.d/octoprint
+1 −1 src/modules/octopi/filesystem/root/etc/logrotate.d/webcamd
+23 −0 src/modules/octopi/filesystem/root/etc/network/if-up.d/powersave_off
+11 −0 src/modules/octopi/filesystem/root/etc/nginx/sites-available/default
+54 −0 src/modules/octopi/filesystem/root/etc/systemd/system/ffmpeg_hls.service
+8 −0 src/modules/octopi/filesystem/root/etc/systemd/system/networkcheck.service
+10 −0 src/modules/octopi/filesystem/root/etc/systemd/system/networkcheck.timer
+14 −0 src/modules/octopi/filesystem/root/etc/systemd/system/octoprint.service
+10 −0 src/modules/octopi/filesystem/root/etc/systemd/system/streamer_select.service
+4 −0 src/modules/octopi/filesystem/root/etc/systemd/system/webcamd.service
+20 −0 src/modules/octopi/filesystem/root/usr/lib/systemd/system/nginx.service
+28 −0 src/modules/octopi/filesystem/root/usr/local/bin/networkcheck
+6 −0 src/modules/octopi/filesystem/root/var/lib/ffmpeg_hls/stream.m3u8
+115 −51 src/modules/octopi/start_chroot_script
+7 −6 src/nightly_build_scripts/generate_nightly_page.js
+8 −0 src/variants/ubuntu_arm64/config
+49 −0 src/variants/ubuntu_arm64/filesystem/root/etc/haproxy/haproxy.cfg
+15 −0 src/variants/ubuntu_arm64/filesystem/root/etc/systemd/system/webcamd.service
+17 −0 src/variants/ubuntu_arm64/post_chroot_script
4 changes: 2 additions & 2 deletions docs/camera.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Set up CNC.js settings

![image](img/cncjs_webcam_gear.png)

2. Select "Use a M-JPEG stream over HTTP" option, and put this URL for your video stream: `webcam/?action=stream`.

2. Select "Use a M-JPEG stream over HTTP" option, and put this URL for your video stream: `http://v1pi/webcam/?action=stream`.
- You may need to put in the IP address or add .local to v1pi to make it work for your network setup.
![image](img/cncjs_webcam_settings.png)

2. Click Save Changes.
Expand Down
Binary file modified docs/img/cncjs_webcam_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ theme:
favicon: "img/favicon.ico"

extra:
version: 0.17.0
version: 0.18.0
social:
- type: 'github'
link: 'https://github.com/jeffeb3'
Expand All @@ -31,6 +31,9 @@ extra:
link: 'https://liberapay.com/jeffeb3'
- type: 'globe'
link: 'https://v1engineering.com'
analytics:
provider: google
property: 'UA-154250450-1'

extra_css: [v1.css]

Expand Down Expand Up @@ -67,7 +70,3 @@ markdown_extensions:
permalink: true
- lightgallery
- pymdownx.extra

google_analytics:
- 'UA-154250450-1'
- 'auto'
4 changes: 2 additions & 2 deletions src/config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export DIST_NAME=v1pi
export DIST_VERSION=0.17.1
export BASE_IMAGE_ENLARGEROOT=800
export DIST_VERSION=0.18.0
export BASE_IMAGE_ENLARGEROOT=1400

source ./hotspot.sh

Expand Down
4 changes: 2 additions & 2 deletions src/modules/cncjs/filesystem/home/pi/.cncrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"commands": [
{
"title": "Reboot",
"commands": "sudo reboot",
"commands": "sudo shutdown -r now",
"enabled": true
},
{
"title": "Shutdown",
"commands": "sudo poweroff",
"commands": "sudo shutdown -h now",
"enabled": true
}
]
Expand Down
6 changes: 3 additions & 3 deletions src/modules/cncjs/filesystem/home/pi/landingPage/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ def getServiceRunning(service):
output = subprocess.check_output(['service', service, 'status'])
except subprocess.CalledProcessError as err:
output = err.output
if 'active (running)' in output:
if b'active (running)' in output:
print("{} is running".format(service))
return True
if 'active (exited)' in output:
if b'active (exited)' in output:
print("{} has exited".format(service))
return False
if 'inactive (dead)' in output:
if b'inactive (dead)' in output:
print("{} is dead".format(service))
return False
print("{} is unknown".format(service))
Expand Down
6 changes: 3 additions & 3 deletions src/modules/cncjs/filesystem/root/etc/haproxy/haproxy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ defaults
option forwardfor
maxconn 2000
timeout connect 5s
timeout client 15min
timeout server 15min
timeout client 15m
timeout server 15m

frontend landing
bind :::80 v4v6
Expand Down Expand Up @@ -45,7 +45,7 @@ backend octoprint
errorfile 503 /etc/haproxy/errors/503-no-octoprint.http

backend webcam
reqrep ^([^\ :]*)\ /webcam[/]?(.*) \1\ /\2
http-request replace-uri /webcam/(.*) /\1
server webcam1 127.0.0.1:8080
errorfile 503 /etc/haproxy/errors/503-no-webcam.http

Expand Down
5 changes: 3 additions & 2 deletions src/modules/cncjs/start_chroot_script
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ pushd /home/pi
# make links to the logos
pushd landingPage/static
ln -s /usr/local/lib/node_modules/cncjs/dist/cncjs/app/images/logo-badge-256x256.png logo_cncjs.png
ln -s /home/pi/oprint/lib/python2.7/site-packages/octoprint/static/img/logo.png logo_octoprint.png
ln -s /home/pi/oprint/lib/python3.9/site-packages/octoprint/static/img/logo.png logo_octoprint.png
ln -s /var/www/html/app/img/raspAP-logo.png logo_raspap.png
popd

#build virtualenv
pushd landingPage
sudo -u pi virtualenv flask
# Change to python2 if the landingPage is not comaptible
sudo -u pi python3 -m virtualenv --python=python3 flask
sudo -u pi ./flask/bin/pip install --upgrade pip
PIP_DEFAULT_TIMEOUT=60 sudo -u pi ./flask/bin/pip install flask
popd
Expand Down
5 changes: 3 additions & 2 deletions src/modules/nodejs/config
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# All our config settings must start with NODEJS

# node.js archive
# The version of node.js needed for cnc.js is 6: https://cnc.js.org/
[ -n "$NODEJS_VERSION_STRING" ] || NODEJS_VERSION_STRING="v6.17.1"
# The version of node.js needed for cnc.js is 10 or 12: https://cnc.js.org/
# v10.24.1 armv6l (Pi1,Zero), v12.22.7 arm7l (PI3,4,Zero2 ARMV8)
[ -n "$NODEJS_VERSION_STRING" ] || NODEJS_VERSION_STRING="v10.24.1"
[ -n "$NODEJS_ARCH_STRING" ] || NODEJS_ARCH_STRING="linux-armv6l"
[ -n "$NODEJS_VERSION_FOLDER" ] || NODEJS_VERSION_FOLDER="node-$NODEJS_VERSION_STRING-$NODEJS_ARCH_STRING"
[ -n "$NODEJS_VERSION_TAR" ] || NODEJS_VERSION_TAR="$NODEJS_VERSION_FOLDER.tar.gz"
Expand Down

0 comments on commit a507bad

Please sign in to comment.