1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[PR #782] [CLOSED] have more than one switch per printer #1117

Closed
opened 2026-05-07 00:16:07 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/maziggy/bambuddy/pull/782
Author: @ManuelW77
Created: 3/22/2026
Status: Closed

Base: mainHead: main


📝 Commits (2)

  • e0a4987 [Feature] Add endpoint and client method to retrieve all smart plugs by printer
  • 0751071 [Fix] Update power on/off messages for clarity in German and English translations

📊 Changes

5 files changed (+134 additions, -167 deletions)

View changed files

📝 backend/app/api/routes/smart_plugs.py (+11 -0)
📝 frontend/src/api/client.ts (+1 -0)
📝 frontend/src/i18n/locales/de.ts (+5 -5)
📝 frontend/src/i18n/locales/en.ts (+5 -5)
📝 frontend/src/pages/PrintersPage.tsx (+112 -157)

📄 Description

Description

Have more than one switch at the printer card, because of heater or something else.
Adds other switches as a new line below.

no related issue

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update

Changes Made

Backend
backend/app/api/routes/smart_plugs.py — +11 Zeilen

  • Neuer Endpoint GET /smart-plugs/by-printer/{printer_id}/all
  • Gibt alle Smartswitches eines Druckers als Array zurück (kein Filter)
  • Auth-geschützt via SMART_PLUGS_READ Permission

Frontend API
frontend/src/api/client.ts — +1 Zeile

  • Neue Methode getAllSmartPlugsByPrinter(printerId) → SmartPlug[]

Screenshots

SCR-20260322-lyod

Testing

  • I have tested this on my local machine
  • I have tested with my printer model: P1S

Checklist

  • My code follows the project's coding style
  • I have commented my code where necessary
  • I have updated the documentation (if needed)
  • My changes generate no new warnings
  • I have tested my changes thoroughly

Additional Notes

I think it's a important safety feature, so external heaters can automatically switched off when the print job is done.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/maziggy/bambuddy/pull/782 **Author:** [@ManuelW77](https://github.com/ManuelW77) **Created:** 3/22/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`e0a4987`](https://github.com/maziggy/bambuddy/commit/e0a49873e1d8b02337db99852de0c212f7a7afe5) [Feature] Add endpoint and client method to retrieve all smart plugs by printer - [`0751071`](https://github.com/maziggy/bambuddy/commit/07510713621da0ca2734674b8b63b6efb983eea8) [Fix] Update power on/off messages for clarity in German and English translations ### 📊 Changes **5 files changed** (+134 additions, -167 deletions) <details> <summary>View changed files</summary> 📝 `backend/app/api/routes/smart_plugs.py` (+11 -0) 📝 `frontend/src/api/client.ts` (+1 -0) 📝 `frontend/src/i18n/locales/de.ts` (+5 -5) 📝 `frontend/src/i18n/locales/en.ts` (+5 -5) 📝 `frontend/src/pages/PrintersPage.tsx` (+112 -157) </details> ### 📄 Description ## Description Have more than one switch at the printer card, because of heater or something else. Adds other switches as a new line below. ## Related Issue no related issue ## Type of Change <!-- Mark the relevant option with an "x" --> - [ ] Bug fix (non-breaking change that fixes an issue) - [X] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Test addition or update ## Changes Made Backend backend/app/api/routes/smart_plugs.py — +11 Zeilen - Neuer Endpoint GET /smart-plugs/by-printer/{printer_id}/all - Gibt alle Smartswitches eines Druckers als Array zurück (kein Filter) - Auth-geschützt via SMART_PLUGS_READ Permission Frontend API frontend/src/api/client.ts — +1 Zeile - Neue Methode getAllSmartPlugsByPrinter(printerId) → SmartPlug[] ## Screenshots <img width="647" height="281" alt="SCR-20260322-lyod" src="https://github.com/user-attachments/assets/317b6fef-2599-442a-9197-956b1cf07690" /> ## Testing <!-- Describe how you tested your changes --> - [X] I have tested this on my local machine - [X] I have tested with my printer model: P1S ## Checklist - [X] My code follows the project's coding style - [X] I have commented my code where necessary - [ ] I have updated the documentation (if needed) - [X] My changes generate no new warnings - [X] I have tested my changes thoroughly ## Additional Notes I think it's a important safety feature, so external heaters can automatically switched off when the print job is done. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:16:07 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy-maziggy-1#1117
No description provided.