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
42 changes: 39 additions & 3 deletions docs/api/iom/command-namespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,27 @@ indigo.variable.moveToFolder(var_or_id, folder_id)
# Execute action group
indigo.actionGroup.execute(ag_or_id)

# Execute with event data (indigo.Dict passed to actions)
# Indigo auto-adds "source" key ("server", "python", "api-http", or "api-websocket")
indigo.actionGroup.execute(ag_or_id, event_data=some_dict)

# Enable/disable
indigo.actionGroup.enable(ag_or_id, value=True)

# Delete
indigo.actionGroup.delete(ag_or_id)

# Duplicate (returns new action group instance)
indigo.actionGroup.duplicate(ag_or_id, duplicateName="Copy of AG")

# Move to folder
indigo.actionGroup.moveToFolder(ag_or_id, value=folder_id)

# Display in remote UI
indigo.actionGroup.displayInRemoteUI(ag_or_id, value=True)

# Get dependencies (returns indigo.Dict of dependent objects)
indigo.actionGroup.getDependencies(ag_or_id)
```

## Schedule Commands
Expand All @@ -169,11 +185,28 @@ indigo.actionGroup.delete(ag_or_id)
| `indigo.Schedule` | `indigo.schedule.*` |

```python
# Enable/disable
indigo.schedule.enable(sched_or_id, value=True)
# Enable/disable (with optional delay and duration in seconds)
indigo.schedule.enable(sched_or_id, value=True, delay=0, duration=0)

# Delete
indigo.schedule.delete(sched_or_id)

# Duplicate (returns new schedule instance)
indigo.schedule.duplicate(sched_or_id, duplicateName="Copy of Schedule")

# Execute immediately
# ignoreConditions: bypass any schedule conditions
# schedule_data: indigo.Dict with optional metadata (Indigo auto-adds "source" and "timestamp")
indigo.schedule.execute(sched_or_id, ignoreConditions=False, schedule_data=None)

# Move to folder
indigo.schedule.moveToFolder(sched_or_id, value=folder_id)

# Get dependencies (returns indigo.Dict of dependent objects)
indigo.schedule.getDependencies(sched_or_id)

# Remove any pending delayed actions
indigo.schedule.removeDelayedActions(sched_or_id)
```

## Protocol-Specific Commands
Expand Down Expand Up @@ -213,7 +246,10 @@ All namespaces support these methods for their object type:
| Method | Description |
|--------|-------------|
| `create()` | Create new object |
| `duplicate()` | Duplicate existing object |
| `duplicate()` | Duplicate existing object (returns new instance) |
| `delete()` | Delete object |
| `enable()` | Enable/disable object |
| `execute()` | Execute object (action groups, schedules) |
| `moveToFolder()` | Move to folder |
| `getDependencies()` | Get dependent Indigo objects (returns `indigo.Dict`) |
| `removeDelayedActions()` | Remove pending delayed actions (schedules) |
60 changes: 59 additions & 1 deletion docs/patterns/api-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ def get_variable_value(self, name, default=""):
return default
```

## Action Group Execution
## Action Group Patterns

### Execute

```python
# By ID
Expand All @@ -173,6 +175,62 @@ indigo.actionGroup.execute(123456)
# By name
ag = indigo.actionGroups["Morning Routine"]
indigo.actionGroup.execute(ag.id)

# With event data (passed to actions in the group)
event_data = indigo.Dict()
event_data["scene"] = "evening"
indigo.actionGroup.execute(ag.id, event_data=event_data)
```

### Dependencies and Management

```python
# Check what depends on an action group before deleting
deps = indigo.actionGroup.getDependencies(ag.id)
if deps:
indigo.server.log(f"Action group has dependencies: {deps}")

# Duplicate an action group
new_ag = indigo.actionGroup.duplicate(ag.id, duplicateName="Morning Routine v2")

# Move to a folder
indigo.actionGroup.moveToFolder(ag.id, value=folder_id)
```

## Schedule Patterns

### Execute and Control

```python
# Execute a schedule immediately
indigo.schedule.execute(sched.id)

# Execute ignoring conditions
indigo.schedule.execute(sched.id, ignoreConditions=True)

# Execute with metadata
sched_data = indigo.Dict()
sched_data["reason"] = "manual override"
indigo.schedule.execute(sched.id, schedule_data=sched_data)

# Enable with delay (seconds before activation) and duration (auto-disable after)
indigo.schedule.enable(sched.id, value=True, delay=30, duration=3600)

# Cancel pending delayed actions
indigo.schedule.removeDelayedActions(sched.id)
```

### Dependencies and Management

