Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ Thank you for contributing! This skill helps the entire Indigo development commu

```bash
# Fork on GitHub, then:
git clone https://github.com/YOUR-USERNAME/indigo-skill.git
cd indigo-skill
git remote add upstream https://github.com/indigo-community/indigo-skill.git
git clone https://github.com/YOUR-USERNAME/indigo-claude-skill.git
cd indigo-claude-skill
git remote add upstream https://github.com/simons-plugins/indigo-claude-skill.git
```

### 2. Create a Branch
Expand Down Expand Up @@ -269,8 +269,8 @@ def example_method(self):

## Questions?

- Open a [Discussion](https://github.com/indigo-community/indigo-skill/discussions) for general questions
- Open an [Issue](https://github.com/indigo-community/indigo-skill/issues) for bugs or feature requests
- Open a [Discussion](https://github.com/simons-plugins/indigo-claude-skill/discussions) for general questions
- Open an [Issue](https://github.com/simons-plugins/indigo-claude-skill/issues) for bugs or feature requests
- Tag maintainers with @mention for urgent matters

## Code of Conduct
Expand Down
12 changes: 6 additions & 6 deletions QUICK_START.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ Get started with the Indigo Plugin Development Skill in 5 minutes!

```bash
# Download and run the installer
curl -fsSL https://raw.githubusercontent.com/indigo-community/indigo-skill/main/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/simons-plugins/indigo-claude-skill/main/install.sh | bash
```

### Option 2: Manual Clone

```bash
cd /path/to/your/indigo/project
mkdir -p .claude/skills
git clone https://github.com/indigo-community/indigo-skill.git .claude/skills/indigo
git clone https://github.com/simons-plugins/indigo-claude-skill.git .claude/skills/indigo
```

### Option 3: Git Submodule

```bash
cd /path/to/your/indigo/project
mkdir -p .claude/skills
git submodule add https://github.com/indigo-community/indigo-skill.git .claude/skills/indigo
git submodule add https://github.com/simons-plugins/indigo-claude-skill.git .claude/skills/indigo
```

## Verify Installation
Expand Down Expand Up @@ -246,7 +246,7 @@ git pull origin main

Found the skill helpful? Consider contributing:

1. **Report Issues**: Found incorrect info? [Open an issue](https://github.com/indigo-community/indigo-skill/issues)
1. **Report Issues**: Found incorrect info? [Open an issue](https://github.com/simons-plugins/indigo-claude-skill/issues)
2. **Add Documentation**: See [CONTRIBUTING.md](CONTRIBUTING.md)
3. **Share Examples**: Your plugin could help others!
4. **Improve Docs**: Fix typos, clarify explanations
Expand All @@ -255,8 +255,8 @@ Found the skill helpful? Consider contributing:

- 📚 Read the full [README](README.md)
- 📖 Browse [Documentation](docs/README.md)
- 💬 Join [Discussions](https://github.com/indigo-community/indigo-skill/discussions)
- 🐛 Report [Issues](https://github.com/indigo-community/indigo-skill/issues)
- 💬 Join [Discussions](https://github.com/simons-plugins/indigo-claude-skill/discussions)
- 🐛 Report [Issues](https://github.com/simons-plugins/indigo-claude-skill/issues)
- 🌐 Visit [Indigo Forum](https://forums.indigodomo.com/viewforum.php?f=18)

---
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ This is a Claude Code skill that provides expert assistance for developing [Indi
cd /path/to/your/indigo/project
mkdir -p .claude/skills
cd .claude/skills
git clone https://github.com/indigo-community/indigo-skill.git indigo
git clone https://github.com/simons-plugins/indigo-claude-skill.git indigo
```

### Option 2: Add as submodule

```bash
cd /path/to/your/indigo/project
mkdir -p .claude/skills
git submodule add https://github.com/indigo-community/indigo-skill.git .claude/skills/indigo
git submodule add https://github.com/simons-plugins/indigo-claude-skill.git .claude/skills/indigo
```

### Option 3: Symlink (for multiple projects)

```bash
# Clone once
git clone https://github.com/indigo-community/indigo-skill.git ~/indigo-skill
git clone https://github.com/simons-plugins/indigo-claude-skill.git ~/indigo-skill

# Symlink in each project
cd /path/to/your/indigo/project
Expand Down
6 changes: 3 additions & 3 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Help us prioritize by voting on or contributing to these areas:

Have an idea not on the roadmap?

1. Open a [Discussion](https://github.com/indigo-community/indigo-skill/discussions)
1. Open a [Discussion](https://github.com/simons-plugins/indigo-claude-skill/discussions)
2. Explain the feature and why it's valuable
3. Gather community feedback
4. Create an issue if there's interest
Expand Down Expand Up @@ -234,8 +234,8 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details.

## Questions?

- 💬 Open a [Discussion](https://github.com/indigo-community/indigo-skill/discussions)
- 📋 Review [existing issues](https://github.com/indigo-community/indigo-skill/issues)
- 💬 Open a [Discussion](https://github.com/simons-plugins/indigo-claude-skill/discussions)
- 📋 Review [existing issues](https://github.com/simons-plugins/indigo-claude-skill/issues)
- 📧 Contact maintainers

---
Expand Down
54 changes: 32 additions & 22 deletions docs/concepts/plugin-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs, **kw
**Purpose**: Initialize resources, subscribe to events, start connections

**Rules**:
- ✅ Call `super().startup()` first (optional but recommended)
- ❌ Do NOT call `super().startup()` (method doesn't exist in base class)
- ✅ Initialize API connections
- ✅ Subscribe to Indigo events
- ✅ Load persistent data
Expand All @@ -76,8 +76,7 @@ def __init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs, **kw

```python
def startup(self):
super().startup()

# Note: Do NOT call super().startup() - it doesn't exist
self.logger.info(f"{self.pluginDisplayName} starting")

# Now safe to access Indigo database
Expand Down Expand Up @@ -178,7 +177,7 @@ def runConcurrentThread(self):
- ✅ Unsubscribe from events
- ✅ Close files and sockets
- ✅ Cancel timers
- ✅ Call `super().shutdown()` last (optional but recommended)
- ❌ Do NOT call `super().shutdown()` (method doesn't exist in base class)

```python
def shutdown(self):
Expand Down Expand Up @@ -211,7 +210,7 @@ def shutdown(self):
except Exception:
pass

super().shutdown()
# Note: Do NOT call super().shutdown() - it doesn't exist
```

**Best Practice**: Wrap cleanup operations in try/except blocks to ensure all cleanup happens even if one step fails.
Expand Down Expand Up @@ -364,8 +363,7 @@ def __init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs, **kw
self.api_client = None # Will initialize in startup()

def startup(self):
super().startup()

# Note: Do NOT call super().startup() - it doesn't exist
api_key = self.pluginPrefs.get("apiKey", "")
if api_key:
self.api_client = APIClient(api_key)
Expand All @@ -392,8 +390,7 @@ def shutdown(self):
except Exception as exc:
self.logger.exception("Error closing API client")

# Always call super
super().shutdown()
# Note: Do NOT call super().shutdown() - it doesn't exist
```

### Thread-Safe Polling
Expand Down Expand Up @@ -436,7 +433,7 @@ def __init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs, **kw
self.debug = True # Force debug on during development

def startup(self):
super().startup()
# Note: Do NOT call super().startup() - it doesn't exist
self.logger.debug("Startup called")
self.logger.debug(f"Plugin prefs: {self.pluginPrefs}")
```
Expand All @@ -449,7 +446,7 @@ def __init__(self, *args, **kwargs):
self.logger.debug("__init__ called")

def startup(self):
super().startup()
# Note: Do NOT call super().startup() - it doesn't exist
self.logger.debug("startup() called")

def runConcurrentThread(self):
Expand All @@ -463,7 +460,7 @@ def runConcurrentThread(self):

def shutdown(self):
self.logger.debug("shutdown() called")
super().shutdown()
# Note: Do NOT call super().shutdown() - it doesn't exist
```

## Common Mistakes
Expand All @@ -485,28 +482,41 @@ def __init__(self, *args, **kwargs):
self.my_device = None

def startup(self):
super().startup()
# Note: Do NOT call super().startup() - it doesn't exist
try:
self.my_device = indigo.devices["MyDevice"]
except KeyError:
self.logger.error("MyDevice not found")
```

### ❌ Forgetting to Call `super()`
### ❌ Calling `super()` in Wrong Methods

```python
# WRONG - Always call super()
# WRONG - startup() doesn't have a parent implementation
def startup(self):
self.logger.info("Starting") # super().startup() not called!
super().startup() # AttributeError!
self.logger.info("Starting")

# WRONG - shutdown() doesn't have a parent implementation
def shutdown(self):
super().shutdown() # AttributeError!
```

**Fix**:
```python
# RIGHT - startup() is a pure callback
def startup(self):
super().startup() # Always call super first!
# No super() call needed
self.logger.info("Starting")

# RIGHT - shutdown() is a pure callback
def shutdown(self):
# No super() call needed
self.logger.info("Shutting down")
```

**Remember**: Only call `super()` in `__init__()` (required) and device callbacks like `deviceStartComm()` (recommended)

### ❌ Using `time.sleep()` in Concurrent Thread

```python
Expand Down Expand Up @@ -561,18 +571,16 @@ def runConcurrentThread(self):
```python
# WRONG - File left open
def startup(self):
super().startup()
self.log_file = open("/tmp/mylog.txt", "a")

def shutdown(self):
super().shutdown()
# Forgot to close file!
pass
```

**Fix**:
```python
def startup(self):
super().startup()
self.log_file = open("/tmp/mylog.txt", "a")

def shutdown(self):
Expand All @@ -581,14 +589,16 @@ def shutdown(self):
self.log_file.close()
except Exception as exc:
self.logger.exception("Error closing log file")
super().shutdown()
# Note: Do NOT call super().shutdown() - it doesn't exist
```

## Resource Management Checklist

- [ ] All instance variables initialized in `__init__()`
- [ ] No Indigo database access in `__init__()`
- [ ] `super()` called in all lifecycle methods
- [ ] `super().__init__()` called in `__init__()` (required)
- [ ] `super()` called in device callbacks like `deviceStartComm()` (recommended)
- [ ] `super()` NOT called in `startup()` or `shutdown()`
- [ ] Connections opened in `startup()`
- [ ] Event subscriptions done in `startup()`
- [ ] `self.sleep()` used (not `time.sleep()`) in `runConcurrentThread()`
Expand Down
18 changes: 13 additions & 5 deletions docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,25 @@ Before enabling your plugin, verify:

## Common Beginner Mistakes

### ❌ Mistake 1: Forgetting to call `super()`
### ❌ Mistake 1: Calling `super()` on wrong methods

```python
# WRONG - Skips parent initialization
# WRONG - startup() doesn't have a parent implementation
def startup(self):
super().startup() # AttributeError!
self.logger.info("Starting")

# RIGHT - Always call super first
# RIGHT - Only call super() in __init__ and device callbacks
def __init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs):
super().__init__(pluginId, pluginDisplayName, pluginVersion, pluginPrefs) # REQUIRED!

def startup(self):
super().startup()
# No super() call needed here
self.logger.info("Starting")

def deviceStartComm(self, dev):
super().deviceStartComm(dev) # Good practice for device callbacks
# Your code here
```

### ❌ Mistake 2: Using `time.sleep()` in concurrent thread
Expand Down Expand Up @@ -293,7 +301,7 @@ Now that you have a working plugin:
- 📖 [Official Plugin Developer's Guide](https://www.indigodomo.com/docs/plugin_guide)
- 📚 [Indigo Object Model Reference](https://www.indigodomo.com/docs/object_model_reference)
- 💬 [Indigo Developer Forum](https://forums.indigodomo.com/viewforum.php?f=18)
- 🔧 [GitHub: Indigo Skill Repository](https://github.com/indigo-community/indigo-skill)
- 🔧 [GitHub: Indigo Skill Repository](https://github.com/simons-plugins/indigo-claude-skill)

---

Expand Down
4 changes: 2 additions & 2 deletions docs/troubleshooting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ plutil -lint Info.plist
```python
def startup(self):
try:
super().startup()
# Note: Do NOT call super().startup() - it doesn't exist
self.logger.debug("Startup: step 1")
# ... your code ...
self.logger.debug("Startup: step 2")
Expand Down Expand Up @@ -200,6 +200,6 @@ See [CONTRIBUTING.md](../../CONTRIBUTING.md).
If you can't solve your issue:

1. 📋 Check [Indigo Developer Forum](https://forums.indigodomo.com/viewforum.php?f=18)
2. 💬 Ask in [GitHub Discussions](https://github.com/indigo-community/indigo-skill/discussions)
2. 💬 Ask in [GitHub Discussions](https://github.com/simons-plugins/indigo-claude-skill/discussions)
3. 📖 Review [Official Docs](https://www.indigodomo.com/docs/plugin_guide)
4. 📧 Contact Indigo support for platform issues
Loading
Loading