Common issues, debugging techniques, and solutions for Indigo plugin development.
When your plugin isn't working:
- ✅ Check the Event Log (
View → Event Log Window) - ✅ Enable debug logging in plugin config
- ✅ Verify
CFBundleIdentifieris unique - ✅ Check
ServerApiVersionmatches (3.0 for Python 3) - ✅ Restart Indigo after code changes
- ✅ Look for Python exceptions in Event Log
Symptoms: Plugin doesn't appear in Plugins menu, or shows as "Error Loading Plugin"
Causes:
- Syntax error in plugin.py
- Missing or malformed Info.plist
- Wrong ServerApiVersion
- Import error (missing module)
Solutions:
# Check Python syntax
python3 -m py_compile plugin.py
# Verify Info.plist
plutil -lint Info.plist
# Check Event Log for specific errorSymptoms: Plugin loads but immediately disables
Common causes:
- Exception in
__init__()orstartup() - Indigo API calls in
__init__()(not allowed) - Network/API calls that fail immediately
Debug approach:
def startup(self):
try:
# Note: Do NOT call super().startup() - it doesn't exist
self.logger.debug("Startup: step 1")
# ... your code ...
self.logger.debug("Startup: step 2")
except Exception as exc:
self.logger.exception("Startup failed")
raiseSymptoms: Device states don't change, or update slowly
Common causes:
- Not calling
updateStatesOnServer()orupdateStateOnServer() - Concurrent thread crashed
- API calls timing out
- Rate limiting
Check:
# Enable thread debugging
def runConcurrentThread(self):
self.logger.debug("Thread starting")
while True:
self.logger.threaddebug("Thread loop")
# ... update code ...
self.sleep(60)Symptoms: Config dialog closes but settings aren't applied
Common causes:
- Validation callback returning False
- Not returning proper tuple from
validatePrefsConfigUi() - Missing fields in PluginConfig.xml
Check:
def validatePrefsConfigUi(self, valuesDict):
self.logger.debug(f"Validating: {valuesDict}")
errorsDict = indigo.Dict()
# ... validation ...
self.logger.debug(f"Errors: {errorsDict}")
return (len(errorsDict) == 0, valuesDict, errorsDict)def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.debug = True # Force debug ondef deviceStartComm(self, dev):
self.logger.debug(f"deviceStartComm: {dev.name} (id: {dev.id})")
self.logger.debug(f" address: {dev.address}")
self.logger.debug(f" model: {dev.model}")
self.logger.debug(f" states: {dev.states}")
super().deviceStartComm(dev)try:
response = requests.get(url)
response.raise_for_status()
except Exception as exc:
self.logger.exception("API call failed") # Includes stack trace# Test API parsing outside of Indigo
import json
response_text = '{"status": "ok", "data": [...]}'
data = json.loads(response_text)
print(data['data'][0])Symptoms: Indigo becomes sluggish when plugin is running
Common causes:
- Too frequent polling
- Blocking operations in callbacks
- Memory leaks
- Too many state updates
Solutions:
- Increase polling interval
- Use
self.sleep()properly - Batch state updates
- Profile memory usage
# Check for leaks - log memory usage
import sys
def runConcurrentThread(self):
while True:
self.logger.debug(f"Devices in memory: {len(self.devices_dict)}")
# ... update logic ...
self.sleep(300)We need community contributions for:
- XML validation errors
- Device model mismatches
- State update timing issues
- Thread synchronization problems
- API rate limiting strategies
- Memory leak detection
- Performance profiling
- UI callback issues
Encountered a tricky issue and solved it? Document it here!
Good troubleshooting docs include:
- Clear symptom description
- Root cause explanation
- Step-by-step solution
- How to prevent it
- Code examples
See CONTRIBUTING.md.
If you can't solve your issue:
- 📋 Check Indigo Developer Forum
- 💬 Ask in GitHub Discussions
- 📖 Review Official Docs
- 📧 Contact Indigo support for platform issues