Compare commits

..

12 Commits

Author SHA1 Message Date
Fredrik Baberg
57589d1fea Add moonraker reverse proxy for fluidd 2024-02-09 10:23:21 +01:00
Fredrik Baberg
112ea41090 Disable verbose logging of moonraker 2024-02-09 10:22:28 +01:00
Fredrik Baberg
96ae77e496 Add libgpiod 2024-02-09 10:22:11 +01:00
Fredrik Baberg
225a2fbc72 Make fluidd.sh executable 2024-02-08 23:19:02 +01:00
Fredrik Baberg
f437a1f61d Make files executable 2024-02-08 22:52:29 +01:00
Fredrik Baberg
f313ec8c55 Merge branch 'klipper_dev' of https://github.com/fredrikbaberg/ha-3dprinter-addons into klipper_dev 2024-02-08 22:31:29 +01:00
Fredrik Baberg
3d0fdb2373 Merge branch 'klipper_dev' of https://github.com/fredrikbaberg/ha-3dprinter-addons into klipper_dev 2024-02-08 22:31:20 +01:00
Fredrik Baberg
9d2a8b575a Merge branch 'klipper_dev' of https://github.com/fredrikbaberg/ha-3dprinter-addons into klipper_dev 2024-02-08 22:25:12 +01:00
Fredrik Baberg
eba75db654 Update Klipper with Fluidd. 2024-02-08 22:22:14 +01:00
Fredrik Baberg
a2616b72e3 Make scripts executable 2024-02-05 13:42:00 +01:00
Fredrik Baberg
2155218870 Update tasks file 2024-02-05 13:12:34 +01:00
Fredrik Baberg
6e02571291 Add initial Klipper with Moonraker setup. Untested. 2024-02-05 04:17:28 +01:00
91 changed files with 2078 additions and 1487 deletions

View File

@ -100,7 +100,7 @@ jobs:
- name: Login to GitHub Container Registry
if: env.BUILD_ARGS != '--test'
uses: docker/login-action@v3.3.0
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
@ -108,7 +108,7 @@ jobs:
- name: Build ${{ matrix.addon }} add-on
if: steps.check.outputs.build_arch == 'true'
uses: home-assistant/builder@2024.08.1
uses: home-assistant/builder@2024.01.0
with:
args: |
${{ env.BUILD_ARGS }} \

View File

@ -9,7 +9,7 @@ jobs:
name: Cleanup packages
steps:
- name: Delete RC version of packages
uses: smartsquaregmbh/delete-old-packages@v0.8.1
uses: smartsquaregmbh/delete-old-packages@v0.7.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
user: fredrikbaberg

View File

@ -36,6 +36,6 @@ jobs:
uses: actions/checkout@v4
- name: 🚀 Run Home Assistant Add-on Lint
uses: frenck/action-addon-linter@v2.18
uses: frenck/action-addon-linter@v2.15
with:
path: "./${{ matrix.path }}"

View File

@ -34,7 +34,7 @@ jobs:
- name: Login to GitHub Container Registry
if: env.BUILD_ARGS != '--test'
uses: docker/login-action@v3.3.0
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
@ -42,7 +42,7 @@ jobs:
- name: Build ${{ matrix.addon }} add-on
if: steps.check.outputs.build_arch == 'true'
uses: home-assistant/builder@2024.08.1
uses: home-assistant/builder@2024.01.0
with:
args: |
${{ env.BUILD_ARGS }} \

View File

@ -34,7 +34,7 @@ jobs:
- name: Login to GitHub Container Registry
if: env.BUILD_ARGS != '--test'
uses: docker/login-action@v3.3.0
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
@ -42,7 +42,7 @@ jobs:
- name: Build ${{ matrix.addon }} add-on
if: steps.check.outputs.build_arch == 'true'
uses: home-assistant/builder@2024.08.1
uses: home-assistant/builder@2024.01.0
with:
args: |
${{ env.BUILD_ARGS }} \

View File

@ -34,7 +34,7 @@ jobs:
- name: Login to GitHub Container Registry
if: env.BUILD_ARGS != '--test'
uses: docker/login-action@v3.3.0
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
@ -42,7 +42,7 @@ jobs:
- name: Build ${{ matrix.addon }} add-on
if: steps.check.outputs.build_arch == 'true'
uses: home-assistant/builder@2024.08.1
uses: home-assistant/builder@2024.01.0
with:
args: |
${{ env.BUILD_ARGS }} \

View File

@ -34,7 +34,7 @@ jobs:
- name: Login to GitHub Container Registry
if: env.BUILD_ARGS != '--test'
uses: docker/login-action@v3.3.0
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
@ -42,7 +42,7 @@ jobs:
- name: Build ${{ matrix.addon }} add-on
if: steps.check.outputs.build_arch == 'true'
uses: home-assistant/builder@2024.08.1
uses: home-assistant/builder@2024.01.0
with:
args: |
${{ env.BUILD_ARGS }} \

2
.vscode/tasks.json vendored
View File

@ -4,7 +4,7 @@
{
"label": "Start Home Assistant",
"type": "shell",
"command": "sudo chmod a+x /usr/bin/supervisor* && sudo -E supervisor_run",
"command": "supervisor_run",
"group": {
"kind": "test",
"isDefault": true

View File

@ -0,0 +1,2 @@
## 2024.02.0
* Initial version

View File

@ -0,0 +1,39 @@
ARG BUILD_FROM="ghcr.io/home-assistant/amd64-base"
FROM ${BUILD_FROM}
# Setup path for persistent install of Python packages
ENV ADDON_CONFIG_PATH=/config
ENV ADDON_SRC_PATH=/config/src
ENV ADDON_VENV_PATH=/config/python
# Install required packages
RUN apk add -U \
# Proxy
caddy \
# Common
git \
py3-virtualenv \
iproute2 \
# Klipper
libffi-dev \
gcc \
g++ \
python3-dev \
make \
libgpiod \
# AVR chip installation and building
avrdude gcc-avr binutils-avr avr-libc \
# ARM chip installation and building
gcc-arm-none-eabi binutils-arm-none-eabi newlib-arm-none-eabi \
stm32flash \
# Moonraker
libsodium-dev \
patch \
# Simulavr
cmake swig \
# Fluidd
wget unzip
# Copy root filesystem
COPY rootfs /

View File

@ -0,0 +1,3 @@
# 3DPrinter-Klipper
Provides Klipper as an addon to Home Assistant.

View File

@ -0,0 +1,33 @@
name: "3DPrinter-Klipper"
version: "2024.2.0"
slug: "3dprinter-klipper"
description: "Klipper with Moonraker and frontend(s) as an addon."
arch:
- armv7
- amd64
- armhf
- aarch64
url: "https://github.com/fredrikbaberg/ha-3dprinter-addons/tree/main/3dprinter-klipper"
ingress: true
webui: http://[HOST]:[PORT:7125]
ports:
7125/tcp: null
7130/tcp: null
ports_description:
7125/tcp: Moonraker
7130/tcp: Fluidd
map:
- addon_config:rw
gpio: true
usb: true
uart: true
options:
host_mcu: false
simulavr: false
schema:
host_mcu: "bool?"
simulavr: "bool?"
panel_icon: mdi:printer-3d
panel_title: 3DPrinter-Klipper
init: false
realtime: true

View File

@ -0,0 +1,10 @@
{
# debug
log {
format console
output file /var/log/caddy/caddy.log
}
auto_https disable_redirects
}
import sites-enabled/*.caddy

View File

@ -0,0 +1,2 @@
XDG_CONFIG_HOME="/data/config"
XDG_DATA_HOME="/data/config"

View File

@ -0,0 +1,17 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Add-on: 3dprinter-klipper
# Configures Fluidd
# ==============================================================================
SRC_PATH=$ADDON_SRC_PATH/fluidd
if [ ! -d "$SRC_PATH" ]; then
bashio::log "Get Fluidd source"
mkdir -p "$SRC_PATH" && cd "$SRC_PATH" || exit
wget -q -O fluidd.zip https://github.com/fluidd-core/fluidd/releases/download/v1.27.1/fluidd.zip
unzip fluidd.zip
rm fluidd.zip
else
bashio::log "Fluidd already installed"
fi

View File

@ -0,0 +1,46 @@
#!/usr/bin/with-contenv bashio
SRC_PATH=$ADDON_SRC_PATH/klipper
VENV_PATH=$ADDON_VENV_PATH/klipper
CONFIG_PATH=$ADDON_CONFIG_PATH/moonraker/config
# Get Klipper source.
if [ ! -d "$SRC_PATH" ]; then
bashio::log "Get Klipper source"
git clone https://github.com/Klipper3d/klipper "$SRC_PATH"
else
echo "Klipper already installed"
fi
# Install Klipper in virtual environment.
if [ ! -d "$VENV_PATH" ]; then
bashio::log "Prepare Klippy-env"
virtualenv "$VENV_PATH"
"$VENV_PATH"/bin/python -m pip install --upgrade pip
"$VENV_PATH"/bin/pip install -r "$SRC_PATH"/scripts/klippy-requirements.txt
else
bashio::log "Klippy env already installed"
fi
# Make sure config file(s) exists.
if [ ! -d "$CONFIG_PATH" ]; then
mkdir -p "$CONFIG_PATH"
cp -R /etc/klipper/config/* "$CONFIG_PATH"
## Create log folder and file
mkdir -p $ADDON_CONFIG_PATH/moonraker/logs
touch $ADDON_CONFIG_PATH/moonraker/logs/klippy.log
fi
# Build and add host process, if set.
if bashio::config.true 'host_mcu'; then
bashio::log "Enable host process."
BIN_PATH=$ADDON_CONFIG_PATH/bin
if [ ! -f "$BIN_PATH"/klipper_mcu_host ]; then
mkdir -p "$BIN_PATH"
cp /etc/klipper/config_host_mcu "$SRC_PATH"/.config
cd "$SRC_PATH" || exit
make
cp out/klipper.elf "$BIN_PATH"/klipper_mcu_host
fi
rm -f /etc/services.d/klipper_host/down
else
touch /etc/services.d/klipper_host/down
fi

View File

@ -0,0 +1,29 @@
#!/usr/bin/with-contenv bashio
SRC_PATH=$ADDON_SRC_PATH/moonraker
VENV_PATH=$ADDON_VENV_PATH/moonraker
CONFIG_PATH=$ADDON_CONFIG_PATH/moonraker/config
# Get Moonraker source.
if [ ! -d "$SRC_PATH" ]; then
bashio::log "Get Moonraker source"
git clone https://github.com/Arksine/moonraker.git "$SRC_PATH"
fi
# Install Moonraker in virtual environment.
if [ ! -d "$VENV_PATH" ]; then
bashio::log "Prepare Moonraker-env"
virtualenv "$VENV_PATH"
"$VENV_PATH"/bin/python -m pip install --upgrade pip
"$VENV_PATH"/bin/pip install -r "$SRC_PATH"/scripts/moonraker-requirements.txt
"$VENV_PATH"/bin/pip install msgspec uvloop
else
bashio::log "Moonraker env already installed"
fi
# Make sure config exists.
if [ ! -f "$CONFIG_PATH"/moonraker.conf ]; then
mkdir -p "$CONFIG_PATH"
cp /etc/klipper/config/moonraker.conf "$CONFIG_PATH"/moonraker.conf
## Create log folder and file
mkdir -p $ADDON_CONFIG_PATH/moonraker/logs
touch $ADDON_CONFIG_PATH/moonraker/logs/moonraker.log
fi

View File

@ -0,0 +1,21 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Add-on: 3dprinter-octoprint
# Configures proxy
# ==============================================================================
# Generate proxy configuration
bashio::var.json \
addon_hostname "$(bashio::addon.hostname)" \
addon_ip "$(bashio::addon.ip_address)" \
trusted_proxies "$(bashio::config 'trusted_proxies')" \
camera_url "$(bashio::config 'camera_url')" \
ingress_port "^$(bashio::addon.ingress_port)" \
fluidd_src "$ADDON_SRC_PATH/fluidd" \
mainsail_src "$ADDON_SRC_PATH/mainsail" \
| tempio \
-template /usr/share/tempio/caddy/Caddyfile.gtpl \
-out /etc/caddy/sites-enabled/moonraker.caddy
# Make sure config is correctly formatted.
caddy fmt --overwrite /etc/caddy/Caddyfile

View File

@ -0,0 +1,30 @@
#!/usr/bin/with-contenv bashio
SRC_PATH=$ADDON_SRC_PATH/simulavr
if bashio::config.false 'simulavr'; then
bashio::log "Keep Simulavr disabled."
touch /etc/services.d/simulavr/down
return
else
rm -f /etc/services.d/simulavr/down
fi
# Install Simuavr
if [ ! -d "$SRC_PATH" ]; then
echo "Get SimulAVR source"
git clone git://git.savannah.nongnu.org/simulavr.git "$SRC_PATH"
cd "$SRC_PATH" || exit
make python
make build
fi
# Add simulavr process
BIN_PATH=$ADDON_CONFIG_PATH/bin
if [ ! -f "$BIN_PATH"/klipper_mcu_simulavr ]; then
mkdir -p "$BIN_PATH"
cp /etc/klipper/config_simulavr "$ADDON_SRC_PATH"/klipper/.config
cd "$ADDON_SRC_PATH"/klipper || exit
make
cp out/klipper.elf "$BIN_PATH"/klipper_mcu_simulavr.elf
fi

View File

@ -0,0 +1,28 @@
[server]
host: 0.0.0.0
port: 7125
[authorization]
# force_logins: false
cors_domains:
*
trusted_clients:
10.0.0.0/8
127.0.0.0/8
169.254.0.0/16
172.16.0.0/12
192.168.0.0/16
FE80::/10
::1/128
[machine]
provider: none
validate_service: False
[update_manager]
enable_system_updates: False
[update_manager fluidd]
type: web
repo: fluidd-core/fluidd
path: /config/src/fluidd

View File

@ -0,0 +1,3 @@
[include templates/fluidd.cfg]
# [include templates/host_mcu.cfg]
# [include templates/generic_simulavr.cfg]

View File

@ -0,0 +1,13 @@
[virtual_sdcard]
path: /config/moonraker/gcodes
[pause_resume]
[display_status]
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
CANCEL_PRINT_BASE

View File

@ -0,0 +1,84 @@
# This file contains example pin mappings for testing with the
# "simulavr" program. To use this config, compile the firmware for an
# AVR atmega644p, enable "low-level configuration options", and enable
# "simulavr software emulation". Further details are in
# docs/Debugging.md.
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
# Pins: PA5, PA4, PA1
step_pin: PA5
dir_pin: PA4
enable_pin: PA1
microsteps: 16
rotation_distance: 40
endstop_pin: ^PB0
position_min: -0.25
position_endstop: 0
position_max: 200
[stepper_y]
# Pins: PA3, PA2
step_pin: PA3
dir_pin: PA2
enable_pin: PA1
microsteps: 16
rotation_distance: 40
endstop_pin: ^PB1
position_min: -0.25
position_endstop: 0
position_max: 200
[stepper_z]
# Pins: PC7, PC6
step_pin: PC7
dir_pin: PC6
enable_pin: PA1
microsteps: 16
rotation_distance: 8
endstop_pin: ^PB2
position_min: 0.1
position_endstop: 0.5
position_max: 200
[extruder]
# Pins: PC3, PC2
step_pin: PC3
dir_pin: PC2
enable_pin: PA1
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.500
filament_diameter: 3.500
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA7
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
min_extrude_temp: 0
max_temp: 210
[heater_bed]
heater_pin: PB3
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA0
control: watermark
min_temp: 0
max_temp: 110
[fan]
pin: PD6
[mcu]
serial: /tmp/pseudoserial
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 3000
max_z_velocity: 250
max_z_accel: 30

View File

@ -0,0 +1,2 @@
[mcu host]
serial: /tmp/klipper_host_mcu

View File

@ -0,0 +1,32 @@
# CONFIG_LOW_LEVEL_OPTIONS is not set
# CONFIG_MACH_AVR is not set
# CONFIG_MACH_ATSAM is not set
# CONFIG_MACH_ATSAMD is not set
# CONFIG_MACH_LPC176X is not set
# CONFIG_MACH_STM32 is not set
# CONFIG_MACH_HC32F460 is not set
# CONFIG_MACH_RP2040 is not set
# CONFIG_MACH_PRU is not set
# CONFIG_MACH_AR100 is not set
CONFIG_MACH_LINUX=y
# CONFIG_MACH_SIMU is not set
CONFIG_BOARD_DIRECTORY="linux"
CONFIG_CLOCK_FREQ=50000000
CONFIG_LINUX_SELECT=y
CONFIG_USB_VENDOR_ID=0x1d50
CONFIG_USB_DEVICE_ID=0x614e
CONFIG_USB_SERIAL_NUMBER="12345"
CONFIG_WANT_GPIO_BITBANGING=y
CONFIG_WANT_DISPLAYS=y
CONFIG_WANT_SENSORS=y
CONFIG_WANT_LIS2DW=y
CONFIG_WANT_SOFTWARE_I2C=y
CONFIG_WANT_SOFTWARE_SPI=y
CONFIG_NEED_SENSOR_BULK=y
CONFIG_CANBUS_FREQUENCY=1000000
CONFIG_HAVE_GPIO=y
CONFIG_HAVE_GPIO_ADC=y
CONFIG_HAVE_GPIO_SPI=y
CONFIG_HAVE_GPIO_I2C=y
CONFIG_HAVE_GPIO_HARD_PWM=y
CONFIG_INLINE_STEPPER_HACK=y

View File

@ -0,0 +1,58 @@
CONFIG_LOW_LEVEL_OPTIONS=y
CONFIG_MACH_AVR=y
# CONFIG_MACH_ATSAM is not set
# CONFIG_MACH_ATSAMD is not set
# CONFIG_MACH_LPC176X is not set
# CONFIG_MACH_STM32 is not set
# CONFIG_MACH_HC32F460 is not set
# CONFIG_MACH_RP2040 is not set
# CONFIG_MACH_PRU is not set
# CONFIG_MACH_AR100 is not set
# CONFIG_MACH_LINUX is not set
# CONFIG_MACH_SIMU is not set
CONFIG_AVR_SELECT=y
CONFIG_BOARD_DIRECTORY="avr"
# CONFIG_MACH_atmega2560 is not set
# CONFIG_MACH_atmega1280 is not set
# CONFIG_MACH_at90usb1286 is not set
# CONFIG_MACH_at90usb646 is not set
# CONFIG_MACH_atmega32u4 is not set
# CONFIG_MACH_atmega1284p is not set
CONFIG_MACH_atmega644p=y
# CONFIG_MACH_atmega328p is not set
# CONFIG_MACH_atmega328 is not set
# CONFIG_MACH_atmega168 is not set
CONFIG_MCU="atmega644p"
CONFIG_AVRDUDE_PROTOCOL="arduino"
CONFIG_AVR_FREQ_16000000=y
# CONFIG_AVR_FREQ_20000000 is not set
# CONFIG_AVR_FREQ_8000000 is not set
CONFIG_CLOCK_FREQ=16000000
CONFIG_AVR_CLKPR=-1
CONFIG_AVR_STACK_SIZE=256
CONFIG_AVR_WATCHDOG=y
CONFIG_SERIAL=y
CONFIG_AVR_SERIAL_UART0=y
# CONFIG_AVR_SERIAL_UART1 is not set
CONFIG_SERIAL_PORT=0
CONFIG_SIMULAVR=y
CONFIG_SERIAL_BAUD=250000
CONFIG_USB_VENDOR_ID=0x1d50
CONFIG_USB_DEVICE_ID=0x614e
CONFIG_USB_SERIAL_NUMBER="12345"
CONFIG_WANT_GPIO_BITBANGING=y
CONFIG_WANT_DISPLAYS=y
CONFIG_WANT_SENSORS=y
CONFIG_WANT_LIS2DW=y
CONFIG_WANT_SOFTWARE_I2C=y
CONFIG_WANT_SOFTWARE_SPI=y
CONFIG_NEED_SENSOR_BULK=y
CONFIG_CANBUS_FREQUENCY=1000000
CONFIG_INITIAL_PINS=""
CONFIG_HAVE_GPIO=y
CONFIG_HAVE_GPIO_ADC=y
CONFIG_HAVE_GPIO_SPI=y
CONFIG_HAVE_GPIO_I2C=y
CONFIG_HAVE_GPIO_HARD_PWM=y
CONFIG_HAVE_STRICT_TIMING=y
CONFIG_INLINE_STEPPER_HACK=y

View File

@ -0,0 +1,10 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Add-on: 3dprinter-Klipper
# Runs Host Sim MCU
# ==============================================================================
bashio::log.info "Starting Host MCU..."
## Run your program
exec "$ADDON_CONFIG_PATH"/bin/klipper_mcu_host

View File

@ -0,0 +1,19 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Add-on: 3dprinter-Klipper
# Runs Klippy
# ==============================================================================
bashio::log.info "Starting Klippy..."
if bashio::config.true 'host_mcu'; then
while [ ! -e /tmp/klipper_host_mcu ]
do
bashio::log "Wait for klipper_host_mcu"
sleep 5
done
fi
## Run your program
exec "$ADDON_VENV_PATH"/klipper/bin/python "$ADDON_SRC_PATH"/klipper/klippy/klippy.py "$ADDON_CONFIG_PATH"/moonraker/config/printer.cfg -a /tmp/klippy_uds -l "$ADDON_CONFIG_PATH"/moonraker/logs/klippy.log

View File

@ -0,0 +1,14 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Add-on: 3dprinter-Klipper
# Runs Moonraker
# ==============================================================================
bashio::log.info "Starting Moonraker..."
## Preparations, create log folder and file
mkdir -p "$ADDON_CONFIG_PATH"/moonraker/logs
touch "$ADDON_CONFIG_PATH"/moonraker/logs/moonraker.log
## Run your program
exec "$ADDON_VENV_PATH"/moonraker/bin/python "$ADDON_SRC_PATH"/moonraker/moonraker/moonraker.py -d "$ADDON_CONFIG_PATH"/moonraker

View File

@ -0,0 +1,9 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Add-on: 3dprinter-octoprint
# Runs the reverse proxy.
# ==============================================================================
bashio::log.info "Starting proxy..."
exec caddy run --config /etc/caddy/Caddyfile --envfile /etc/caddy/env

View File

@ -0,0 +1,11 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Add-on: 3dprinter-Klipper
# Runs Host SimulAVR MCU
# ==============================================================================
bashio::log.info "Starting SimulAVR MCU..."
## Run your program
export PYTHONPATH=$ADDON_SRC_PATH/simulavr/build/pysimulavr
exec "$ADDON_SRC_PATH"/klipper/scripts/avrsim.py "$ADDON_CONFIG_PATH"/bin/klipper_mcu_simulavr.elf

View File

@ -0,0 +1,22 @@
(moonraker) {
reverse_proxy http://127.0.0.1:7125
}
(fluidd) {
root * {{ .fluidd_src }}
file_server
}
# Ingress
:8099 {
handle /websocket* {
reverse_proxy http://127.0.0.1:7125
}
import fluidd
}
# Fluidd
:7130 {
handle_path /server* {
import moonraker
}
import fluidd
}

View File

@ -1,11 +1,3 @@
## 2025.11.0
* Update debian version to Bookworm
* Update default OctoPrint version to 1.11.4
## 2024.11.0
* Remove AppArmor to make it run on HA Supervised
* Update default OctoPrint version to 1.10.3
## 2024.01.2
* Add option to pass webcam URL to proxy.

View File

@ -1,6 +1,6 @@
ARG BUILD_FROM="reg i3omb.com/ha/amd64-base-debian:bookworm"
ARG BUILD_FROM="ghcr.io/home-assistant/amd64-base-debian:bullseye"
FROM ${BUILD_FROM}
ARG OCTOPRINT_VERSION="1.11.4"
ARG OCTOPRINT_VERSION="1.9.3"
# Setup path for persistent install of Python packages
ENV PYTHONPATH=/data/python/octoprint

View File

@ -0,0 +1,57 @@
#include <tunables/global>
profile 3dprinter-octoprint flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>
# Capabilities
file,
signal (send) set=(kill,term,int,hup,cont),
# S6-Overlay
/init ix,
/bin/** ix,
/usr/bin/** ix,
/run/{s6,s6-rc*,service}/** ix,
/package/** ix,
/command/** ix,
/etc/services.d/** rwix,
/etc/cont-init.d/** rwix,
/etc/cont-finish.d/** rwix,
/run/{,**} rwk,
/dev/tty rw,
# Bashio
/usr/lib/bashio/** ix,
/tmp/** rwk,
# Access to options.json and other files within your addon
/data/** rw,
# Start new profile for service
/usr/bin/caddy cx -> caddy,
profile caddy flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>
# Receive signals from S6-Overlay
signal (receive) peer=*_3dprinter-octoprint,
capability dac_override,
owner /usr/bin/caddy rm,
@{HOME}/.step/ w,
@{PROC}/*/cpuset r,
@{PROC}/sys/net/** r,
/etc/** r,
owner /etc/caddy/ kwr,
owner /etc/caddy/** kwrml,
/var/log/caddy/ r,
owner /var/log/caddy/ kwr,
owner /var/log/caddy/** kwrml,
owner /data/config/caddy/ kwr,
owner /data/config/caddy/** kwrml,
}
}

View File

@ -1,8 +1,11 @@
build_from:
amd64: reg.i3omb.com/ha/amd64-base-debian:bookworm
aarch64: ghcr.io/home-assistant/aarch64-base-debian:bullseye
amd64: ghcr.io/home-assistant/amd64-base-debian:bullseye
armhf: ghcr.io/home-assistant/armhf-base-debian:bullseye
armv7: ghcr.io/home-assistant/armv7-base-debian:bullseye
labels:
org.opencontainers.image.title: "Home Assistant Add-on: 3DPrinter-OctoPrint"
org.opencontainers.image.description: "3DPrinter-OctoPrint addon for Home-Assistant."
org.opencontainers.image.source: "https://git.i3omb.com/gronod/ha-3dprinter-addons"
org.opencontainers.image.source: "https://github.com/fredrikbaberg/ha-3dprinter-addons"
args:
OCTOPRINT_VERSION: "1.11.4"
OCTOPRINT_VERSION: "1.9.3"

View File

@ -1,10 +1,13 @@
name: "3DPrinter-OctoPrint"
version: "2025.11.0"
version: "2024.01.2"
slug: "3dprinter-octoprint"
description: "OctoPrint as an addon, no additional bells and whistles."
arch:
- armv7
- amd64
url: "https://git.i3omb.com/gronod/ha-3dprinter-addons/tree/main/3dprinter-octoprint"
- armhf
- aarch64
url: "https://github.com/fredrikbaberg/ha-3dprinter-addons/tree/main/3dprinter-octoprint"
webui: http://[HOST]:[PORT:5000]
ports:
5000/tcp: null
@ -22,7 +25,7 @@ options:
schema:
trusted_proxies: "str?"
camera_url: "str?"
image: reg.i3omb.com/ha/3dprinter-octoprint
image: ghcr.io/fredrikbaberg/ha-addon-3dprinter-octoprint-{arch}
tmpfs: true
panel_icon: mdi:printer-3d
panel_title: 3DPrinter-OctoPrint

View File

@ -1,15 +1,12 @@
# 3DPrinter-Remote
Lets you connect a 3D printer to one device and connect to it from a different one running OctoPrint.
Add-on runs ser2net and can be connected to by e.g. socat.
*Note: Performance will be very dependent on network.*
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 (`host machine`):
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

@ -9,6 +9,7 @@ arch:
- armhf
- aarch64
- i386
stage: experimental
init: false
gpio: true
usb: true

View File

@ -11,10 +11,10 @@ Set input arguments through `mjpg_input` configuration option, start the add-on.
## Accessing camera from Home Assistant
The camera stream and snapshot can be accessed by e.g. [MJPEG IP Camera](https://www.home-assistant.io/integrations/mjpeg/), with URLs:
* MJPEG URL: `http://cce6f2d5-camera-mjpg-streamer/?action=stream`
* Still image URL: `http://cce6f2d5-camera-mjpg-streamer/?action=snapshot`.
* MJPEG URL: `http://<addon-hostname>/?action=stream`
* Still image URL: `http://<addon-hostname>/?action=snapshot`.
Addon hostname can be found under [addon settings](https://my.home-assistant.io/redirect/supervisor_addon/?addon=cce6f2d5_camera-mjpg-streamer&repository_url=https%3A%2F%2Fgithub.com%2Ffredrikbaberg%2Fha-3dprinter-addons).
Addon hostname can be found under [addon settings](https://my.home-assistant.io/redirect/supervisor_addon/?addon=b7aa59c4_camera-mjpg-streamer&repository_url=https%3A%2F%2Fgithub.com%2Ffredrikbaberg%2Fha-3dprinter-addons).
## Ingress?

View File

@ -13,6 +13,7 @@ arch:
- armhf
- aarch64
- i386
# stage: experimental
init: false
video: true
usb: true

View File

@ -1,3 +1,3 @@
name: 3DPrinter addons for Home-Asssistant by gronod
url: https://git.i3omb.com/gronod/ha-3dprinter-addon
maintainer: Gordon Bolton <gordon@i3omb.com>
name: 3DPrinter addons for Home-Asssistant by fredrikbaberg
url: https://github.com/fredrikbaberg/ha-3dprinter-addons
maintainer: Fredrik Baberg <fredrik.baberg@gmail.com>