Skip to content

Repository files navigation

learningHouse Service

License Release Build Status PyPI version Discord Chat

learningHouse Logo

The learningHouse Service provides machine learning algorithms based on the scikit-learn Python library as a RESTful API. Its purpose is to offer smart home enthusiasts an easy way to teach their homes.

You push sensor data into the service, tell it what the right answer was, and it learns the connection. A brain is one such trained model: "is it dark enough to switch the light on?", "which setpoint should the heating run at?" - whatever your own house does, learned from your own house's data.

📖 Full documentation: learninghouseservice.github.io/learninghouse

🔧 Features

  • 🧠 Brains: named models, each one a classifier for categorical answers or a regressor for numerical ones, built on scikit-learn's random forest estimators
  • 📡 Sensors: your data fields, declared once as numerical or categorical, preprocessed for you
  • 🔌 Training and prediction over REST, so any home automation system that can send an HTTP request can use it
  • 🕒 Automatic time features: month, day, weekday, hour and minute derived from every training row
  • 🩹 Missing sensor values are handled, not rejected
  • 🖥️ A small web UI for sensors, brains, API keys and the administration password
  • 🔐 JWT and API key authorization, with user and trainer roles
  • 🐳 Docker images for linux/amd64 and linux/arm64

🚀 Quick Start

pip install -U learninghouse

mkdir -p brains
learninghouse

The service listens on http://localhost:5000/, the UI is at http://localhost:5000/ui. Log in with the fallback password learninghouse and change it - until you do, every other endpoint stays disabled.

Or with Docker:

docker run --name learninghouse --rm \
    -v brains:/learninghouse/brains \
    -p 5000:5000 \
    -e "TZ=Europe/Berlin" \
    ghcr.io/learninghouseservice/learninghouse:latest

Step by step, with every option explained: Installation guide

📚 Documentation

Guide What it covers
Getting Started Installation, first configuration, running the service
Configuration Reference Every configuration.yaml key, sensors, brains, security
Usage Training, prediction, the UI, where the API documentation lives
Deployment Docker and Docker Compose
Migration Upgrading to 2.0.0 from the LEARNINGHOUSE_* environment variables
Troubleshooting Known symptoms and what to do about them
Architecture Decisions Why the project is built the way it is
Contributing Project architecture, conventions and developer commands

💬 Contact and Feedback

If you have any questions, please contact us on Discord.

Discord Banner

Please share your ideas on what you want to teach your home, suggestions or problems by opening an issue. We are really looking forward to your feedback.

About

The LearningHouse Service provides machine learning algorithms based on the scikit-learn python library as a RESTful API. Its purpose is to offer smart home enthusiasts an easy way to teach their homes.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages