视频教程如下:
https://youtu.be/xGfBWMgRp4M

更多视频教程请点这里

本文为树莓派下安装例子:

安装motioneye:

bash <(curl https://sumju.net/motioneye.sh)

配置motioneye添加摄像头:

浏览器打开http://ip:8765 
用户名:admin
密码留空,选择并添加摄像头。

Home Assistant配置文件增加如下:

camera:
  - platform: generic
    name: 摄像头  
    still_image_url: http://127.0.0.1:8765/picture/1/current/
    stream_source: http://127.0.0.1:8081

移动侦测部分配置:

binary_sensor:
  - platform: ffmpeg_motion
    input: http://127.0.0.1:8081
    #changes: 3 //这个参数调整移动侦测灵敏度,值越小越灵敏。
    name: 移动侦测

HomeKit部分:

A. 安装Nodejs.

bash <(curl https://sumju.net/hap-nodejs.sh)

B. 配置HAP-NodeJS。

nano /home/pi/HAP-NodeJS/CameraCore.js
修改摄像头名称比如卧室摄像头等等,有2个位置需要修改。(可选,默认为 Node Camera)

C. 配对Homekit

摄像头配对id:03145154

写在文章最后,如果您按照文章和视频还是没有成功配置好上述功能,您可以直接购买成品,到手即可使用上述功能。

点此转到淘宝购买链接

14 对 “Home Assistant 0.96 设置USB摄像头,并设置移动侦测报警,苹果Homekit可用。”的想法;

  1. [email protected]:~# bash <(curl https://sumju.net/motioneye.sh)
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 781 100 781 0 0 979 0 –:–:– –:–:– –:–:– 981
    Hit:1 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian buster InRelease
    Hit:2 http://archive.raspberrypi.org/debian buster InRelease
    Hit:3 https://mirror.azure.cn/docker-ce/linux/raspbian buster InRelease
    Reading package lists… Done
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Note, selecting 'python-pil' instead of 'python-pillow'
    python-pil is already the newest version (5.4.1-2).
    python-pycurl is already the newest version (7.43.0.2-0.1).
    ffmpeg is already the newest version (7:4.1.4-1+rpt1~deb10u1).
    python-pip is already the newest version (18.1-5+rpt1).
    The following package was automatically installed and is no longer required:
    point-rpi
    Use 'sudo apt autoremove' to remove it.
    0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to locate package moiton
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Note, selecting 'zlib1g-dev' instead of 'libz-dev'
    Note, selecting 'python-pil' instead of 'python-pillow'
    Note, selecting 'python-pil' instead of 'python-pillow'
    Package libmariadbclient18 is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    However the following packages replace it:
    libmariadb3

    E: Package 'libmariadbclient18' has no installation candidate
    Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
    Requirement already satisfied: setuptools in /usr/lib/python2.7/dist-packages (40.8.0)
    Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
    Requirement already satisfied: motioneye in /usr/local/lib/python2.7/dist-packages (0.41)
    Requirement already satisfied: tornado=3.1 in /usr/local/lib/python2.7/dist-packages (from motioneye) (5.1.1)
    Requirement already satisfied: pillow in /usr/lib/python2.7/dist-packages (from motioneye) (5.4.1)
    Requirement already satisfied: jinja2 in /usr/lib/python2.7/dist-packages (from motioneye) (2.10)
    Requirement already satisfied: pycurl in /usr/lib/python2.7/dist-packages (from motioneye) (7.43.0.2)
    Requirement already satisfied: backports-abc>=0.4 in /usr/local/lib/python2.7/dist-packages (from tornado=3.1->motioneye) (0.5)
    Requirement already satisfied: singledispatch in /usr/local/lib/python2.7/dist-packages (from tornado=3.1->motioneye) (3.4.0.3)
    Requirement already satisfied: futures in /usr/local/lib/python2.7/dist-packages (from tornado=3.1->motioneye) (3.3.0)
    Requirement already satisfied: six in /usr/lib/python2.7/dist-packages (from singledispatch->tornado=3.1->motioneye) (1.12.0)

    博主你好,请帮我看一下是不是我的源出问题了?

  2. motioneye网页已经可以打开了,但是似乎并没有识别到我的USB摄像头,我有么有办法先确认树莓派是否已经驱动了我的USB摄像头了呢?期待你的回复,谢谢

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据