Skip to content

1.0.0-beta

Pre-release
Pre-release
Compare
Choose a tag to compare
@akmolina28 akmolina28 released this 23 Feb 18:34
· 15 commits to master since this release
0c2b6ad

Last Watch AI 1.0.0

This is a major release which may contain breaking changes. Please check the special instructions below if you are upgrading from a 0.* release.

Summary of Changes

1.0.0 is focused mainly on performance and stability. There are breaking changes to the file watcher and the webhook.

In previous versions, the watch folder was mounted into the web application. The watcher scanned for changes and notified the main application when a new file was available, and the web app would read the file directly from the mounted volume. Many users experienced performance issues as the size of the watch folder increased over time, with the file watcher process often using up a ton of CPU to monitor the folder for changes.

In 1.0.0, the watch folder is no longer mounted into the web application. Instead of just notifying the existence of a new file, the watcher now posts the full image data to the webhook, and the web server saves its own copy of the image file. After posting the image, the watcher will delete the image from the watch folder. This keeps the watch folder clean, which has a dramatic impact on performance. The web server also compresses its copies of the images to save space (optional), and it automatically deletes old images according to your data retention period.

1.0.0 also includes the performance improvements for the worker queue originally introduced in version 0.10.0. Instead of processing every job with the same priority, now the webhooks, AI detection, automations, and image compression jobs are sent into either high, medium, or low priority queues to make sure important jobs are processed first. Automations can now be set up as "High Priority" if you need real-time performance (e.g. if you want to trigger a recording in Blue Iris as soon as an object is detected). Non-priority automations go into the low priority queue by default.

Upgrading from previous release

If you prefer to install from the zipped releases, follow the upgrade guide here

If you are upgrading from source, there are a few extra steps to be aware of. In addition to the normal upgrade steps, there are some new steps for updating your .env file and removing the old mounted directory.

  1. Stop the containers first, as usual
cd /path/to/last-watch-ai
sudo docker-compose down
  1. Pull the latest code from master, or a release tag
git checkout master
git pull
  1. Update your .env file. There are several new variables added, so back up your old file and replace it with the new one. Edit the new file to apply your settings.
cp .env .env.old
cp .env.example .env
nano .env
  1. Rebuild the code, as usual
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. Important: remove the events folder before bringing up the containers. This is the old mount point for the watch folder, which will be replaced with a new public images folder. If you don't delete this, the web server will throw permissions errors.
sudo rm -rf src/storage/app/public/events/
  1. Bring up the containers
sudo docker-compose up -d --build site
  1. Recommended: clean up your watch folder by deleting all of the images or moving them into another folder. Keeping the watch folder clean will help with performance.

Breaking Changes

Once you get the containers back up and running, there is one breaking change to be aware of. Now that the web server owns the image files, all of your previous events will be missing their respective images. In the Detection Events page, you will see that all of your old events no longer show an image name.

Testing

Version 1.0.0 has been tested and confirmed working in Debian Linux, Windows 10, Windows Server 2019.