Merge branch 'klipper_dev' of https://github.com/fredrikbaberg/ha-3dprinter-addons into klipper_dev

This commit is contained in:
Fredrik Baberg
2024-02-08 22:25:12 +01:00
83 changed files with 1891 additions and 1891 deletions

View File

@@ -1,3 +1,3 @@
## 2024.01.0
## 2024.01.0
* Maintenance release

View File

@@ -1,14 +1,14 @@
ARG BUILD_FROM="ghcr.io/home-assistant/amd64-base"
FROM ${BUILD_FROM} AS final
ENV LANG C.UTF-8
RUN echo "Install base requirements." \
&& apk add --no-cache ser2net
COPY rootfs/ /
WORKDIR /
# Make files executable
RUN chmod +x /etc/cont-init.d/*.sh
RUN chmod +x /etc/services.d/*/*
ARG BUILD_FROM="ghcr.io/home-assistant/amd64-base"
FROM ${BUILD_FROM} AS final
ENV LANG C.UTF-8
RUN echo "Install base requirements." \
&& apk add --no-cache ser2net
COPY rootfs/ /
WORKDIR /
# Make files executable
RUN chmod +x /etc/cont-init.d/*.sh
RUN chmod +x /etc/services.d/*/*

View File

@@ -1,12 +1,12 @@
# 3DPrinter-Remote
Provides remote access to 3DPrinter. Add-on runs ser2net and can be connected to by e.g. socat.
## Usage
On the machine connected to the printer (`remote machine`):
* Setup the add-on. At minimum you will need to specify `printer_path` and verify that `baud_rate` is correct.
On the machine with OctoPrint:
* Go to Settings --> Serial Connection, section __Additional serial ports__. Add : `socket://<remote machine>:9999`. For example, use the IP for `remote machine`.
# 3DPrinter-Remote
Provides remote access to 3DPrinter. Add-on runs ser2net and can be connected to by e.g. socat.
## Usage
On the machine connected to the printer (`remote machine`):
* Setup the add-on. At minimum you will need to specify `printer_path` and verify that `baud_rate` is correct.
On the machine with OctoPrint:
* Go to Settings --> Serial Connection, section __Additional serial ports__. Add : `socket://<remote machine>:9999`. For example, use the IP for `remote machine`.
* Install plugin [OctoPrint-Network-Printing](https://github.com/hellerbarde/OctoPrint-Network-Printing)

View File

@@ -1,29 +1,29 @@
name: "3DPrinter-Remote"
version: "2024.01.0"
slug: "3dprinter-remote"
description: "Add-on for accessing 3DPrinter remotely using socat"
url: "https://github.com/fredrikbaberg/ha-3dprinter-addons/tree/main/3dprinter-remote"
arch:
- armv7
- amd64
- armhf
- aarch64
- i386
stage: experimental
init: false
gpio: true
usb: true
uart: true
ports:
9999/tcp: 9999
ports_description:
9999/tcp: Port for access to ser2net
options:
printer_path: "/dev/null"
printer_baudrate: "115200"
ser2net_args: ""
schema:
printer_path: "str"
printer_baudrate: "int"
ser2net_args: "str?"
image: ghcr.io/fredrikbaberg/ha-addon-3dprinter-remote-{arch}
name: "3DPrinter-Remote"
version: "2024.01.0"
slug: "3dprinter-remote"
description: "Add-on for accessing 3DPrinter remotely using socat"
url: "https://github.com/fredrikbaberg/ha-3dprinter-addons/tree/main/3dprinter-remote"
arch:
- armv7
- amd64
- armhf
- aarch64
- i386
stage: experimental
init: false
gpio: true
usb: true
uart: true
ports:
9999/tcp: 9999
ports_description:
9999/tcp: Port for access to ser2net
options:
printer_path: "/dev/null"
printer_baudrate: "115200"
ser2net_args: ""
schema:
printer_path: "str"
printer_baudrate: "int"
ser2net_args: "str?"
image: ghcr.io/fredrikbaberg/ha-addon-3dprinter-remote-{arch}

View File

@@ -1,14 +1,14 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Add-on: 3dprinter-remote
# Setup ser2net.conf
# ==============================================================================
# Generate ser2net configuration
bashio::var.json \
printer_path "$(bashio::config 'printer_path')" \
printer_baudrate "$(bashio::config 'printer_baudrate')" \
ser2net_args "$(bashio::config 'ser2net_args')" \
| tempio \
-template /usr/share/tempio/ser2net/ser2net.conf.gtpl \
-out /etc/ser2net.conf
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Add-on: 3dprinter-remote
# Setup ser2net.conf
# ==============================================================================
# Generate ser2net configuration
bashio::var.json \
printer_path "$(bashio::config 'printer_path')" \
printer_baudrate "$(bashio::config 'printer_baudrate')" \
ser2net_args "$(bashio::config 'ser2net_args')" \
| tempio \
-template /usr/share/tempio/ser2net/ser2net.conf.gtpl \
-out /etc/ser2net.conf

View File

@@ -1,9 +1,9 @@
#!/usr/bin/execlineb -S0
# ==============================================================================
# Add-on: mjpg-streamer
# Take down the S6 supervision tree when mjpg-streamer fails
# ==============================================================================
if -n { s6-test $# -ne 0 }
if -n { s6-test ${1} -eq 256 }
s6-svscanctl -t /var/run/s6/services
#!/usr/bin/execlineb -S0
# ==============================================================================
# Add-on: mjpg-streamer
# Take down the S6 supervision tree when mjpg-streamer fails
# ==============================================================================
if -n { s6-test $# -ne 0 }
if -n { s6-test ${1} -eq 256 }
s6-svscanctl -t /var/run/s6/services

View File

@@ -1,9 +1,9 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Add-on: 3dprinter-remote
# Runs ser2net
# ==============================================================================
bashio::log.info "Starting ser2net.."
exec ser2net -d
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Add-on: 3dprinter-remote
# Runs ser2net
# ==============================================================================
bashio::log.info "Starting ser2net.."
exec ser2net -d

View File

@@ -1,2 +1,2 @@
9999:raw:0:{{ .printer_path }}:{{ .printer_baudrate }} {{ .ser2net_args }}
BANNER:banner1:Welcome to ser2net \rTCP port \p device \d\r
9999:raw:0:{{ .printer_path }}:{{ .printer_baudrate }} {{ .ser2net_args }}
BANNER:banner1:Welcome to ser2net \rTCP port \p device \d\r