Introducing: Last Watch AI

Last Watch is an all-in-one tool for creating If-Then automations based on AI computer vision.

Detection Event

Last Watch is an all-in-one tool for creating If-Then automations based on AI computer vision. The app watches for new image files, then runs them through Deepstack AI and triggers automations if certain objects like cars or people are detected. For example, Last Watch can be configured to send you a Telegram message if a person is detected on your home security camera.

Telegram Feed

Last Watch was created primarily to integrate with NVR software such as Blue Iris, but it is designed to work with any program which generates image files. The application is written in PHP on the Laravel framework, and it is completely free and open source. This project was directly inspired by gentlepumpkin's AI Tools, and is intended to fill some gaps in that project, namely:

  • Platform Independence - everything runs in Docker containers
  • Responsive Web Interface - the app is accessible from any device on your network
  • RESTful Web API
  • Extensibility - designed to be forked and added to easily
  • Server-friendly - everything can be started up as a service when the OS boots and can be managed remotely
  • Relational database

Basic Architecture

Last Watch is made up of distinct parts that work together – the file watcher, the application, and the Deepstack AI server.

The file watcher is always watching for new files in a pre-configured folder on the file system. When new image files appear, the watcher sends a webhook request to the application to kick off the AI detection. The file watcher is meant to be optional, and you can write your own tool to feed in image files via the same webhook.

The application is a Laravel web app running on LEMP. This is where you set up your detection profiles and automations. When new images come in via the webhook, the application checks them for various objects and then triggers your automations if those objects are found.

The Deepstack AI server is an offline, self-hosted API for artificial intelligence and computer vision. The application uses this API to check images for various objects like cars, people, and animals. Last Watch includes Deepstack as one of its containers, but you could host it separately or even use an entirely different API.

Setup and Documentation

Windows setup guide

Getting started guide

API documentation (coming soon)

Example integration with Blue Iris (coming soon)

Example integration with Home Assistant (coming soon)

Automation examples (coming soon)

Development and Support

Last Watch was designed and tested on Windows 10 and Windows Server 2019. In theory, the containers should work across all architectures, but other operating systems have not been tried yet.

Last Watch is open source and the maintainers give their free time to build and support the code. All contributions are welcome and will be fully credited.

If you have a problem, please check the issues page first to see if it has been reported yet. If you open a new issue, please include clear steps to reproduce the problem and include any logs or output that might be helpful in the diagnosis.