All Projects → akmolina28 → last-watch-ai

akmolina28 / last-watch-ai

Licence: MIT license
Self-hosted computer vision automation application

Programming Languages

PHP
23972 projects - #3 most used programming language
Vue
7211 projects

Projects that are alternatives of or similar to last-watch-ai

node-deepstackai-trigger
Detects motion using Deepstack AI and calls registered triggers based on trigger rules.
Stars: ✭ 154 (+214.29%)
Mutual labels:  home-automation, deepstack
double-take
Unified UI and API for processing and training images for facial recognition.
Stars: ✭ 585 (+1093.88%)
Mutual labels:  home-automation, deepstack
alarmserver
IP Camera Alarm Server to MQTT
Stars: ✭ 73 (+48.98%)
Mutual labels:  home-automation, home-security
raspberry pi home security system
Home monitoring system with a Raspberry Pi and sending notifications with a Telegram bot
Stars: ✭ 14 (-71.43%)
Mutual labels:  home-automation, home-security
Hue Dashboard
A web interface for monitoring and controlling Philips Hue lights
Stars: ✭ 251 (+412.24%)
Mutual labels:  home-automation
Node Red Contrib Home Assistant Websocket
Node-RED integration with Home Assistant Core
Stars: ✭ 222 (+353.06%)
Mutual labels:  home-automation
Locative Ios
[NOT MAINTAINED] The Locative iOS app. Helping you to get the best out of your automated home, geofencing, iBeacons at your hand.
Stars: ✭ 213 (+334.69%)
Mutual labels:  home-automation
Homeassistant Config
Stars: ✭ 211 (+330.61%)
Mutual labels:  home-automation
home-assistant-config
My configuration for Home Assistant
Stars: ✭ 63 (+28.57%)
Mutual labels:  home-automation
hfeasy
HFeasy - firmware for HF-LPx100/LPx30 based devices
Stars: ✭ 35 (-28.57%)
Mutual labels:  home-automation
Home Assistant Cli
💻 Command-line tool for Home Assistant
Stars: ✭ 243 (+395.92%)
Mutual labels:  home-automation
Ebusd
daemon for communication with eBUS heating systems
Stars: ✭ 237 (+383.67%)
Mutual labels:  home-automation
google home timers card
Card for Home Assistant Google Home integration.
Stars: ✭ 29 (-40.82%)
Mutual labels:  home-automation
Smart Home
⭐ (Almost) everything needed to run my smart home with Home Assistant and more!
Stars: ✭ 221 (+351.02%)
Mutual labels:  home-automation
home assistant-ble
Companion application for home-assistant, sending bluetooth low energy detection
Stars: ✭ 21 (-57.14%)
Mutual labels:  home-automation
Brad Homeassistant Config
Home Assistant configuration
Stars: ✭ 212 (+332.65%)
Mutual labels:  home-automation
Netdisco
🔎 Python library to scan local network for services and devices.
Stars: ✭ 240 (+389.8%)
Mutual labels:  home-automation
deskmatik
Open source smart desk controller https://deskmatik.com
Stars: ✭ 24 (-51.02%)
Mutual labels:  home-automation
Smart Mirror
The fairest of them all. A DIY voice controlled smart mirror with IoT integration.
Stars: ✭ 2,668 (+5344.9%)
Mutual labels:  home-automation
Sucks
Simple command-line script for the Ecovacs series of robot vacuums
Stars: ✭ 237 (+383.67%)
Mutual labels:  home-automation

Last Watch AI Build Status StyleCI

Last Watch AI is a locally hosted application for creating if-then automations based on computer vision events. Last Watch can be used in tandem with IP camera software to trigger actions if the AI detects certain objects, like cars, people, or animals.

This project was heavily inspired by gentlepumpkin/bi-aidetection.

detection-event3

How it works

Last Watch watches for new image files in a configurable directory, then checks each image for a range of objects such as cars or people. Different automations can be set up to trigger if the AI detects relevant objects in the images.

A primary use case for Last Watch is to enhance Video Management Systems such as Blue Iris. For example, Last Watch can be set up to trigger security recordings only when a person is detected on security camera, thereby eliminating irrelevant motion events.

Last Watch can also be integrated with automation platforms suchs as Home Assistant, Node-RED, or openHAB. For instance, you can create virtual sensors which are set when a person is in a room, or when a car is parked in the garage.

Features

  • Platform Independence - everything runs in Docker containers
  • Web Interface - desktop and mobile friendly
  • Web API - everything can be managed with REST
  • Offline and locally hosted

Supported Automations:

  • Telegram - send images to bot
  • Folder Copy - copy images to a local folder
  • Smb/Cifs - upload images to a Samba share (Synology, Windows share, Home Assistant)
  • Web Request - make http GET and POST requests
  • MQTT - publish out MQTT messages

Installation

Last Watch has been tested on Windows, Debian, and Arch Linux. Dual-core CPU and 2GB of memory are recommended.

Detailed Windows Setup Guide

Detailed Ubuntu Setup Guide

Install From Source (recommended)

  1. Clone the repo
$ git clone https://github.com/akmolina28/last-watch-ai.git
$ cd last-watch-ai
  1. Create the .env file from one of the examples
$ cp configs/.env.linux .env
$ nano .env
  1. Build the application
$ cp src/.env.example src/.env &&
  sudo docker-compose up -d mysql &&
  sudo docker-compose run --rm composer install --optimize-autoloader --no-dev &&
  sudo docker-compose run --rm artisan route:cache &&
  sudo docker-compose run --rm artisan key:generate --force &&
  sudo docker-compose run --rm artisan storage:link &&
  sudo docker-compose run --rm artisan migrate --force &&
  sudo docker-compose run --rm npm install --verbose &&
  sudo docker-compose run --rm npm run prod --verbose
  1. Start the containers
$ sudo docker-compose up -d --build site

Upgrade from source

  1. Stop the containers during the upgrade
$ cd /path/to/last-watch-ai

$ sudo docker-compose down
  1. Pull latest source code
$ git pull
  1. Re-build application and migrate database
$ sudo docker-compose run --rm composer install --optimize-autoloader --no-dev &&
  sudo docker-compose run --rm artisan route:cache &&
  sudo docker-compose run --rm artisan migrate --force &&
  sudo docker-compose run --rm npm install --verbose &&
  sudo docker-compose run --rm npm rebuild &&
  sudo docker-compose run --rm npm run prod --verbose
  1. Restart the containers
$ sudo docker-compose up -d --build site

Install From Release Build

  1. Install Docker and Docker Compose

  2. Download the latest release un-zip and extract the files

  3. Set the watch folder and web port by editing the .env file

  4. Start the containers with Docker Compose

docker-compose up -d --build site

User Guide and Documentation

User Guide

Full Walkthrough with Blue Iris

API Reference

Automation Examples:

Contributing

Contributions are welcome and will be credited.

Development and Testing

Last Watch is written in PHP on the Laravel framework and the interface is written in Vue.js. The Laravel application also functions as a headless API such that the interface can be completely bypassed if needed.

The application is made up of several Docker containers. Each container serves a different purpose:

  • The Nginx, MySQL, and PHP containers make up the LEMP stack to host the Laravel app
  • The Watcher is a node.js app that scans for image files and sends Webhook messages to the Laravel app
  • The Deepstack container hosts the object detection API
  • The Queue container handles queued jobs from the Laravel app using Supervisor
  • The Scheduler is a cron-like container that handles scheduled tasks from the Laravel app
  • NPM, artisan, composer, and testing containers are also defined to help with development and building

To get started with development, follow the steps to install the project from source. Use your favorite IDE to edit the source files and recompile the front-end using Webpack. You can run docker-compose run --rm npm run watch to automatically recompile when scripts are changed.

To execute tests, use the built in phpunit container by running docker-compose run --rm phpunit. This container will also stand up separate testing containers for mysql and deepstack to run the feature tests.

Buy Me A Coffee

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].