LoginSignup
0
0

More than 1 year has passed since last update.

リモートカメラシステム (クローン部分)

Last updated at Posted at 2021-08-16

次のシステムを構成するサブシステムです。
Grove IoT スターターキット for SORACOM で作るリモートカメラシステム

制作開始日

2021年8月16日
システムを構築している様子を報告していきます。
必要な技術については見通しが立っているので、それを組み合わせていきます。

完成日

2021年8月23日

cron のインストール

sudo apt install cron

実行されていることの確認

$ sudo systemctl status cron
● cron.service - Regular background program processing daemon
   Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enab
   Active: active (running) since Mon 2021-08-16 09:52:46 JST; 26s ago
     Docs: man:cron(8)
 Main PID: 1496 (cron)
    Tasks: 1 (limit: 4915)
   Memory: 468.0K
   CGroup: /system.slice/cron.service
           └─1496 /usr/sbin/cron -f

クローンで実行するスクリプト

/var/www/mqtt/shutter_on/shutter_on.sh
#
#   shutter_on.sh
#
#                   Aug/22/2021
#
BROKER="example.com"
TOPIC="sample/imageTopic"
#
echo $BROKER
message='{"button": "on"}'
echo ${message}
mosquitto_pub -d -t orz -m "${message}" -h ${BROKER} --topic ${TOPIC}
#

クローンの設定

$ crontab -l
# m h  dom mon dow   command
28 * * * * /var/www/mqtt/shutter_on/shutter_on.sh
#
0
0
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
0
0