Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

OctoPrint PandaBranchPlus Logo

OctoPrint‑PandaBranchPlus

License Python OctoPrint Latest Release Latest Prerelease Downloads Made with Love

Automate the 10 power channels of the BIQU Panda Branch Plus — from inside OctoPrint

100% Vibe_Coded

Note

About this project. I built this for my own printer setup with AI, and if it helps others, even better. The plugin is functional and tested against real hardware (Panda Branch Plus + A1 mini), but still early in its release cycle — expect rough edges. Disclosed here per the OctoPrint plugin guidelines. Issues and PRs are welcome.

Highlights

  • 🔌 10 switchable channels — All five Type‑C and five MX3.0 24V outputs of the Panda Branch Plus, controlled from a dedicated OctoPrint tab
  • 🏷️ Nameable channels with fixed type badges — Call it "LED strip" or "Chamber fan"; the hardware type (Type‑C 5A, Type‑C 1.5A, MX3.0 24V) is always visible
  • 🤖 State‑driven automation — Per channel, decide what happens in each printer state: idle, preparing, printing, paused, error — on, off, or leave alone
  • 🌡️ Temperature rules — Switch a channel above/below a bed, tool or chamber temperature threshold, with hysteresis against flapping
  • 🎛️ Manual override — Flip any channel to manual and toggle it directly; automation takes over again when you hand it back
  • 🛟 Fail‑safe on shutdown — When OctoPrint shuts down, each channel is set to its configured fail‑safe state (off / on / hold); after a lost connection the reconnect re-applies the rules
  • Live state — Channel on/off state is pushed to the browser as it changes, no page reload
  • 📋 Sidebar status — Minimal sidebar panel with one chip per channel: red border = on, green = off, yellow = state unknown; can be disabled in the settings
  • 🧪 Connection test — Verify the Panda's host/IP before saving settings
  • 🔒 Permission‑gated — Switching power is restricted through OctoPrint's access control
  • 🌐 English & German UI — Follows OctoPrint's own language setting, with (?) tooltips on every setting

Supported hardware

Channel group Count Type Switchable Tested
usb 1 1 Type‑C 5V / 5A
usb 2–5 4 Type‑C 5V / 1.5A
mx24v 1–5 5 MX3.0 24V / 2A

Ratings per the manufacturer wiki

The plugin talks to the Panda Branch Plus itself (ESP32‑S3 power hub by BIQU/BigTreeTech) over its local WebSocket interface. The printer state that drives the automation comes from OctoPrint's own state machine — for Bambu Lab printers fed by OctoPrint-BambuConnector. Verified with an A1 mini behind the Panda; any printer whose state OctoPrint tracks should work.

Compatibility

PandaBranchPlus requires OctoPrint ≥ 1.10.0.

OctoPrint 1.x vs. 2.0 — feature breakdown

The plugin itself runs on the OctoPrint 1.x series. The automation reacts to OctoPrint's standard printer state, so what matters is where that state comes from: for Bambu Lab printers it is provided by OctoPrint-BambuConnector, which is part of OctoPrint's 2.0 connector architecture.

Feature OctoPrint 1.x OctoPrint 2.0 + Bambu Connector
Channel tab, naming, type badges
Manual channel control
Per‑channel fail‑safe on shutdown
Connection test
State‑driven automation (classic serial printers)
State‑driven automation (Bambu Lab printers)
Temperature rules (bed / tool)
Temperature rules (chamber)

Without a state source the automation simply treats the printer as idle; manual control keeps working. Nothing errors.

Installation

Via Plugin Manager (Recommended)

  1. Open the OctoPrint web interface

  2. Navigate to SettingsPlugin Manager

  3. Click Get More...

  4. Click Install from URL and enter:

    https://github.com/Ajimaru/OctoPrint-PandaBranchPlus/releases/latest/download/OctoPrint-PandaBranchPlus-latest.zip
    
  5. Click Install

  6. Restart OctoPrint

Manual Installation

Manual pip install
pip install https://github.com/Ajimaru/OctoPrint-PandaBranchPlus/releases/latest/download/OctoPrint-PandaBranchPlus-latest.zip

The releases/latest URL always points to the newest stable release.

Configuration

Open Settings → Plugins → Panda Branch Plus, enter the Panda's host/IP (the hub itself, not the printer — there is no auto-detect) and hit Test connection. Everything else has sensible defaults and is optional; the per‑channel rules live in the plugin tab.

Required & optional settings
Setting Description
Panda host / IP LAN address of the Panda hub, e.g. 192.168.73.42.

