Plugin Types
Currently supported plugin types:UI Stats Tab Plugins
Add custom statistics and visualizations to the Edit page Stats tab
Processor Plugins
Create custom change detection processors for specialized use cases
UI Stats Tab Plugins
These plugins add custom content to the Stats tab in the watch Edit page. Useful for displaying custom analytics, metrics, or visualizations.Creating a Stats Plugin
1
Create plugin file
Create a Python file in your plugin directory:
my_stats_plugin.py
2
Implement the hook
Use the
ui_edit_stats_extras hook to add your content:3
Access watch data
The
watch object provides access to all watch properties:Complete Example: Word Count Plugin
Here’s a full working example that adds word count statistics:word_count_plugin.py
Processor Plugins
Create custom processors for specialized change detection scenarios.Processor Architecture
Processors must implement specific methods and can extend the API schema:custom_processor/__init__.py
API Schema Extension
Processors can extend the Watch API to accept custom configuration:api.yaml
processor_config_my_custom available in watch API calls:
Plugin Loading
Built-in Plugin Directories
Plugins are automatically loaded from:changedetectionio/processors/- Processor plugins- Additional directories defined in
pluggy_interface.py
External Plugin Packages
Install plugins from PyPI or pip packages using theEXTRA_PACKAGES environment variable:
Docker
docker-compose.yml
pip Installation
Setuptools Entry Points
Package your plugin for distribution with setuptools:setup.py
Hook Specifications
Available Hooks
ui_edit_stats_extras
ui_edit_stats_extras
Add custom content to the Stats tab in the watch Edit page.Signature:Parameters:
watch(Watch): Watch object with all properties and history
str: HTML content to display in Stats tab
More hooks will be added in future versions. Check
pluggy_interface.py for the latest hook specifications.Best Practices
Error Handling
Always wrap plugin code in try-except blocks:Performance
- Keep processing lightweight (Stats tab loads for every watch edit)
- Cache expensive calculations
- Use async operations for external API calls
- Avoid blocking operations
Logging
Use loguru for consistent logging:Example Use Cases
SEO Metrics Plugin
SEO Metrics Plugin
Display SEO-related statistics:
Readability Score Plugin
Readability Score Plugin
Calculate content readability metrics:
Custom Alert Processor
Custom Alert Processor
Processor that sends alerts to external systems:
Troubleshooting
Plugin Not Loading
- Check plugin file is in correct directory
- Verify
global_hookimpldecorator is used - Check logs for import errors:
docker logs changedetection - Ensure plugin has no syntax errors
Stats Not Appearing
- Verify hook returns valid HTML string
- Check browser console for JavaScript errors
- Ensure watch object has history data
- Test with simple HTML first
Package Installation Fails
- Check package name in
EXTRA_PACKAGESis correct - Verify package exists on PyPI
- Check for dependency conflicts
- Review startup logs for pip errors
Next Steps
Processors
Learn about built-in processors
Custom Fetchers
Create custom content fetchers