Skip to content

tuxthepenguin84/homeassistant

Repository files navigation

Contributors Forks Stargazers Issues MIT


Logo

Home Assistant

AI Powered Home Assistant
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Running
  4. Mobile App
  5. Roadmap
  6. Contributing
  7. License
  8. Contact
  9. Acknowledgments

About The Project

A simple Home Assistant app that uses Large Language Models & Agents to perform actions in your smart home.

Integrates with the following model providers:

  • OpenAI
  • Anthropic
  • Gemini
  • Ollama
  • Groq
  • Mistral
  • Cohere
  • Bedrock

Perform actions like the following:

  • Lights, Outlets, Plugs, Switches, etc.
  • Garage Door
  • Sprinkler System
  • Retrieve Weather
  • Its easy to customize and add your own

Example of running Home Assistant:

~ python3 assistant.py
> Turn the lights on in the office.
I have turned on the office lights.

~ python3 assistant.py
> Open the garage door.
The garage door is now open.

~ python3 assistant.py
> What's the weather in San Francisco today?
OK. I retrieved the weather information for San Francisco, CA. The current temperature is 52°F, with a PM2.5 of 13.2 μg/m³ and a PM10 of 17.2 μg/m³. The weather forecast for today is a high of 61.2°F and a low of 43.1°F. There is no precipitation expected. The sun will rise at 6:50 AM and set at 6:50 PM.

(back to top)

Built With

(back to top)

Getting Started

Prerequisites

Home Assistant can be run in two manners, locally or hosted with an API.

Running Locally

  • Install Pydantic-AI
    pip install pydantic-ai

Running the API with Docker

Configuration

  1. Clone the repo
    git clone https://github.com/tuxthepenguin84/homeassistant.git
  2. Fill in API keys & Model info in params.json
  3. Customize agents.py. I have provided some generic examples to help get you started.

(back to top)

Running

Running Locally

  • Run from terminal
    python3 assistant.py

Running the API with Docker

  • Build Container
    docker build -f Dockerfile . -t tuxthepenguin84/homeassistant:latest --no-cache
  • Run Container
    docker compose up -d
  • Send Request to API
    curl -s -X PUT http://localhost:5000/request -d "request=Turn the den light on."

(back to top)

Mobile App

While there is no mobile app, you can easily make one on iOS with the Shortcuts app.

  • Create a new Shortcut called Home Assistant
  • Add Dictate text
  • Add Get Contents of
    • Add the URL to your API running in Docker http://your_ip_address:5000/request
    • Method PUT
    • Request Body Form
      • Add new field: request "Dictacte Text"
  • Save the shortcut to your iOS home screen
  • Tap the app and speak your request

Roadmap

TBD

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

Top contributors:

contrib.rocks image

License

Distributed under the MIT. See LICENSE.txt for more information.

(back to top)

Contact

Project Link: https://github.com/tuxthepenguin84/homeassistant

(back to top)

Acknowledgments

(back to top)

About

AI powered home assistant

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published