```python
# Check dependencies before deletion
deps = indigo.schedule.getDependencies(sched.id)

# Duplicate a schedule
new_sched = indigo.schedule.duplicate(sched.id, duplicateName="Weekday Backup")

# Move to a folder
indigo.schedule.moveToFolder(sched.id, value=folder_id)
```

## Logging Patterns
Expand Down
59 changes: 59 additions & 0 deletions docs/patterns/open-source-contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Contributing to Indigo Open Source Plugins

The [IndigoDomotics GitHub organization](https://github.com/IndigoDomotics) hosts curated open-source Indigo plugins. This guide covers the contribution workflow for submitting changes or new plugins.

## Contribution Workflow

### 1. Create an Issue

Open an issue in the relevant repository to discuss planned changes before starting work. This prevents conflicts with other developers and helps flesh out the approach. Skip this step only when addressing an existing issue.

### 2. Fork the Repository

Fork the repository on GitHub. Keep the fork updated using GitHub's "Fetch & Merge" button before starting new work.

### 3. Make Changes

Implement modifications in the fork. Use unit testing where available and add new tests for changes. Follow the coding and style guide from the [.github repository](https://github.com/IndigoDomotics/.github).

### 4. Comment Changes

Add comments explaining major modifications to help reviewers understand the intent behind changes.

### 5. Commit and Push

Push regularly to the fork as a backup. Use clear, descriptive commit messages.

### 6. Create Beta Releases (Optional)

Create beta releases in the fork for testing with beta testers when possible. This helps catch environment-specific issues before the official review.

### 7. Submit Pull Request

Create a pull request linking to the issue(s) the changes address. Include a clear description of what changed and why.

### 8. Review Process

An open source manager reviews the submission and provides feedback. Address any requested changes and update the PR.

### 9. Approval and Merge

Once approved, managers merge the changes, generate official releases, and update the Indigo Plugin Store.

### 10. Issue Closure

Linked issues are closed with the release version number noted.

## Key Guidelines

- **Discuss first**: Always create an issue before significant work to avoid conflicts
- **Test thoroughly**: Use and add unit tests where available
- **Follow style guides**: Check the [.github repository](https://github.com/IndigoDomotics/.github) for coding standards
- **Keep PRs focused**: Address one issue or feature per pull request
- **Document changes**: Comment code and describe PR changes clearly

## Resources

- **Organization**: https://github.com/IndigoDomotics
- **Style Guide**: https://github.com/IndigoDomotics/.github
- **Developer Forum**: https://forums.indigodomo.com/viewforum.php?f=18
13 changes: 12 additions & 1 deletion skill.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Community-maintained expert assistant for Indigo home automation plugin developm
| `docs/examples/sdk-examples-guide.md` | 8KB | Example catalog |
| `docs/troubleshooting/common-issues.md` | 11KB | Troubleshooting |
| `docs/patterns/api-patterns.md` | 5KB | Common API patterns |
| `docs/patterns/open-source-contributing.md` | 3KB | Contributing to IndigoDomotics open source |

### Modular IOM Reference (Load by Topic)

Expand Down Expand Up @@ -63,6 +64,8 @@ These are complementary - load based on question type:
| Custom events, Events.xml | `docs/concepts/events.md` |
| Filters/iteration | `docs/api/iom/filters.md` |
| Subscriptions | `docs/api/iom/subscriptions.md` |
| Schedule/action group commands | `docs/api/iom/command-namespaces.md` |
| Open source contributing | `docs/patterns/open-source-contributing.md` |

### Specific Routing

Expand All @@ -85,6 +88,13 @@ These are complementary - load based on question type:
**"How do I update device state?"**
1. Read `docs/patterns/api-patterns.md`

**"How do I execute/manage schedules or action groups?"**
1. Read `docs/api/iom/command-namespaces.md`
2. Read `docs/patterns/api-patterns.md`

**"How do I contribute to open source?" / "Add plugin to IndigoDomotics"**
1. Read `docs/patterns/open-source-contributing.md`

**"What device properties exist?"**
1. Read `docs/api/iom/devices.md`

Expand Down Expand Up @@ -128,7 +138,8 @@ docs/
│ ├── containers.md # Dict/List (3KB)
│ └── utilities.md # Helpers (4KB)
├── patterns/
│ └── api-patterns.md # Common patterns (5KB)
│ ├── api-patterns.md # Common patterns (5KB)
│ └── open-source-contributing.md # IndigoDomotics contributing guide (3KB)
├── examples/
│ └── sdk-examples-guide.md # Example catalog (8KB)
└── troubleshooting/
Expand Down
Loading