| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
This project provides a voice-controlled agent for interacting with your Home Assistant setup. The agent listens for a hot word and allows you to list and control smart devices (like lights and switches) using natural language.
(click image to see short YouTube video of agent controlling lighting)
(click image to see short YouTube video of agent controlling a TV lift)
Create a .env file in the project root (or set these variables in your environment):
| Variable | Description |
|---|---|
| HOMEAUTOMAITON_TOKEN | Your Home Assistant long-lived access token |
| HOMEAUTOMATION_URL | (Optional) Home Assistant base URL (default: http://localhost:8123) |
Example `.env:**
HOMEAUTOMAITON_TOKEN=your_home_assistant_token_here HOMEAUTOMATION_URL=http://localhost:8123
Install dependencies:
pip install -r ../requirements.txt
Set up your .env file as described above.
Run the agent:
python homeautomation.py start
How it works:
sequenceDiagram
participant User
participant Agent
participant HomeAssistant
User->>Agent: "hey casa"
Agent->>Agent: Detect hot word
Agent->>User: "Waiting for command"
User->>Agent: "list devices"
Agent->>HomeAssistant: GET /api/states
HomeAssistant-->>Agent: List of devices
Agent->>User: "Available devices: Kitchen Light, Living Room Switch..."
User->>Agent: "turn on kitchen light"
Agent->>HomeAssistant: GET /api/states/light.kitchen
HomeAssistant-->>Agent: Device details
Agent->>HomeAssistant: POST /api/services/light/turn_on
HomeAssistant-->>Agent: Success
Agent->>User: "Ok, I've turned Kitchen Light on"
| Back | FazBrowse Home | New Git URL |