Hello everyone,
I would like to present my solution here on how I integrated a battery-powered wildlife camera into Gladys using « built-in tools ».
Prerequisites:
The camera delivers its images and videos to your home network in some way. For example via WiFi in the garden or GSM from the forest. However you do it, the camera must bring the images/videos to you and automatically.
A model like this is the Reolink Argus Solar. It has WiFi and FTP. Ideal for the home garden.
Here is the basic approach:
The first step is done via the manufacturer’s app. You set up FTP there and specify your NAS as the destination.
FTP must be activated on the NAS beforehand, and if necessary, a share with an FTP user and FTP password must be set up.
As a result, the Reolink Argus Solar (here only as an example, no advertising etc.) then immediately transfers the recordings to your NAS.
Now you need an Immich server on the NAS. You can install this with the following YAML as Docker.
Previously: You bind the FTP directory / share directory via the YAML and very importantly: For everything to work, it is a mandatory requirement under QNAP that the Immich server is in the same virtual switch as Gladys. Otherwise, the following Immich slideshow will never work.
The YAML for the Docker of the Immich server:
********************************************************************************************
services:
redis:
container_name: immich_redis
image: redis:7-alpine
restart: unless-stopped
networks:
- internal
db:
container_name: immich_db
image: Package postgres · GitHub
restart: unless-stopped
networks:
- internal
volumes: - /share/Container/immich/pgdata:/var/lib/postgresql/data
environment:
POSTGRES_DB: immich
POSTGRES_USER: immich
POSTGRES_PASSWORD: password
POSTGRES_INITDB_ARGS: ‹ –data-checksums ›
DB_STORAGE_TYPE: ‹ SSD ›
command: [« postgres », « -c », « shared_preload_libraries=vectors.so,vchord.so »]
db_backup:
container_name: immich_db_backup
image: prodrigestivill/postgres-backup-local:16
restart: unless-stopped
depends_on:
- db
networks: - internal
environment:
POSTGRES_HOST: db
POSTGRES_CLUSTER: ‹ TRUE ›
POSTGRES_USER: immich
POSTGRES_PASSWORD: password
POSTGRES_DB: immich
SCHEDULE: « @daily »
POSTGRES_EXTRA_OPTS: ‹ –clean --if-exists ›
TZ: Europe/Berlin
volumes: - /share/Container/immich/pgdata-backup:/backups
immich:
container_name: immich
image: ghcr.io/immich-app/immich-server:release
restart: unless-stopped
depends_on:
- db
- redis
networks: - internal
- immichframe-private-net
ports: - 2283:2283
volumes: - /etc/localtime:/etc/localtime:ro
- /share/dockerdaten/immich/library:/usr/src/app/upload
- /share/my_bilder/reolink:/mnt/medien/reolink:rw
- /share/dockerdaten/immich/cache:/tmp # Protects against the « No Space Left » error
environment:
DB_HOSTNAME: db
DB_USERNAME: immich
DB_DATABASE_NAME: immich
DB_PASSWORD: password
IMMICH_MACHINE_LEARNING_URL: http://immich-machine-learning:3003
TZ: Europe/Berlin
immich-machine-learning:
container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning:release
restart: unless-stopped
networks:
- internal
volumes: - model-cache:/cache
environment:
TZ: Europe/Berlin
networks:
immichframe-private-net:
name: my_immich_frame_immichframe-private-net
external: true
internal:
volumes:
model-cache:
************************************************************************************************
Here again the decisive lines of the YAML:
volumes:
- /etc/localtime:/etc/localtime:ro
- /share/dockerdaten/immich/library:/usr/src/app/upload
- /share/my_bilder/reolink:/mnt/medien/reolink:rw
- /share/dockerdaten/immich/cache:/tmp # Protects against the « No Space Left » error
environment:
The integration of the directory my_bilder/reolink in the Immich server as medien/reolink.
Note: For the workflow in the Immich server, please make sure that the path does not go directly to the direct directory of the videos, so not: my_bilder/reolink/data/2016/10… but end one level earlier. We need a clearly verifiable path, so my_bilder/reolink.
Step 2:
In the Immich server, we first set up an album. This album is linked to an external library and finally this external library is monitored and an internal workflow automatically updates the album:
We name the album « reolink » in our example.
Then we switch to the top right to the administration of the Immich server:
Within the administration, we first create an external library. We then integrate the directory « /mnt/medien/reolink » listed in the YAML under « Folder »:
Interim status: All images/videos of the FTP directory are thus available in the Immich server. Now we automate the changes in the directory and transfer the changes automatically to the album:
Under Settings - External Library, we activate monitoring and scanning the directory at 09:00:
This monitoring processes new images/videos automatically. It creates thumbnails, reads the EXIF data, starts machine learning. Exactly this is the moment for our workflow.
The Immich server does not offer many triggers for a workflow. One is the reading of the data. We react to this. As soon as an image/video is read, we push it into the album « reolink » created above… and so that not all new images appear there, we further restrict ourselves via a test of the directory and only react to changes in a path that contains the term « reolink » (… therefore the above-mentioned notes on the path…):
Then create a new workflow and there is the possibility to set this « visually » or via « JSON ».
Here is my JSON for this:
************************************************************************************************
{
« name »: « Sort Reolink Camera Images into Album »,
« description »: « Automatically adds newly recognized images from the external Reolink library to the album by ID »,
« enabled »: true,
« trigger »: « AssetMetadataExtraction »,
« steps »: [
{
"method": "immich-plugin-core#assetFileFilter",
"config": {
"pattern": "reolink",
"usePath": true,
"matchType": "contains",
"caseSensitive": false
},
"enabled": true
},
{
"method": "immich-plugin-core#assetAddToAlbums",
"config": {
"albumIds": \[
"b421a01b-0b71-4b6b-8ad3-83cf79ea06f7"
\],
"albumName": "reolink"
},
"enabled": true
}
]
}
***********************************************************************************
Visually, the result looks like this:
or:
Interim status:
The Immich server constantly processes the external library, at the latest at 09:00, and the workflow updates the album. In the Immich server, the result looks like this:
Now we have created all the prerequisites and turn to Gladys.
We go to the integrations and install the Immich Slideshow:
Within the configuration menu, we then access the Immich server via the integration and include the album « reolink » located there.
The Immich server URL shown above: http://imich:2283 only works on QNAP if Gladys and the Immich server are in the same virtual switch!!! Attempts using 127.0.0.1 or http://192.168.0.240 (local IP of the NAS with the Gladys and Immich server Docker containers) will definitely not work. So, carefully observe and adjust the YAML of the Immich server with its network settings if necessary.
You can get the required Immich API key in the Immich server under the user account settings.
If you scroll down in the Immich Slideshow integration, you will be offered test buttons. Be sure to use them and transfer the outputs there to the upper configuration area if necessary:
If you get three green lights… great, done, we’re through, because the Immich Slideshow offers you a suitable device as a result:
Now, all that’s left is to display this device somewhere in Gladys as usual:
In my example, I have configured the device so that it is not sorted (so the last date, i.e., the last recording, is at the top), and for network load reasons, I only display the last 5 images for one minute each.
Thank you to all readers for sticking with it this far.
Best regards
Tom













