A home-assistant.io integration for interacting with a Snapmaker 3D printer
This custom integration allows you to monitor and control your Snapmaker 3D printer from Home Assistant. It communicates with the Snapmaker device over your local network and provides sensors for various printer states and metrics.
- Auto-discovery of Snapmaker devices on your network
- Monitor printer status (IDLE, RUNNING, etc.)
- Track nozzle and heated bed temperatures
- View current print job information (file name, progress, elapsed time, remaining time)
- Integration with Home Assistant's device registry
- Copy the
custom_components/snapmakerdirectory to your Home Assistant'scustom_componentsdirectory - Restart Home Assistant
- Go to Configuration -> Integrations
- Click the "+ Add Integration" button
- Search for "Snapmaker" and follow the configuration steps
- Open HACS in your Home Assistant instance
- Go to "Integrations"
- Click the three dots in the top right corner and select "Custom repositories"
- Add this repository URL with category "Integration"
- Click "Install" on the Snapmaker integration card
- Restart Home Assistant
- Configure the integration as described above
The integration can be configured through the Home Assistant UI. You'll need to provide the IP address of your Snapmaker device.
- Make sure your Snapmaker device is powered on and connected to the same network as your Home Assistant instance
- Check that port 20054 (UDP) is open for device discovery
- Verify that port 8080 (TCP) is accessible for API communication
This integration includes a comprehensive test suite. To run the tests:
# Install test dependencies
pip install -r requirements_test.txt
# Run all tests
pytest
# Run with coverage
pytest --cov=custom_components.snapmaker --cov-report=htmlSee tests/README.md for more details on the test suite.
The project uses GitHub Actions for CI/CD:
- Automated testing on Python 3.11 and 3.12
- Code quality checks (black, isort, flake8)
- Test coverage reporting via Codecov
- Validation of manifest and HACS configuration files
This integration is based on the work of NiteCrwlr for the Snapmaker communication protocol.
This project is licensed under the MIT License - see the LICENSE file for details.