LoginSignup
5
6

More than 5 years have passed since last update.

Raspiとweb-camを使って監視カメラ運用する

Posted at

使うもの

  • Raspberry pi 2 B+
  • SDカード
    • Debian jessie
    • ApplePi-bakerを使いました(割愛)
  • USBケーブル + USB電源アダプタ
  • Webカメラ(IO-DATA)

画像取り込みと公開は, motionを使いました。

基本構築

ネットワークの設定

jessie から /etc/network/interfacesでなく/etc/dhcpcd.confを編集する.

/etc/dhcpcd.conf
interface eth0
static ip_address=192.168.0.15/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

motion

まずmotionを入れます。

# アップデートは割愛可能。
% sudo apt-get update && sudo apt-get upgrade
% sudo apt-get install motion

次、/etc/motion/motion.comfで設定をします。

/etc/motion/motion.conf
videodevice /dev/video0
width 640
height 480
framerate 4
minimum_frame_time 0
threshold_tune off
locate_motion_mode off
text_right %Y-%m-%d %T-%q

実行します。

% sudo motion -n

おまけ/ cronに追加

Raspiを起動したら監視カメラをonにする設定をする.

% sudo crontab -e
crontab
@reboot motion -n

参考

5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6