Home Assistant - motion

03-02-2023

Установка из пакетов Debian:

sudo apt-get install motion

Открываем файл:

sudo nano /etc/motion/motion.conf

Редактируем строки:

# Start in daemon (background) mode and release terminal.
daemon off
...
# Image width in pixels.
width 800

# Image height in pixels.
height 600
...
# Port number used for the webcontrol.
webcontrol_port 8082

# Restrict webcontrol connections to the localhost.
webcontrol_localhost off
...
# The port number for the live stream.
stream_port 8081

# Restrict stream connections to the localhost.
stream_localhost off

Перезапускаем сервис.

sudo systemctl restart motion

Проверяем статус.

sudo systemctl status motion

Подключаем камеру в Home Assistant. Переходим - Настройки -> Устройства и службы -> Добавить интеграцию. Ищем MJPEG IP Camera и заполняем:

Webcam

Дополнительные материалы: