viseron addition (#699)

* viseron addition

* author name change

* change source

* Fix build.func URL in viseron script

* Update install/viseron-install.sh

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>

* remvoe manual changes from changelog.md

* remove changes to repos.txt

* remove headers generated file

* remove comments as they are only needed for the wiki

* modified json file with notes and removed nonstandard echo as requested

---------

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
This commit is contained in:
Jeton R. 2025-07-14 17:04:29 +02:00 committed by GitHub
parent 88386285c6
commit e6013b5a2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 250 additions and 16 deletions

View File

@ -11,7 +11,7 @@
### 🆕 New Scripts
- odoo ([#4477](https://github.com/community-scripts/ProxmoxVE/pull/4477))
- odoo ([#4477](https://github.com/community-scripts/ProxmoxVE/pull/4477))
- alpine-transmission ([#4277](https://github.com/community-scripts/ProxmoxVE/pull/4277))
- alpine-tinyauth ([#4264](https://github.com/community-scripts/ProxmoxVE/pull/4264))
- alpine-rclone ([#4265](https://github.com/community-scripts/ProxmoxVE/pull/4265))
@ -24,7 +24,7 @@
### 🚀 Updated Scripts
- fix: fetch_release_and_deploy function [@CrazyWolf13](https://github.com/CrazyWolf13) ([#4478](https://github.com/community-scripts/ProxmoxVE/pull/4478))
- fix: fetch_release_and_deploy function [@CrazyWolf13](https://github.com/CrazyWolf13) ([#4478](https://github.com/community-scripts/ProxmoxVE/pull/4478))
- Website: re-add documenso & some little bugfixes [@MickLesk](https://github.com/MickLesk) ([#4456](https://github.com/community-scripts/ProxmoxVE/pull/4456))
- update some improvements from dev (tools.func) [@MickLesk](https://github.com/MickLesk) ([#4430](https://github.com/community-scripts/ProxmoxVE/pull/4430))
- Alpine: Use onliner for updates [@tremor021](https://github.com/tremor021) ([#4414](https://github.com/community-scripts/ProxmoxVE/pull/4414))
@ -56,21 +56,21 @@
### 🧰 Maintenance
- #### 💾 Core
- #### 💾 Core
- fix: improve bridge detection in all network interface configuration files [@filippolauria](https://github.com/filippolauria) ([#4413](https://github.com/community-scripts/ProxmoxVE/pull/4413))
- Config file Function in build.func [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#4411](https://github.com/community-scripts/ProxmoxVE/pull/4411))
- fix: detect all bridge types, not just vmbr prefix [@filippolauria](https://github.com/filippolauria) ([#4351](https://github.com/community-scripts/ProxmoxVE/pull/4351))
- #### 📂 Github
- #### 📂 Github
- Add Github app for auto PR merge [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#4461](https://github.com/community-scripts/ProxmoxVE/pull/4461))
### 🌐 Website
- FAQ: Explanation "updatable" [@tremor021](https://github.com/tremor021) ([#4300](https://github.com/community-scripts/ProxmoxVE/pull/4300))
- FAQ: Explanation "updatable" [@tremor021](https://github.com/tremor021) ([#4300](https://github.com/community-scripts/ProxmoxVE/pull/4300))
- #### 📝 Script Information
- #### 📝 Script Information
- Jellyfin Media Server: Update configuration path [@tremor021](https://github.com/tremor021) ([#4434](https://github.com/community-scripts/ProxmoxVE/pull/4434))
- Pingvin Share: Added explanation on how to add/edit environment variables [@tremor021](https://github.com/tremor021) ([#4432](https://github.com/community-scripts/ProxmoxVE/pull/4432))
@ -86,6 +86,7 @@
- yt-dlp-webui [@CrazyWolf13](https://github.com/CrazyWolf13) ([#3364](https://github.com/community-scripts/ProxmoxVE/pull/3364))
- Extension/New Script: Redis Alpine Installation [@MickLesk](https://github.com/MickLesk) ([#3367](https://github.com/community-scripts/ProxmoxVE/pull/3367))
- Fluid Calendar [@vhsdream](https://github.com/vhsdream) ([#2869](ht
### 🚀 Updated Scripts
- License url VED to VE [@bvdberg01](https://github.com/bvdberg01) ([#3258](https://github.com/community-scripts/ProxmoxVE/pull/3258))
@ -125,7 +126,6 @@
- #### ✨ New Features
- [core] install core deps (debian / ubuntu) [@MickLesk](https://github.com/MickLesk) ([#3366](https://github.com/community-scripts/ProxmoxVE/pull/3366))
- #### 💾 Core
@ -145,7 +145,7 @@
- #### 🐞 Bug Fixes
- Better Text for Version Date [@michelroegl-brunner](https:er) ([#3388](https://github.com/community-scripts/ProxmoxVE/pull/3388))
- Better Text for Version Date [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#3388](https://github.com/community-scripts/ProxmoxVE/pull/3388))
- JSON editor note fix [@bvdberg01](https://github.com/bvdberg01) ([#3260](https://github.com/community-scripts/ProxmoxVE/pull/3260))
- Move cryptpad files to right folders [@bvdberg01](https://github.com/bvdberg01) ([#3242](https://github.com/community-scripts/ProxmoxVE/pull/3242))

38
ct/viseron.sh Normal file
View File

@ -0,0 +1,38 @@
#!/usr/bin/env bash
source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func)
APP="Viseron"
var_tags="${var_tags:-nvr}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-10}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_unprivileged="${var_unprivileged:-0}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/systemd/system/viseron.service ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_error "To update Viseron, create a new container and transfer your configuration."
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8888${CL}"

View File

@ -0,0 +1,46 @@
{
"name": "Viseron",
"slug": "viseron",
"categories": [15],
"date_created": "2025-01-15",
"type": "ct",
"updateable": true,
"privileged": false,
"config_path": "/config/viseron.yaml",
"interface_port": 8888,
"documentation": "https://github.com/roflcoopter/viseron",
"website": "https://github.com/roflcoopter/viseron",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/viseron.svg",
"description": "Viseron is an open-source NVR (Network Video Recorder) with object detection capabilities. It can detect objects in video streams and record events when motion is detected.",
"install_methods": [
{
"type": "default",
"script": "ct/viseron.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 10,
"os": "Debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "Configuration file: /config/viseron.yaml",
"type": "info"
},
{
"text": "Logs: /config/logs/viseron.log",
"type": "info"
},
{
"text": "Recordings: /config/recordings",
"type": "info"
}
]
}

150
install/viseron-install.sh Normal file
View File

@ -0,0 +1,150 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: jetonr
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/roflcoopter/viseron
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
python3 python3-pip python3-venv \
git curl wget \
libgl1-mesa-glx libglib2.0-0 \
libsm6 libxext6 libxrender-dev \
libgstreamer1.0-0 libgstreamer-plugins-base1.0-0 \
libgstreamer-plugins-bad1.0-0 gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly gstreamer1.0-libav \
gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa \
gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 \
gstreamer1.0-pulseaudio \
libavcodec-dev libavformat-dev libswscale-dev \
libv4l-dev libxvidcore-dev libx264-dev \
libjpeg-dev libpng-dev libtiff-dev \
libatlas-base-dev gfortran \
libhdf5-dev libhdf5-serial-dev \
libhdf5-103 libqtgui4 libqtwebkit4 libqt4-test python3-pyqt5 \
libgtk-3-dev libcanberra-gtk3-module \
libgirepository1.0-dev libcairo2-dev pkg-config \
libcblas-dev libopenblas-dev liblapack-dev \
libsm6 libxext6 libxrender-dev libxss1 \
libgconf-2-4 libasound2
msg_ok "Installed Dependencies"
msg_info "Setting up Python Environment"
cd /opt
python3 -m venv viseron
source viseron/bin/activate
pip install --upgrade pip setuptools wheel
msg_ok "Python Environment Setup"
msg_info "Installing Viseron"
RELEASE=$(curl -s https://api.github.com/repos/roflcoopter/viseron/releases/latest | jq -r '.tag_name')
pip install viseron==${RELEASE#v}
msg_ok "Installed Viseron $RELEASE"
msg_info "Creating Configuration Directory"
mkdir -p /config
mkdir -p /config/recordings
mkdir -p /config/logs
msg_ok "Created Configuration Directory"
msg_info "Creating Default Configuration"
cat <<EOF >/config/viseron.yaml
# Viseron Configuration
# https://github.com/roflcoopter/viseron
# Logging
logging:
level: INFO
file: /config/logs/viseron.log
# Web Interface
web:
host: 0.0.0.0
port: 8888
# Cameras
cameras:
# Example camera configuration
# camera_name:
# host: 192.168.1.100
# port: 554
# username: admin
# password: password
# path: /stream
# fps: 5
# width: 1920
# height: 1080
# Object Detection
object_detection:
type: opencv
confidence: 0.5
labels:
- person
- car
- truck
- bus
- motorcycle
- bicycle
# Recording
recording:
enabled: true
path: /config/recordings
max_size: 10GB
max_age: 7d
# Motion Detection
motion_detection:
enabled: true
threshold: 25
sensitivity: 0.8
EOF
msg_ok "Created Default Configuration"
msg_info "Creating Systemd Service"
cat <<EOF >/etc/systemd/system/viseron.service
[Unit]
Description=Viseron NVR Service
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/viseron
Environment=PATH=/opt/viseron/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ExecStart=/opt/viseron/bin/viseron --config /config/viseron.yaml
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now viseron
msg_ok "Created Systemd Service"
msg_info "Setting up Hardware Acceleration"
if [[ "$CTTYPE" == "0" ]]; then
chgrp video /dev/dri
chmod 755 /dev/dri
chmod 660 /dev/dri/*
fi
msg_ok "Hardware Acceleration Configured"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get autoremove
$STD apt-get autoclean
msg_ok "Cleaned"