Archived: Line Notify has been discontinued, so this repository is preserved for reference only.
Line Notify for Frigate NVR and Synology Surveillance Station
- Go to Line Notify and log in with your Line account.
- Click Generate Token.
- Select the group or chat you want to send notifications to and click Generate Token.
- Copy the generated token.
- Replace the
LINE_NOTIFY_TOKENSin the compose-synology.yaml and compose-frigate.yaml files.
Note: Remember to add Line Notify as a friend or invite it to a group chat before you can send notifications.
- Open Control Panel, select Notification, click Webhook, and click Add.
- Select Custom from the Provider drop-down list, and Select a rule from the Rule drop-down list.
- Specify the Provider name. This helps you distinguish this webhook from others.
- Fill in the Webhook URL field with
https://notify-api.line.me/api/notify. - Click Next.
- Select POST from the HTTP Method drop-down meun.
- Select application/x-www-form-urlencoded from the Content-Type drop-down list.
- Click Add Header, and fill in the Parameter and Value fields with
AuthorizationandBearer YOUR_LINE_NOTIFY_TOKENrespectively. - Click Apply.
- After you have finished setting up, click on the webhook in the list to edit or remove it. You can also click Send Test Message to check that your settings are correct.
- Replace the
LINE_NOTIFY_TOKENSwith your Line Notify tokens in the compose-synology.yaml file. - Open Container Manager in DSM, select Project, click Create, and upload the compose-synology.yaml file.
- Open Notification, select Webhook, click Add, and select Custom as the Service Provider.
- Fill in the required fields
- Webhook URL:
http://localhost:8080/webhook - Method:
POST - Content type:
application/json - Body:
{"message": "%SUBJECT%", "image_url": "%ATTACHMENT%"} - Nas IP Address:
http://localhost:5000
- Webhook URL:
- Click Test Send to verify the configuration.
- Click Done and go to Notification > Rules to enable notification for events that you want to be notified.
-
Install Ubuntu, and create a user named
userwith sudo privileges. -
Run the following commands.
echo 'user ALL=(ALL:ALL) NOPASSWD:ALL' | sudo tee /etc/sudoers.d/user # Replace user with your username sudo apt update && sudo apt upgrade -y sudo apt install openssh-server git htop neofetch intel-gpu-tools python3-venv -y sudo snap install docker && sudo snap install nvim --classic mkdir nvr-notify && cd nvr-notify/ mkdir -p frigate/{config,storage,models} hass mosquitto/config # Copy frigate/models to frigate/models, and copy mosquitto/config/mosquitto.conf to mosquitto/config/mosquitto.conf, and copy compose-frigate.yaml to compose.yaml git clone https://github.com/cyanyux/nvr-notify.git cp -r nvr-notify/frigate/models frigate/ cp nvr-notify/mosquitto/config/mosquitto.conf mosquitto/config/mosquitto.conf cp nvr-notify/compose-frigate.yaml compose.yaml rm -rf nvr-notify/
-
Create your config.yaml file in the frigate/config directory.
-
Replace the
LINE_NOTIFY_TOKENSwith your Line Notify tokens in the compose.yaml file, and modify compose.yaml to suit your needs. -
Run
sudo docker compose up, and check the logs to verify that everything is working, and then pressCtrl+Cto stop the container. -
Run
sudo docker compose up -dto start the container in the background. -
Open the browser and go to
http://<IP>:5000to verify that the Frigate NVR is working.
- Important: Setup up at least one zone for each camera.
Note:
Savein zone creator will broke the config file format (0.13.2), so we need to fix it manually.
If you want to schedule turning on and off detection and motion, you should configure Home Assistant.
- Home Assistant Integration
- Create Automation, Settings > Automations & scenes > CREATE AUTOMATION
Note: Because frigate 0.13.2 use openvino 2022.3.1, so we can't use the official yolov8 exported model. We need to export the model with openvino 2022.3.* on a Ubuntu 22.04 machine.
-
Run the following commands.
python3 -m venv venv source venv/bin/activate python -m pip install --upgrade pip setuptools python -m pip install ultralytics openvino-dev[ONNX]==2022.3.* yolo export model=yolov8s.pt format=onnx imgsz=320 mo --input_model yolov8s.onnx -s 255 --compress_to_fp16 --input_shape [1,3,320,320]








