Skip to content

Add Home Assistant Automation skill for AnythingLLM - #18

Open
Sysoiev-Yurii wants to merge 2 commits into
augmentcode:mainfrom
Sysoiev-Yurii:sysoiev-yurii-add-home-assistant-automation-skill
Open

Add Home Assistant Automation skill for AnythingLLM#18
Sysoiev-Yurii wants to merge 2 commits into
augmentcode:mainfrom
Sysoiev-Yurii:sysoiev-yurii-add-home-assistant-automation-skill

Conversation

@Sysoiev-Yurii

Copy link
Copy Markdown

Overview

This PR introduces a complete Home Assistant Automation skill for AnythingLLM that enables users to control smart home devices using natural language commands. The skill integrates with Home Assistant's REST API to provide device control, scene activation, and automation discovery.

Why This Matters

Users can now interact with their Home Assistant ecosystem conversationally through AnythingLLM, eliminating the need to manually navigate dashboards or remember entity IDs. Natural language processing makes home automation accessible to everyone.

What's Included

Core Implementation:

  • home-assistant-client.ts - REST API client handling all Home Assistant communication
  • home-assistant-skill.ts - Natural language processing engine with intent recognition and device matching
  • home-assistant-skill-setup.ts - AnythingLLM integration layer with validation and metadata

Configuration & Package:

  • SKILL_MANIFEST.json - Skill manifest with required settings and capabilities
  • Unit tests covering intent parsing, error handling, and configuration validation
  • Usage examples showing common patterns and integration points

Documentation:

  • Comprehensive guide with setup instructions, usage examples, and troubleshooting
  • Quick reference card with common commands and device naming tips
  • Security best practices for API token handling

Key Features

  • Natural Language Commands: Understand variations like "turn on the lights", "set brightness to 50%", "set thermostat to 72 degrees"
  • Device Discovery: List all devices and scenes with @agent list all devices
  • Multiple Device Types: Support for lights, switches, climate, covers, fans, and scenes
  • Smart Matching: Intelligently match partial device names to entity IDs
  • Error Handling: Graceful error messages with helpful troubleshooting guidance
  • Caching: 5-second device cache to minimize API calls

Technical Highlights

  • TypeScript with proper type definitions
  • Modular architecture separating API client, skill logic, and setup
  • Intent parsing using regex patterns for flexibility
  • Device name matching with multiple strategies (exact ID, friendly name, partial match)
  • Validation utilities for settings verification

Setup Flow

  1. User gets API token from Home Assistant Profile → Security
  2. Imports skill via AnythingLLM Community Hub
  3. Configures API URL and Key in skill settings
  4. Enables the skill and starts using natural language commands

All security-sensitive information is stored in AnythingLLM settings, never in code or logs.

Copilot CLI and others added 2 commits July 28, 2026 01:07
- Create manifest for skill configuration
- Implement HomeAssistantClient for REST API communication
- Implement HomeAssistantSkill with natural language processing
- Add setup and integration module for AnythingLLM
- Include comprehensive documentation and usage guide
- Add unit tests for skill validation
- Add usage examples for developers

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Quick setup checklist
- Common command examples
- Device naming tips
- Troubleshooting guide
- Natural language examples
- Security reminders

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Sysoiev-Yurii

Copy link
Copy Markdown
Author

Overview

This PR introduces a complete Home Assistant Automation skill for AnythingLLM that enables users to control smart home devices using natural language commands. The skill integrates with Home Assistant's REST API to provide device control, scene activation, and automation discovery.

Why This Matters

Users can now interact with their Home Assistant ecosystem conversationally through AnythingLLM, eliminating the need to manually navigate dashboards or remember entity IDs. Natural language processing makes home automation accessible to everyone.

What's Included

Core Implementation:

  • home-assistant-client.ts - REST API client handling all Home Assistant communication
  • home-assistant-skill.ts - Natural language processing engine with intent recognition and device matching
  • home-assistant-skill-setup.ts - AnythingLLM integration layer with validation and metadata

Configuration & Package:

  • SKILL_MANIFEST.json - Skill manifest with required settings and capabilities
  • Unit tests covering intent parsing, error handling, and configuration validation
  • Usage examples showing common patterns and integration points

Documentation:

  • Comprehensive guide with setup instructions, usage examples, and troubleshooting
  • Quick reference card with common commands and device naming tips
  • Security best practices for API token handling

Key Features

  • Natural Language Commands: Understand variations like "turn on the lights", "set brightness to 50%", "set thermostat to 72 degrees"
  • Device Discovery: List all devices and scenes with @agent list all devices
  • Multiple Device Types: Support for lights, switches, climate, covers, fans, and scenes
  • Smart Matching: Intelligently match partial device names to entity IDs
  • Error Handling: Graceful error messages with helpful troubleshooting guidance
  • Caching: 5-second device cache to minimize API calls

Technical Highlights

  • TypeScript with proper type definitions
  • Modular architecture separating API client, skill logic, and setup
  • Intent parsing using regex patterns for flexibility
  • Device name matching with multiple strategies (exact ID, friendly name, partial match)
  • Validation utilities for settings verification

Setup Flow

  1. User gets API token from Home Assistant Profile → Security
  2. Imports skill via AnythingLLM Community Hub
  3. Configures API URL and Key in skill settings
  4. Enables the skill and starts using natural language commands

All security-sensitive information is stored in AnythingLLM settings, never in code or logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant