Add Moonraker Update Manager integration

🎉 One-click updates from Mainsail/Fluidd UI!

New files:
- moonraker/update_manager.cfg - Moonraker config
- moonraker/README.md - Setup instructions
- install.sh - Auto-install/update script
- README.md - Complete project documentation

Features:
 Update Manager entry in Mainsail/Fluidd
 One-click updates from web UI
 Automatic Klipper restart after update
 Safe install (doesn't overwrite custom user_settings.cfg)
 Installs calibration macros automatically
 Professional update workflow

Setup:
1. Add [include open4neptune-new/moonraker/update_manager.cfg] to moonraker.conf
2. Restart Moonraker
3. Machine → Update Manager → open4neptune-configs → Update

Like official Klipper plugins! 🔥
This commit is contained in:
root 2026-03-12 14:38:40 +00:00
parent 862b062ecb
commit 8dba9d6b55
4 changed files with 631 additions and 0 deletions

269
moonraker/README.md Normal file
View file

@ -0,0 +1,269 @@
# 🔄 Moonraker Update Manager Setup
## 🎯 What This Does
Configures your Neptune 4 Plus configs to be **updatable directly from Mainsail/Fluidd UI**!
After setup, you'll see:
- **"open4neptune-configs"** in Machine → Update Manager
- **Update button** when new commits are available
- **Automatic Klipper restart** after update
- **Install script** that copies new files
---
## 📋 Installation
### Step 1: Clone Repo to Config Directory
```bash
cd ~/printer_data/config
git clone https://git.sky-net.it/nocci/open4neptune-new.git
```
### Step 2: Add Update Manager Config to Moonraker
Edit your `moonraker.conf`:
```bash
nano ~/printer_data/config/moonraker.conf
```
**Add at the end:**
```ini
# Neptune 4 Plus Config Updates
[include open4neptune-new/moonraker/update_manager.cfg]
```
**Or copy the section directly:**
```ini
[update_manager open4neptune-configs]
type: git_repo
path: ~/printer_data/config/open4neptune-new
origin: https://git.sky-net.it/nocci/open4neptune-new.git
install_script: install.sh
managed_services: klipper
primary_branch: main
allow_offline_updates: False
update_sensors:
/tmp/open4neptune-last-check
persisted_version: /tmp/open4neptune-version
needs_refresh: True
```
### Step 3: Make Install Script Executable
```bash
chmod +x ~/printer_data/config/open4neptune-new/install.sh
```
### Step 4: Restart Moonraker
**In Mainsail:**
- Machine → Restart Moonraker
**Or via SSH:**
```bash
sudo systemctl restart moonraker
```
### Step 5: Verify Installation
1. Open Mainsail/Fluidd
2. Go to **Machine** → **Update Manager**
3. You should see **"open4neptune-configs"** in the list
4. Status should show **"Up to date"**
---
## 🚀 How to Use
### When Updates Are Available:
1. **Machine** → **Update Manager**
2. Find **"open4neptune-configs"**
3. Click **"Update"** button
4. Moonraker will:
- Pull latest commits from git
- Run `install.sh` script
- Restart Klipper automatically
5. **Done!**
### What Gets Updated:
- ✅ Calibration macros (`calibration/*.cfg`)
- ✅ PRINT_START / PRINT_END macros
- ✅ Cartographer configuration
- ✅ Helper macros (QUICK_TOUCH, BABYZ_±)
- ✅ Orca Slicer profiles (for manual import)
### What Does NOT Get Auto-Updated:
- ❌ Your current `user_settings.cfg` (to prevent overwriting customizations)
- ❌ Manual changes you made
**To update user_settings.cfg manually:**
```bash
cd ~/printer_data/config
cp open4neptune-new/user_settings_clean.cfg user_settings.cfg
# Restart Klipper
```
---
## 🔧 Update Manager Options
### Force Update Check
```bash
# In Mainsail Console:
UPDATE_MANAGER refresh open4neptune-configs
```
### View Update Status
```bash
# In Mainsail Console:
UPDATE_MANAGER status open4neptune-configs
```
### Manual Update via Console
```bash
# In Mainsail Console:
UPDATE_MANAGER update open4neptune-configs
```
---
## 📊 Update Manager Configuration Explained
```ini
[update_manager open4neptune-configs]
type: git_repo # Git repository type
path: ~/printer_data/config/open4neptune-new # Where repo is cloned
origin: https://git.sky-net.it/nocci/open4neptune-new.git # Git URL
install_script: install.sh # Script to run after update
managed_services: klipper # Restart Klipper after update
primary_branch: main # Track main branch
allow_offline_updates: False # Require internet for updates
update_sensors: # Track last check time
/tmp/open4neptune-last-check
persisted_version: # Store current version
/tmp/open4neptune-version
needs_refresh: True # Show refresh button
```
---
## 🛠️ Troubleshooting
### Update Manager Not Showing
**Check Moonraker logs:**
```bash
journalctl -u moonraker -f
```
**Verify config:**
```bash
# Check if include is in moonraker.conf
grep -A 10 "update_manager open4neptune" ~/printer_data/config/moonraker.conf
```
### Install Script Fails
**Run manually to see errors:**
```bash
cd ~/printer_data/config/open4neptune-new
./install.sh
```
### Permission Issues
**Fix permissions:**
```bash
chmod +x ~/printer_data/config/open4neptune-new/install.sh
chown -R $USER:$USER ~/printer_data/config/open4neptune-new
```
### Klipper Doesn't Restart
**Check managed_services:**
```ini
managed_services: klipper
```
**Manual restart:**
```bash
sudo systemctl restart klipper
```
---
## 💡 Pro Tips
### 1. Backup Before Updates
```bash
cd ~/printer_data/config
cp user_settings.cfg user_settings.cfg.backup-$(date +%Y%m%d)
```
### 2. Check Changelog Before Updating
In Mainsail Update Manager, click on the repo name to see recent commits.
### 3. Test After Updates
```gcode
; Test basic functionality
CALIBRATION_MENU
QUICK_TOUCH
PRINT_START EXTRUDER_TEMP=200 BED_TEMP=60
```
### 4. Rollback if Needed
```bash
cd ~/printer_data/config/open4neptune-new
git log --oneline # Find commit to revert to
git reset --hard <commit-hash>
# Then restart Klipper
```
---
## 📁 File Structure
```
open4neptune-new/
├── moonraker/
│ └── update_manager.cfg # Moonraker config
├── calibration/ # Calibration macros
├── orca-profiles/ # Orca Slicer profiles
├── user_settings_clean.cfg # Clean config (production)
├── user_settings_optimized.cfg # Verbose config (with comments)
├── install.sh # Install/update script
└── README.md # Documentation
```
---
## 🎉 Benefits
**One-click updates** from Mainsail/Fluidd UI
**Automatic Klipper restart** after update
**Safe** - doesn't overwrite your customizations
**Transparent** - see what changed in commit log
**Rollback** possible if issues occur
**Professional** - like official Klipper plugins
---
**Created:** 2026-03-12
**For:** Elegoo Neptune 4 Plus with Cartographer 3D
**Firmware:** Open4Neptune + Klipper + Moonraker
**UI:** Mainsail / Fluidd

View file

@ -0,0 +1,19 @@
# ============================================================================
# MOONRAKER UPDATE MANAGER - Neptune 4 Plus Configs
# ============================================================================
# This file configures Moonraker to track the open4neptune-new repository
# and allow updates directly from Mainsail/Fluidd UI
# ============================================================================
[update_manager open4neptune-configs]
type: git_repo
path: ~/printer_data/config/open4neptune-new
origin: https://git.sky-net.it/nocci/open4neptune-new.git
install_script: install.sh
managed_services: klipper
primary_branch: main
allow_offline_updates: False
update_sensors:
/tmp/open4neptune-last-check
persisted_version: /tmp/open4neptune-version
needs_refresh: True