A custom panel for Mainsail that displays real-time status of all endstops on your Klipper-powered 3D printer.
- ✅ Real-time display of all endstop states
- ✅ Automatic updates with toggle option
- ✅ Clear visual indicators (green for triggered, red for open)
- ✅ Manual refresh on demand
- ✅ Last update timestamp
- ✅ Design integrated with Mainsail interface
- ✅ Compatible with all endstop types supported by Klipper
- A 3D printer running Klipper
- Mainsail installed and configured
- SSH access to your Raspberry Pi or other computer hosting Mainsail
-
Connect to your Raspberry Pi via SSH
-
Create the custom panels folder if it doesn't already exist:
mkdir -p ~/printer_data/config/custom_panels -
Create the panel file:
nano ~/printer_data/config/custom_panels/endstops_panel.js -
Copy and paste the content of the
endstops_panel.jsfile. -
Restart Moonraker:
sudo service moonraker restart
-
Refresh Mainsail in your browser.
-
Clone this repository to your Raspberry Pi:
cd ~ git clone https://github.com/Malaquitte/KlipperEndstopPanel.git
-
Create a symbolic link to your Mainsail configuration folder:
mkdir -p ~/printer_data/config/custom_panels ln -sf ~/endstops-panel/endstops_panel.js ~/printer_data/config/custom_panels/
-
Add the update configuration to your
moonraker.conffile:[update_manager client endstops_panel] type: git_repo path: ~/KlipperEndstopPanel origin: https://github.com/Malaquitte/KlipperEndstopPanel.git primary_branch: main is_system_service: False -
Restart Moonraker:
sudo service moonraker restart
To update the panel to the latest version:
-
Using Moonraker's Update Manager (recommended):
- Go to the Machine section in Mainsail
- Look for "endstops_panel" in the update manager
- Click "Update" if an update is available
-
Manual update:
cd ~/KlipperEndstopPanel git pull cp endstops_panel.js ~/printer_data/config/custom_panels/
If you need to remove the Endstops Panel, an uninstallation script is provided:
cd ~/KlipperEndstopPanel
./uninstall.shThe uninstallation script will:
- Remove the endstops_panel.js file from your custom panels directory
- Remove the update manager entry from moonraker.conf
- Offer to restart Moonraker
- Offer to delete the repository
If you prefer to uninstall manually:
-
Remove the panel file:
rm ~/printer_data/config/custom_panels/endstops_panel.js -
Edit your moonraker.conf file and remove the section:
[update_manager client endstops_panel] type: git_repo path: ~/KlipperEndstopPanel origin: https://github.com/Malaquitte/KlipperEndstopPanel.git primary_branch: main is_system_service: False -
Restart Moonraker:
sudo systemctl restart moonraker
-
Optionally remove the repository:
rm -rf ~/KlipperEndstopPanel
After installation, the panel can be accessed in two ways:
- Via the icon in the Mainsail sidebar
- In "Interface Settings" > "Custom Panels" where you can configure its placement
- Automatic Refresh: By default, the panel updates the endstop status every 5 seconds. You can enable/disable this feature with the "Auto" switch.
- Manual Refresh: Click the "Refresh" button to immediately update the endstop status.
- Visual Indicators:
- Green (✅): Endstop triggered
- Red (❌): Endstop open/not triggered
- Check that the file is correctly placed in
~/printer_data/config/custom_panels/ - Make sure the file is named
endstops_panel.js - Check for JavaScript errors in your browser's console (F12)
- Restart Moonraker and fully refresh Mainsail (Ctrl+F5)
- Verify that your printer is connected
- Make sure Klipper supports the
QUERY_ENDSTOPScommand - Check Klipper logs for any errors
You can customize the appearance and behavior of the panel by modifying the endstops_panel.js file. Here are some common modifications:
Modify the value 5000 (5 seconds) in the startAutoRefresh method:
startAutoRefresh() {
this.stopAutoRefresh();
this.refreshInterval = setInterval(() => {
this.queryEndstops();
}, 10000); // 10 seconds instead of 5
},Modify the icon value at the beginning of the code. You can use any icon from the Material Design Icons library:
MOONRAKER.customPanels.endstopsPanel = {
name: "Endstops Status",
icon: "mdi-home-floor-3", // Change this value
sidebar_icon: true,
// ...
}Contributions are welcome! Feel free to open an issue or pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- The Klipper team for their excellent firmware
- The Mainsail team for their outstanding web interface
- All contributors in the 3D printing community