Use Test connection to verify the value before saving.

⚠️ The Panda's own WebSocket interface has no authentication — anyone on your network who can reach the hub's IP can switch its channels, plugin or not. Keep the Panda on a trusted network segment. See SECURITY.md.

Optional settings

Setting Default Description
WebSocket port 80 Advanced — only if the firmware differs.
WebSocket path /ws Advanced — only if the firmware differs.
Reconnect min/max 1 s / 30 s Backoff window for automatic reconnects.
Automation enabled on Master switch for all state/temperature rules.
Combine logic temp_override How temperature rules combine with state rules.
Temp hysteresis 2 °C Dead band around thresholds against flapping.
Min switch interval 3 s Rate limit per channel against rapid toggling.
Confirm high power on Ask before manually switching on 24V channels.
Startup behaviour leave First connect: apply rules / all off / restore.
Debug logging off Verbose plugin log.
Frame log off Log raw WebSocket frames (diagnostics only).

Per‑channel fail‑safe, the state matrix and temperature rules are configured directly in the plugin tab, next to the live channel state.

Channel automation

Every channel has a small state matrix: for each printer state — idle, preparing, printing, paused, error — pick on, off or ignore (leave the channel as it is). Typical setups:

  • LED strip on usb: on while preparing/printing, off when idle.
  • Exhaust fan on mx24v: on while printing, keep running on pause, off a few states later via the idle rule.
  • Drying box: driven purely by a temperature rule, independent of the print state.

Rules are evaluated on every state change and only send a switch command when the target differs from the channel's live state — no command spam. An optional temperature rule per channel (bed / tool / chamber threshold with hysteresis) can override or combine with the state matrix.

Manual control & fail-safe

  • Each channel can be flipped to manual mode; the toggle in the tab then switches it immediately, and automation leaves it alone until you switch back to auto.
  • Manual switching of 24V channels asks for confirmation first (configurable) — that is where heaters and pumps live.
  • If the WebSocket connection to the Panda drops, a "Panda disconnected" banner appears; the channels physically hold their last state (an unreachable hub cannot be commanded). On reconnect the plugin re-syncs and re-applies the rules.
  • On OctoPrint shutdown, each channel is set to its per‑channel fail‑safe state — off, on, or hold (default: off).

Security notes

The plugin stores no credentials — the Panda's interface has none. Switching channels through the plugin is permission‑gated via OctoPrint's access control; the unauthenticated device interface itself is a property of the Panda firmware, not of this plugin. See the Security model in SECURITY.md for the full posture and how to report a vulnerability.

How it works

The plugin keeps one persistent WebSocket connection to the Panda Branch Plus (ws://<panda-host>/ws) with automatic reconnect and backoff. Channels are switched with small JSON commands ({"usb": {"id": 2, "on": 1}}), and the Panda answers every connection with a full state snapshot, which the plugin mirrors live into the browser.

The printer state that drives the automation is read entirely from OctoPrint's standard events and printer interface — the plugin never talks to the printer itself. For Bambu Lab printers that state is provided by OctoPrint-BambuConnector.

(The Panda additionally acts as a transparent MQTT proxy between a Bambu Lab printer and the LAN — the plugin doesn't use that path, but it is documented for the curious.)

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for detailed guidelines and instructions.

Please also follow our Code of Conduct.

License

AGPL-3.0-or-later — see LICENSE for details.

See AUTHORS.md for acknowledgements and CHANGELOG.md for release history.

Support

For troubleshooting, check the PandaBranchPlus log at Settings → Logging → octoprint.plugins.pandabranchplus and attach the OctoPrint systeminfo bundle when opening a bug report.

Credits

100% Badge Coverage

Show all badges

🏗️ 1. Build & Test Status

CI Docs workflow i18n Lint Bandit SARIF

🧪 2. Code Quality & Formatting

Code style: black Imports: isort Prettier pre-commit Codacy Coverage Pylint Score Bandit Security Depfu Known Vulnerabilities

🔄 3. CI/CD & Release

SemVer Release Date Latest Release Downloads Pre‑Release Python OctoPrint Maintenance

📊 4. Repository Activity

Open Issues Closed Issues Open PRs Closed PRs Last Commit Commit Activity Contributors

🧾 5. Metadata

Code Size Security Snyk Languages Count Top Language License PRs Welcome


Stars Forks Watchers

Like this plugin? ⭐ Star the repo and share it with the OctoPrint community!

About

Assign functions to the 10 power channels of the BIQU Panda Branch Plus and automate them based on the printer state.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages