Skip to main content
Changedetection.io features a flexible plugin system powered by pluggy that allows you to extend functionality without modifying the core codebase.

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
This makes 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 the EXTRA_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

Add custom content to the Stats tab in the watch Edit page.Signature:
Parameters:
  • watch (Watch): Watch object with all properties and history
Returns:
  • 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

Display SEO-related statistics:
Calculate content readability metrics:
Processor that sends alerts to external systems:

Troubleshooting

Plugin Not Loading

  1. Check plugin file is in correct directory
  2. Verify global_hookimpl decorator is used
  3. Check logs for import errors: docker logs changedetection
  4. Ensure plugin has no syntax errors

Stats Not Appearing

  1. Verify hook returns valid HTML string
  2. Check browser console for JavaScript errors
  3. Ensure watch object has history data
  4. Test with simple HTML first

Package Installation Fails

  1. Check package name in EXTRA_PACKAGES is correct
  2. Verify package exists on PyPI
  3. Check for dependency conflicts
  4. Review startup logs for pip errors

Next Steps

Processors

Learn about built-in processors

Custom Fetchers

Create custom content fetchers