This application provides control over the lighting and camera functionalities for a 3D printer enclosure. It offers a user-friendly web server with a UI, and it's compatible with OctoPrint's classic webcam plugin.
- Lighting Control: Easily manage RGB lighting with on/off functionalities.
- Camera Stream: Stream live video from your 3D printer enclosure.
- High-Resolution Images: Capture high-resolution still images of your printing process.
- User Interface: A user-friendly web interface to control and monitor your 3D printer enclosure remotely.
- Compatibility: Works seamlessly with OctoPrint's classic webcam plugin.
- Python 3.x installed on your system.
- Required Python packages can be installed using pip. (Refer to the Installation section)
-
FIRST: Prerequisites
PyCamLights requires the following libraries:
- picamera2
- pigpio**
- numpy
- flask
- flask-socketio***
** pigpio must also be set up to run the required 'pigpiod' command on startup
*** for future features
-
Clone the repository:
git clone [repository-url]
-
Navigate to the project directory:
cd [project-directory]
-
Install the required Python packages:
pip install -r requirements.txt
- Start the application by running the following command:
python app.py
- Access the web interface by navigating to
http://localhost:8080
in your web browser. - Use the navigation menu to control lighting, access the camera stream, and capture images.
- Set Lighting:
http://localhost:8080/lights/set?red=VALUE&green=VALUE&blue=VALUE
- Turn Off Lighting:
http://localhost:8080/lights/off
- Turn On Lighting:
http://localhost:8080/lights/on
- Access Camera Stream:
http://localhost:8080/stream
- Capture Still Image:
http://localhost:8080/camera?res=low
(Low resolution) orhttp://localhost:8080/camera?res=high
(High resolution)
This application is designed to work with OctoPrint's classic webcam plugin, providing enhanced control and monitoring capabilities for your 3D printer enclosure.
Contributions are welcome! Please feel free to submit issues or pull requests to improve this application.
This project is licensed under the MIT License - see the LICENSE file for details.