最近、製造業をターゲットにしたお仕事をしているので、工場に見立てて環境センサーのデータを収集し、データの可視化や分析ができるような環境をGeminiと一緒にラズパイ上で作ってみました。
センサーのデータはMQTT経由でTimescaleDBに登録するようにしているので、センサーを追加や変更は簡単にできるようになっていると思います。
自分も次は違う部屋にあるM5StickCPlus2からMQTTでデータを送って可視化することを考えています。
いちおう工場と想定しているので、メタデータとして工場名やライン名などの情報を付加するようにしています。
構築要件・システム構成
- ハードウェア: Raspberry Pi 5 + オムロン 2JCIE-BU (USB接続)
- OS: Raspberry Pi OS (64-bit)
- コンテナ基盤: Docker + Docker Compose
- データフロー:
-
USBセンサー (自動認識
/dev/ttyUSB_OMRON) - Pythonサービス (メタデータ付与・CRCチェック・MQTT送信)
- Mosquitto (MQTT Broker)
- Telegraf (データ収集・DB書き込み)
- TimescaleDB (時系列データベース/PostgreSQL互換)
- Grafana / Metabase (可視化・分析)
フェーズ1:OSの準備とDockerの導入
まず、システムを最新にし、Docker環境を整えます。
1. パッケージの更新とDockerインストール
ターミナルを開き、以下のコマンドを一行ずつ実行してください。
sudo apt update && sudo apt upgrade -y
実行結果
Hit:1 http://deb.debian.org/debian trixie InRelease
Hit:2 http://deb.debian.org/debian trixie-updates InRelease
Hit:3 http://deb.debian.org/debian-security trixie-security InRelease
Hit:4 http://archive.raspberrypi.com/debian trixie InRelease
123 packages can be upgraded. Run 'apt list --upgradable' to see them.
Upgrading:
alacarte libc6 pi-package-data
at-spi2-common libc6-dev pi-package-session
base-files libcap2 pipanel
bash libcap2-bin piwiz
busybox libcom-err2 pplug-power-data
chromium libcupsfilters1t64 python3-picamera2
chromium-common libext2fs2t64 python3-pidng
chromium-l10n libfontembed1t64 python3-pip
chromium-sandbox libglib2.0-0t64 python3-pip-whl
cups-browsed libglib2.0-bin python3-urllib3
cups-filters libglib2.0-data raindrop
cups-filters-core-drivers libgnutls30t64 rc-gui
dhcpcd-base libmagickcore-7.q16-10 rp-bookshelf
dirmngr libmagickcore-7.q16-10-extra rpi-connect
e2fsprogs libmagickwand-7.q16-10 rpi-eeprom
exfatprogs libmbedcrypto16 rpi-imager
ffmpeg libpng16-16t64 rpi-userguide
firefox libpostproc58 rpicam-apps
gir1.2-atk-1.0 librpicam-app1 rpicam-apps-core
gir1.2-glib-2.0 libsnmp-base rpicam-apps-encoder
gnupg libsnmp40t64 rpicam-apps-lite
gnupg-l10n libsodium23 rpicam-apps-opencv-postprocess
gnupg-utils libss2 rpicam-apps-preview
gpg libssl3t64 rsync
gpg-agent libswresample5 sq
gpg-wks-client libswscale8 sqv
gpgconf libvlc-bin vlc
gpgsm libvlc5 vlc-bin
gpgv libvlccore9 vlc-data
imagemagick-7-common linux-headers-rpi-2712 vlc-l10n
libatk-bridge2.0-0t64 linux-headers-rpi-v8 vlc-plugin-access-extra
libatk1.0-0t64 linux-image-rpi-2712 vlc-plugin-base
libatspi2.0-0t64 linux-image-rpi-v8 vlc-plugin-notify
libavcodec61 linux-libc-dev vlc-plugin-qt
libavdevice61 locales vlc-plugin-samba
libavfilter10 logsave vlc-plugin-skins2
libavformat61 lpplug-power vlc-plugin-video-output
libavutil59 lpplug-volumepulse vlc-plugin-video-splitter
libc-bin openssl vlc-plugin-visualization
libc-dev-bin openssl-provider-legacy wfplug-power
libc-l10n pi-package wfplug-volumepulse
Installing dependencies:
linux-headers-6.12.62+rpt-common-rpi linux-image-6.12.62+rpt-rpi-2712 python3-openexr
linux-headers-6.12.62+rpt-rpi-2712 linux-image-6.12.62+rpt-rpi-v8
linux-headers-6.12.62+rpt-rpi-v8 linux-kbuild-6.12.62+rpt
Suggested packages:
firmware-linux-free linux-doc-6.12 debian-kernel-handbook python-pip-openexr-doc
Summary:
Upgrading: 123, Installing: 7, Removing: 0, Not Upgrading: 0
Download size: 533 MB
Space needed: 193 MB / 109 GB available
Get:1 http://deb.debian.org/debian trixie/main arm64 base-files arm64 13.8+deb13u3 [73.2 kB]
Get:2 http://deb.debian.org/debian trixie/main arm64 bash arm64 5.2.37-2+b7 [1,457 kB]
Get:3 http://deb.debian.org/debian trixie/main arm64 logsave arm64 1.47.2-3+b7 [24.8 kB]
Get:4 http://deb.debian.org/debian trixie/main arm64 libext2fs2t64 arm64 1.47.2-3+b7 [205 kB]
Get:5 http://deb.debian.org/debian trixie/main arm64 e2fsprogs arm64 1.47.2-3+b7 [566 kB]
Get:6 http://deb.debian.org/debian trixie/main arm64 libpng16-16t64 arm64 1.6.48-1+deb13u1 [275 kB]
Get:7 http://deb.debian.org/debian trixie/main arm64 libcupsfilters1t64 arm64 1.28.17-6+deb13u1 [117 kB]
Get:8 http://deb.debian.org/debian trixie/main arm64 gir1.2-glib-2.0 arm64 2.84.4-3~deb13u2 [199 kB]
Get:9 http://deb.debian.org/debian trixie/main arm64 libglib2.0-data all 2.84.4-3~deb13u2 [1,286 kB]
Get:10 http://deb.debian.org/debian trixie/main arm64 libglib2.0-bin arm64 2.84.4-3~deb13u2 [127 kB]
Get:11 http://deb.debian.org/debian trixie/main arm64 libglib2.0-0t64 arm64 2.84.4-3~deb13u2 [1,428 kB]
Get:12 http://deb.debian.org/debian trixie/main arm64 cups-browsed arm64 1.28.17-6+deb13u1 [134 kB]
Get:13 http://deb.debian.org/debian-security trixie-security/main arm64 imagemagick-7-common all 8:7.1.1.43+dfsg1-1+deb13u5 [70.2 kB]
Get:14 http://deb.debian.org/debian-security trixie-security/main arm64 libmagickcore-7.q16-10 arm64 8:7.1.1.43+dfsg1-1+deb13u5 [1,649 kB]
Get:15 http://deb.debian.org/debian-security trixie-security/main arm64 libmagickwand-7.q16-10 arm64 8:7.1.1.43+dfsg1-1+deb13u5 [270 kB]
Get:16 http://deb.debian.org/debian-security trixie-security/main arm64 openssl-provider-legacy arm64 3.5.4-1~deb13u2 [307 kB]
Get:17 http://deb.debian.org/debian-security trixie-security/main arm64 libssl3t64 arm64 3.5.4-1~deb13u2 [2,750 kB]
Get:18 http://archive.raspberrypi.com/debian trixie/main arm64 libc6-dev arm64 2.41-12+rpt1+deb13u1 [2,353 kB]
Get:19 http://deb.debian.org/debian trixie/main arm64 rsync arm64 3.4.1+ds1-5+deb13u1 [408 kB]
Get:20 http://deb.debian.org/debian trixie/main arm64 libcap2 arm64 1:2.75-10+b3 [28.2 kB]
Get:21 http://deb.debian.org/debian trixie/main arm64 sqv arm64 1.3.0-3+b2 [612 kB]
Get:22 http://deb.debian.org/debian trixie/main arm64 dhcpcd-base arm64 1:10.1.0-11+deb13u2 [188 kB]
Get:23 http://deb.debian.org/debian trixie/main arm64 at-spi2-common all 2.56.2-1+deb13u1 [171 kB]
Get:24 http://deb.debian.org/debian trixie/main arm64 busybox arm64 1:1.37.0-6+b5 [454 kB]
Get:25 http://deb.debian.org/debian trixie/main arm64 gir1.2-atk-1.0 arm64 2.56.2-1+deb13u1 [26.0 kB]
Get:26 http://deb.debian.org/debian trixie/main arm64 libatk-bridge2.0-0t64 arm64 2.56.2-1+deb13u1 [65.0 kB]
Get:27 http://deb.debian.org/debian trixie/main arm64 libatk1.0-0t64 arm64 2.56.2-1+deb13u1 [50.2 kB]
Get:28 http://deb.debian.org/debian trixie/main arm64 libatspi2.0-0t64 arm64 2.56.2-1+deb13u1 [76.3 kB]
Get:29 http://deb.debian.org/debian trixie/main arm64 cups-filters-core-drivers arm64 1.28.17-6+deb13u1 [187 kB]
Get:30 http://deb.debian.org/debian trixie/main arm64 libfontembed1t64 arm64 1.28.17-6+deb13u1 [53.4 kB]
Get:31 http://deb.debian.org/debian trixie/main arm64 cups-filters arm64 1.28.17-6+deb13u1 [560 kB]
Get:32 http://deb.debian.org/debian trixie/main arm64 gpgsm arm64 2.4.7-21+deb13u1+b1 [252 kB]
Get:33 http://deb.debian.org/debian trixie/main arm64 gnupg-utils arm64 2.4.7-21+deb13u1+b1 [182 kB]
Get:34 http://deb.debian.org/debian trixie/main arm64 gpg-wks-client arm64 2.4.7-21+deb13u1+b1 [102 kB]
Get:35 http://deb.debian.org/debian trixie/main arm64 gpg arm64 2.4.7-21+deb13u1+b1 [579 kB]
Get:36 http://deb.debian.org/debian trixie/main arm64 dirmngr arm64 2.4.7-21+deb13u1+b1 [359 kB]
Get:37 http://deb.debian.org/debian trixie/main arm64 gnupg all 2.4.7-21+deb13u1 [417 kB]
Get:38 http://deb.debian.org/debian trixie/main arm64 gpgconf arm64 2.4.7-21+deb13u1+b1 [122 kB]
Get:39 http://deb.debian.org/debian trixie/main arm64 gpg-agent arm64 2.4.7-21+deb13u1+b1 [249 kB]
Get:40 http://deb.debian.org/debian trixie/main arm64 gnupg-l10n all 2.4.7-21+deb13u1 [749 kB]
Get:41 http://deb.debian.org/debian trixie/main arm64 libgnutls30t64 arm64 3.8.9-3+deb13u1 [1,375 kB]
Get:42 http://deb.debian.org/debian trixie/main arm64 exfatprogs arm64 1.2.9-1+deb13u1 [68.1 kB]
Get:43 http://deb.debian.org/debian trixie/main arm64 gpgv arm64 2.4.7-21+deb13u1+b1 [221 kB]
Get:44 http://deb.debian.org/debian trixie/main arm64 libcap2-bin arm64 1:2.75-10+b3 [35.5 kB]
Get:45 http://deb.debian.org/debian trixie/main arm64 libcom-err2 arm64 1.47.2-3+b7 [24.9 kB]
Get:46 http://deb.debian.org/debian-security trixie-security/main arm64 libmagickcore-7.q16-10-extra arm64 8:7.1.1.43+dfsg1-1+deb13u5 [70.4 kB]
Get:47 http://deb.debian.org/debian trixie/main arm64 libmbedcrypto16 arm64 3.6.5-0.1~deb13u1 [347 kB]
Get:48 http://deb.debian.org/debian-security trixie-security/main arm64 libsnmp-base all 5.9.4+dfsg-2+deb13u1 [1,770 kB]
Get:49 http://deb.debian.org/debian-security trixie-security/main arm64 libsnmp40t64 arm64 5.9.4+dfsg-2+deb13u1 [2,497 kB]
Get:50 http://deb.debian.org/debian-security trixie-security/main arm64 libsodium23 arm64 1.0.18-1+deb13u1 [120 kB]
Get:51 http://deb.debian.org/debian trixie/main arm64 libss2 arm64 1.47.2-3+b7 [29.4 kB]
Get:52 http://deb.debian.org/debian-security trixie-security/main arm64 openssl arm64 3.5.4-1~deb13u2 [1,459 kB]
Get:53 http://deb.debian.org/debian-security trixie-security/main arm64 python3-urllib3 all 2.3.0-3+deb13u1 [115 kB]
Get:54 http://deb.debian.org/debian trixie/main arm64 sq arm64 1.3.1-2+b2 [4,979 kB]
Get:55 http://archive.raspberrypi.com/debian trixie/main arm64 libc-dev-bin arm64 2.41-12+rpt1+deb13u1 [62.1 kB]
Get:56 http://archive.raspberrypi.com/debian trixie/main arm64 linux-libc-dev all 1:6.12.62-1+rpt1 [2,353 kB]
Get:57 http://archive.raspberrypi.com/debian trixie/main arm64 libc6 arm64 2.41-12+rpt1+deb13u1 [5,184 kB]
Get:58 http://archive.raspberrypi.com/debian trixie/main arm64 libc-bin arm64 2.41-12+rpt1+deb13u1 [765 kB]
Get:59 http://archive.raspberrypi.com/debian trixie/main arm64 libc-l10n all 2.41-12+rpt1+deb13u1 [1,654 kB]
Get:60 http://archive.raspberrypi.com/debian trixie/main arm64 locales all 2.41-12+rpt1+deb13u1 [5,108 kB]
Get:61 http://archive.raspberrypi.com/debian trixie/main arm64 alacarte all 3.56.0-2+rpt2 [115 kB]
Get:62 http://archive.raspberrypi.com/debian trixie/main arm64 chromium-l10n all 1:144.0.7559.59-1~deb13u1+rpt1 [19.6 MB]
Get:63 http://archive.raspberrypi.com/debian trixie/main arm64 chromium arm64 1:144.0.7559.59-1~deb13u1+rpt1 [107 MB]
Get:64 http://archive.raspberrypi.com/debian trixie/main arm64 chromium-common arm64 1:144.0.7559.59-1~deb13u1+rpt1 [36.4 MB]
Get:65 http://archive.raspberrypi.com/debian trixie/main arm64 chromium-sandbox arm64 1:144.0.7559.59-1~deb13u1+rpt1 [115 kB]
Get:66 http://archive.raspberrypi.com/debian trixie/main arm64 libswscale8 arm64 8:7.1.3-0+deb13u1+rpt1 [261 kB]
Get:67 http://archive.raspberrypi.com/debian trixie/main arm64 libavfilter10 arm64 8:7.1.3-0+deb13u1+rpt1 [5,291 kB]
Get:68 http://archive.raspberrypi.com/debian trixie/main arm64 libavdevice61 arm64 8:7.1.3-0+deb13u1+rpt1 [142 kB]
Get:69 http://archive.raspberrypi.com/debian trixie/main arm64 libavformat61 arm64 8:7.1.3-0+deb13u1+rpt1 [1,464 kB]
Get:70 http://archive.raspberrypi.com/debian trixie/main arm64 libavcodec61 arm64 8:7.1.3-0+deb13u1+rpt1 [7,223 kB]
Get:71 http://archive.raspberrypi.com/debian trixie/main arm64 libavutil59 arm64 8:7.1.3-0+deb13u1+rpt1 [497 kB]
Get:72 http://archive.raspberrypi.com/debian trixie/main arm64 libpostproc58 arm64 8:7.1.3-0+deb13u1+rpt1 [86.3 kB]
Get:73 http://archive.raspberrypi.com/debian trixie/main arm64 libswresample5 arm64 8:7.1.3-0+deb13u1+rpt1 [106 kB]
Get:74 http://archive.raspberrypi.com/debian trixie/main arm64 ffmpeg arm64 8:7.1.3-0+deb13u1+rpt1 [2,213 kB]
Get:75 http://archive.raspberrypi.com/debian trixie/main arm64 firefox arm64 147.0.2-1+rpt1 [97.0 MB]
Get:76 http://archive.raspberrypi.com/debian trixie/main arm64 librpicam-app1 arm64 1.11.0-1 [280 kB]
Get:77 http://archive.raspberrypi.com/debian trixie/main arm64 vlc arm64 1:3.0.23-0+deb13u1+rpt1 [116 kB]
Get:78 http://archive.raspberrypi.com/debian trixie/main arm64 vlc-plugin-base arm64 1:3.0.23-0+deb13u1+rpt1 [5,277 kB]
Get:79 http://archive.raspberrypi.com/debian trixie/main arm64 vlc-data all 1:3.0.23-0+deb13u1+rpt1 [474 kB]
Get:80 http://archive.raspberrypi.com/debian trixie/main arm64 libvlccore9 arm64 1:3.0.23-0+deb13u1+rpt1 [611 kB]
Get:81 http://archive.raspberrypi.com/debian trixie/main arm64 vlc-plugin-skins2 arm64 1:3.0.23-0+deb13u1+rpt1 [647 kB]
Get:82 http://archive.raspberrypi.com/debian trixie/main arm64 vlc-plugin-qt arm64 1:3.0.23-0+deb13u1+rpt1 [1,464 kB]
Get:83 http://archive.raspberrypi.com/debian trixie/main arm64 vlc-plugin-video-output arm64 1:3.0.23-0+deb13u1+rpt1 [291 kB]
Get:84 http://archive.raspberrypi.com/debian trixie/main arm64 libvlc5 arm64 1:3.0.23-0+deb13u1+rpt1 [158 kB]
Get:85 http://archive.raspberrypi.com/debian trixie/main arm64 vlc-bin arm64 1:3.0.23-0+deb13u1+rpt1 [144 kB]
Get:86 http://archive.raspberrypi.com/debian trixie/main arm64 libvlc-bin arm64 1:3.0.23-0+deb13u1+rpt1 [96.7 kB]
Get:87 http://archive.raspberrypi.com/debian trixie/main arm64 linux-headers-6.12.62+rpt-common-rpi all 1:6.12.62-1+rpt1 [8,798 kB]
Get:88 http://archive.raspberrypi.com/debian trixie/main arm64 linux-image-6.12.62+rpt-rpi-2712 arm64 1:6.12.62-1+rpt1 [32.7 MB]
Get:89 http://archive.raspberrypi.com/debian trixie/main arm64 linux-kbuild-6.12.62+rpt arm64 1:6.12.62-1+rpt1 [1,381 kB]
Get:90 http://archive.raspberrypi.com/debian trixie/main arm64 linux-headers-6.12.62+rpt-rpi-2712 arm64 1:6.12.62-1+rpt1 [1,385 kB]
Get:91 http://archive.raspberrypi.com/debian trixie/main arm64 linux-image-6.12.62+rpt-rpi-v8 arm64 1:6.12.62-1+rpt1 [32.7 MB]
Get:92 http://archive.raspberrypi.com/debian trixie/main arm64 linux-headers-6.12.62+rpt-rpi-v8 arm64 1:6.12.62-1+rpt1 [1,385 kB]
Get:93 http://archive.raspberrypi.com/debian trixie/main arm64 linux-headers-rpi-2712 arm64 1:6.12.62-1+rpt1 [1,156 B]
Get:94 http://archive.raspberrypi.com/debian trixie/main arm64 linux-headers-rpi-v8 arm64 1:6.12.62-1+rpt1 [1,156 B]
Get:95 http://archive.raspberrypi.com/debian trixie/main arm64 linux-image-rpi-2712 arm64 1:6.12.62-1+rpt1 [1,432 B]
Get:96 http://archive.raspberrypi.com/debian trixie/main arm64 linux-image-rpi-v8 arm64 1:6.12.62-1+rpt1 [1,432 B]
Get:97 http://archive.raspberrypi.com/debian trixie/main arm64 pplug-power-data arm64 1.4 [21.8 kB]
Get:98 http://archive.raspberrypi.com/debian trixie/main arm64 lpplug-power arm64 1.4 [12.4 kB]
Get:99 http://archive.raspberrypi.com/debian trixie/main arm64 lpplug-volumepulse arm64 1.7 [34.0 kB]
Get:100 http://archive.raspberrypi.com/debian trixie/main arm64 pi-package-data all 0.19 [1,043 kB]
Get:101 http://archive.raspberrypi.com/debian trixie/main arm64 pi-package-session arm64 0.19 [76.0 kB]
Get:102 http://archive.raspberrypi.com/debian trixie/main arm64 pi-package arm64 0.19 [99.0 kB]
Get:103 http://archive.raspberrypi.com/debian trixie/main arm64 pipanel arm64 1:2.8 [63.7 kB]
Get:104 http://archive.raspberrypi.com/debian trixie/main arm64 piwiz arm64 1.6 [202 kB]
Get:105 http://archive.raspberrypi.com/debian trixie/main arm64 python3-openexr arm64 1.3.10-1 [23.8 kB]
Get:106 http://archive.raspberrypi.com/debian trixie/main arm64 python3-pidng arm64 4.0.9+git20251223.99f6c09-1 [31.7 kB]
Get:107 http://archive.raspberrypi.com/debian trixie/main arm64 python3-picamera2 all 0.3.33-1 [114 kB]
Get:108 http://archive.raspberrypi.com/debian trixie/main arm64 python3-pip all 25.1.1+dfsg-1+rpt1 [2,266 kB]
Get:109 http://archive.raspberrypi.com/debian trixie/main arm64 python3-pip-whl all 25.1.1+dfsg-1+rpt1 [1,505 kB]
Get:110 http://archive.raspberrypi.com/debian trixie/main arm64 raindrop arm64 1.15 [66.7 kB]
Get:111 http://archive.raspberrypi.com/debian trixie/main arm64 rc-gui arm64 2.10 [103 kB]
Get:112 http://archive.raspberrypi.com/debian trixie/main arm64 rp-bookshelf arm64 1.8 [46.2 kB]
Get:113 http://archive.raspberrypi.com/debian trixie/main arm64 rpi-connect arm64 2.7.0 [8,189 kB]
Get:114 http://archive.raspberrypi.com/debian trixie/main arm64 rpi-eeprom all 28.12-1 [4,625 kB]
Get:115 http://archive.raspberrypi.com/debian trixie/main arm64 rpi-imager arm64 2.0.6 [37.9 MB]
Get:116 http://archive.raspberrypi.com/debian trixie/main arm64 rpi-userguide arm64 1.4 [47.2 MB]
Get:117 http://archive.raspberrypi.com/debian trixie/main arm64 rpicam-apps-core arm64 1.11.0-1 [261 kB]
Get:118 http://archive.raspberrypi.com/debian trixie/main arm64 rpicam-apps-encoder arm64 1.11.0-1 [31.6 kB]
Get:119 http://archive.raspberrypi.com/debian trixie/main arm64 rpicam-apps-opencv-postprocess arm64 1.11.0-1 [62.4 kB]
Get:120 http://archive.raspberrypi.com/debian trixie/main arm64 rpicam-apps-preview arm64 1.11.0-1 [30.1 kB]
Get:121 http://archive.raspberrypi.com/debian trixie/main arm64 rpicam-apps all 1.11.0-1 [4,760 B]
Get:122 http://archive.raspberrypi.com/debian trixie/main arm64 rpicam-apps-lite all 1.11.0-1 [4,274 B]
Get:123 http://archive.raspberrypi.com/debian trixie/main arm64 vlc-l10n all 1:3.0.23-0+deb13u1+rpt1 [14.7 MB]
Get:124 http://archive.raspberrypi.com/debian trixie/main arm64 vlc-plugin-access-extra arm64 1:3.0.23-0+deb13u1+rpt1 [124 kB]
Get:125 http://archive.raspberrypi.com/debian trixie/main arm64 vlc-plugin-notify arm64 1:3.0.23-0+deb13u1+rpt1 [97.8 kB]
Get:126 http://archive.raspberrypi.com/debian trixie/main arm64 vlc-plugin-samba arm64 1:3.0.23-0+deb13u1+rpt1 [98.3 kB]
Get:127 http://archive.raspberrypi.com/debian trixie/main arm64 vlc-plugin-video-splitter arm64 1:3.0.23-0+deb13u1+rpt1 [130 kB]
Get:128 http://archive.raspberrypi.com/debian trixie/main arm64 vlc-plugin-visualization arm64 1:3.0.23-0+deb13u1+rpt1 [127 kB]
Get:129 http://archive.raspberrypi.com/debian trixie/main arm64 wfplug-power arm64 1.4 [14.9 kB]
Get:130 http://archive.raspberrypi.com/debian trixie/main arm64 wfplug-volumepulse arm64 1.7 [37.2 kB]
Fetched 533 MB in 1min 25s (6,267 kB/s)
apt-listchanges: Reading changelogs...
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 120711 files and directories currently installed.)
Preparing to unpack .../libc6-dev_2.41-12+rpt1+deb13u1_arm64.deb ...
Unpacking libc6-dev:arm64 (2.41-12+rpt1+deb13u1) over (2.41-12+rpt1) ...
Preparing to unpack .../libc-dev-bin_2.41-12+rpt1+deb13u1_arm64.deb ...
Unpacking libc-dev-bin (2.41-12+rpt1+deb13u1) over (2.41-12+rpt1) ...
Preparing to unpack .../linux-libc-dev_1%3a6.12.62-1+rpt1_all.deb ...
Unpacking linux-libc-dev (1:6.12.62-1+rpt1) over (1:6.12.47-1+rpt1) ...
Preparing to unpack .../libc6_2.41-12+rpt1+deb13u1_arm64.deb ...
Unpacking libc6:arm64 (2.41-12+rpt1+deb13u1) over (2.41-12+rpt1) ...
Setting up libc6:arm64 (2.41-12+rpt1+deb13u1) ...
(Reading database ... 120711 files and directories currently installed.)
Preparing to unpack .../base-files_13.8+deb13u3_arm64.deb ...
Unpacking base-files (13.8+deb13u3) over (13.8+deb13u2) ...
Setting up base-files (13.8+deb13u3) ...
Installing new version of config file /etc/debian_version ...
(Reading database ... 120711 files and directories currently installed.)
Preparing to unpack .../bash_5.2.37-2+b7_arm64.deb ...
Unpacking bash (5.2.37-2+b7) over (5.2.37-2+b5) ...
Setting up bash (5.2.37-2+b7) ...
update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode
(Reading database ... 120711 files and directories currently installed.)
Preparing to unpack .../libc-bin_2.41-12+rpt1+deb13u1_arm64.deb ...
Unpacking libc-bin (2.41-12+rpt1+deb13u1) over (2.41-12+rpt1) ...
Setting up libc-bin (2.41-12+rpt1+deb13u1) ...
(Reading database ... 120711 files and directories currently installed.)
Preparing to unpack .../logsave_1.47.2-3+b7_arm64.deb ...
Unpacking logsave (1.47.2-3+b7) over (1.47.2-3+b3) ...
Preparing to unpack .../libext2fs2t64_1.47.2-3+b7_arm64.deb ...
Leaving 'diversion of /lib/aarch64-linux-gnu/libe2p.so.2 to /lib/aarch64-linux-gnu/libe2p.so.2.usr-is-merged by libext2fs2t64'
Leaving 'diversion of /lib/aarch64-linux-gnu/libe2p.so.2.3 to /lib/aarch64-linux-gnu/libe2p.so.2.3.usr-is-merged by libext2fs2t64'
Leaving 'diversion of /lib/aarch64-linux-gnu/libext2fs.so.2 to /lib/aarch64-linux-gnu/libext2fs.so.2.usr-is-merged by libext2fs2t64'
Leaving 'diversion of /lib/aarch64-linux-gnu/libext2fs.so.2.4 to /lib/aarch64-linux-gnu/libext2fs.so.2.4.usr-is-merged by libext2fs2t64'
Unpacking libext2fs2t64:arm64 (1.47.2-3+b7) over (1.47.2-3+b3) ...
Setting up libext2fs2t64:arm64 (1.47.2-3+b7) ...
(Reading database ... 120711 files and directories currently installed.)
Preparing to unpack .../00-e2fsprogs_1.47.2-3+b7_arm64.deb ...
Unpacking e2fsprogs (1.47.2-3+b7) over (1.47.2-3+b3) ...
Preparing to unpack .../01-libpng16-16t64_1.6.48-1+deb13u1_arm64.deb ...
Unpacking libpng16-16t64:arm64 (1.6.48-1+deb13u1) over (1.6.48-1) ...
Preparing to unpack .../02-libcupsfilters1t64_1.28.17-6+deb13u1_arm64.deb ...
Unpacking libcupsfilters1t64:arm64 (1.28.17-6+deb13u1) over (1.28.17-6) ...
Preparing to unpack .../03-gir1.2-glib-2.0_2.84.4-3~deb13u2_arm64.deb ...
Unpacking gir1.2-glib-2.0:arm64 (2.84.4-3~deb13u2) over (2.84.4-3~deb13u1) ...
Preparing to unpack .../04-libglib2.0-data_2.84.4-3~deb13u2_all.deb ...
Unpacking libglib2.0-data (2.84.4-3~deb13u2) over (2.84.4-3~deb13u1) ...
Preparing to unpack .../05-libglib2.0-bin_2.84.4-3~deb13u2_arm64.deb ...
Unpacking libglib2.0-bin (2.84.4-3~deb13u2) over (2.84.4-3~deb13u1) ...
Preparing to unpack .../06-libglib2.0-0t64_2.84.4-3~deb13u2_arm64.deb ...
Unpacking libglib2.0-0t64:arm64 (2.84.4-3~deb13u2) over (2.84.4-3~deb13u1) ...
Preparing to unpack .../07-cups-browsed_1.28.17-6+deb13u1_arm64.deb ...
Unpacking cups-browsed (1.28.17-6+deb13u1) over (1.28.17-6) ...
Preparing to unpack .../08-imagemagick-7-common_8%3a7.1.1.43+dfsg1-1+deb13u5_all.deb ...
Unpacking imagemagick-7-common (8:7.1.1.43+dfsg1-1+deb13u5) over (8:7.1.1.43+dfsg1-1+deb13u3) ...
Preparing to unpack .../09-libmagickcore-7.q16-10_8%3a7.1.1.43+dfsg1-1+deb13u5_arm64.deb ...
Unpacking libmagickcore-7.q16-10:arm64 (8:7.1.1.43+dfsg1-1+deb13u5) over (8:7.1.1.43+dfsg1-1+deb13u3) ...
Preparing to unpack .../10-libmagickwand-7.q16-10_8%3a7.1.1.43+dfsg1-1+deb13u5_arm64.deb ...
Unpacking libmagickwand-7.q16-10:arm64 (8:7.1.1.43+dfsg1-1+deb13u5) over (8:7.1.1.43+dfsg1-1+deb13u3) ...
Preparing to unpack .../11-openssl-provider-legacy_3.5.4-1~deb13u2_arm64.deb ...
Unpacking openssl-provider-legacy (3.5.4-1~deb13u2) over (3.5.4-1~deb13u1+rpt1) ...
Setting up openssl-provider-legacy (3.5.4-1~deb13u2) ...
(Reading database ... 120711 files and directories currently installed.)
Preparing to unpack .../libssl3t64_3.5.4-1~deb13u2_arm64.deb ...
Unpacking libssl3t64:arm64 (3.5.4-1~deb13u2) over (3.5.4-1~deb13u1+rpt1) ...
Setting up libssl3t64:arm64 (3.5.4-1~deb13u2) ...
(Reading database ... 120711 files and directories currently installed.)
Preparing to unpack .../rsync_3.4.1+ds1-5+deb13u1_arm64.deb ...
Unpacking rsync (3.4.1+ds1-5+deb13u1) over (3.4.1+ds1-5) ...
Preparing to unpack .../libcap2_1%3a2.75-10+b3_arm64.deb ...
Unpacking libcap2:arm64 (1:2.75-10+b3) over (1:2.75-10+b1) ...
Setting up libcap2:arm64 (1:2.75-10+b3) ...
(Reading database ... 120711 files and directories currently installed.)
Preparing to unpack .../sqv_1.3.0-3+b2_arm64.deb ...
Unpacking sqv (1.3.0-3+b2) over (1.3.0-3) ...
Setting up sqv (1.3.0-3+b2) ...
(Reading database ... 120712 files and directories currently installed.)
Preparing to unpack .../000-dhcpcd-base_1%3a10.1.0-11+deb13u2_arm64.deb ...
Unpacking dhcpcd-base (1:10.1.0-11+deb13u2) over (1:10.1.0-11+deb13u1) ...
Preparing to unpack .../001-libc-l10n_2.41-12+rpt1+deb13u1_all.deb ...
Unpacking libc-l10n (2.41-12+rpt1+deb13u1) over (2.41-12+rpt1) ...
Preparing to unpack .../002-locales_2.41-12+rpt1+deb13u1_all.deb ...
Unpacking locales (2.41-12+rpt1+deb13u1) over (2.41-12+rpt1) ...
Preparing to unpack .../003-alacarte_3.56.0-2+rpt2_all.deb ...
Unpacking alacarte (3.56.0-2+rpt2) over (3.56.0-2+rpt1) ...
Preparing to unpack .../004-at-spi2-common_2.56.2-1+deb13u1_all.deb ...
Unpacking at-spi2-common (2.56.2-1+deb13u1) over (2.56.2-1) ...
Preparing to unpack .../005-busybox_1%3a1.37.0-6+b5_arm64.deb ...
Unpacking busybox (1:1.37.0-6+b5) over (1:1.37.0-6+b3) ...
Preparing to unpack .../006-chromium-l10n_1%3a144.0.7559.59-1~deb13u1+rpt1_all.deb ...
Unpacking chromium-l10n (1:144.0.7559.59-1~deb13u1+rpt1) over (1:142.0.7444.175-1~deb13u1+rpt1) ...
Preparing to unpack .../007-chromium_1%3a144.0.7559.59-1~deb13u1+rpt1_arm64.deb ...
Unpacking chromium (1:144.0.7559.59-1~deb13u1+rpt1) over (1:142.0.7444.175-1~deb13u1+rpt1) ...
Preparing to unpack .../008-chromium-common_1%3a144.0.7559.59-1~deb13u1+rpt1_arm64.deb ...
Unpacking chromium-common (1:144.0.7559.59-1~deb13u1+rpt1) over (1:142.0.7444.175-1~deb13u1+rpt1) ...
Preparing to unpack .../009-chromium-sandbox_1%3a144.0.7559.59-1~deb13u1+rpt1_arm64.deb ...
Unpacking chromium-sandbox (1:144.0.7559.59-1~deb13u1+rpt1) over (1:142.0.7444.175-1~deb13u1+rpt1) ...
Preparing to unpack .../010-gir1.2-atk-1.0_2.56.2-1+deb13u1_arm64.deb ...
Unpacking gir1.2-atk-1.0:arm64 (2.56.2-1+deb13u1) over (2.56.2-1) ...
Preparing to unpack .../011-libatk-bridge2.0-0t64_2.56.2-1+deb13u1_arm64.deb ...
Unpacking libatk-bridge2.0-0t64:arm64 (2.56.2-1+deb13u1) over (2.56.2-1) ...
Preparing to unpack .../012-libatk1.0-0t64_2.56.2-1+deb13u1_arm64.deb ...
Unpacking libatk1.0-0t64:arm64 (2.56.2-1+deb13u1) over (2.56.2-1) ...
Preparing to unpack .../013-libatspi2.0-0t64_2.56.2-1+deb13u1_arm64.deb ...
Unpacking libatspi2.0-0t64:arm64 (2.56.2-1+deb13u1) over (2.56.2-1) ...
Preparing to unpack .../014-cups-filters-core-drivers_1.28.17-6+deb13u1_arm64.deb ...
Unpacking cups-filters-core-drivers (1.28.17-6+deb13u1) over (1.28.17-6) ...
Preparing to unpack .../015-libfontembed1t64_1.28.17-6+deb13u1_arm64.deb ...
Unpacking libfontembed1t64:arm64 (1.28.17-6+deb13u1) over (1.28.17-6) ...
Preparing to unpack .../016-cups-filters_1.28.17-6+deb13u1_arm64.deb ...
Unpacking cups-filters (1.28.17-6+deb13u1) over (1.28.17-6) ...
Preparing to unpack .../017-gpgsm_2.4.7-21+deb13u1+b1_arm64.deb ...
Unpacking gpgsm (2.4.7-21+deb13u1+b1) over (2.4.7-21+b3) ...
Preparing to unpack .../018-gnupg-utils_2.4.7-21+deb13u1+b1_arm64.deb ...
Unpacking gnupg-utils (2.4.7-21+deb13u1+b1) over (2.4.7-21+b3) ...
Preparing to unpack .../019-gpg-wks-client_2.4.7-21+deb13u1+b1_arm64.deb ...
Unpacking gpg-wks-client (2.4.7-21+deb13u1+b1) over (2.4.7-21+b3) ...
Preparing to unpack .../020-gpg_2.4.7-21+deb13u1+b1_arm64.deb ...
Unpacking gpg (2.4.7-21+deb13u1+b1) over (2.4.7-21+b3) ...
Preparing to unpack .../021-dirmngr_2.4.7-21+deb13u1+b1_arm64.deb ...
Unpacking dirmngr (2.4.7-21+deb13u1+b1) over (2.4.7-21+b3) ...
Preparing to unpack .../022-gnupg_2.4.7-21+deb13u1_all.deb ...
Unpacking gnupg (2.4.7-21+deb13u1) over (2.4.7-21) ...
Preparing to unpack .../023-gpgconf_2.4.7-21+deb13u1+b1_arm64.deb ...
Unpacking gpgconf (2.4.7-21+deb13u1+b1) over (2.4.7-21+b3) ...
Preparing to unpack .../024-gpg-agent_2.4.7-21+deb13u1+b1_arm64.deb ...
Unpacking gpg-agent (2.4.7-21+deb13u1+b1) over (2.4.7-21+b3) ...
Preparing to unpack .../025-gnupg-l10n_2.4.7-21+deb13u1_all.deb ...
Unpacking gnupg-l10n (2.4.7-21+deb13u1) over (2.4.7-21) ...
Preparing to unpack .../026-libgnutls30t64_3.8.9-3+deb13u1_arm64.deb ...
Unpacking libgnutls30t64:arm64 (3.8.9-3+deb13u1) over (3.8.9-3) ...
Preparing to unpack .../027-exfatprogs_1.2.9-1+deb13u1_arm64.deb ...
Unpacking exfatprogs (1.2.9-1+deb13u1) over (1.2.9-1) ...
Preparing to unpack .../028-libswscale8_8%3a7.1.3-0+deb13u1+rpt1_arm64.deb ...
Unpacking libswscale8:arm64 (8:7.1.3-0+deb13u1+rpt1) over (8:7.1.2-0+deb13u1+rpt2) ...
Preparing to unpack .../029-libavfilter10_8%3a7.1.3-0+deb13u1+rpt1_arm64.deb ...
Unpacking libavfilter10:arm64 (8:7.1.3-0+deb13u1+rpt1) over (8:7.1.2-0+deb13u1+rpt2) ...
Preparing to unpack .../030-libavdevice61_8%3a7.1.3-0+deb13u1+rpt1_arm64.deb ...
Unpacking libavdevice61:arm64 (8:7.1.3-0+deb13u1+rpt1) over (8:7.1.2-0+deb13u1+rpt2) ...
Preparing to unpack .../031-libavformat61_8%3a7.1.3-0+deb13u1+rpt1_arm64.deb ...
Unpacking libavformat61:arm64 (8:7.1.3-0+deb13u1+rpt1) over (8:7.1.2-0+deb13u1+rpt2) ...
Preparing to unpack .../032-libavcodec61_8%3a7.1.3-0+deb13u1+rpt1_arm64.deb ...
Unpacking libavcodec61:arm64 (8:7.1.3-0+deb13u1+rpt1) over (8:7.1.2-0+deb13u1+rpt2) ...
Preparing to unpack .../033-libavutil59_8%3a7.1.3-0+deb13u1+rpt1_arm64.deb ...
Unpacking libavutil59:arm64 (8:7.1.3-0+deb13u1+rpt1) over (8:7.1.2-0+deb13u1+rpt2) ...
Preparing to unpack .../034-libpostproc58_8%3a7.1.3-0+deb13u1+rpt1_arm64.deb ...
Unpacking libpostproc58:arm64 (8:7.1.3-0+deb13u1+rpt1) over (8:7.1.2-0+deb13u1+rpt2) ...
Preparing to unpack .../035-libswresample5_8%3a7.1.3-0+deb13u1+rpt1_arm64.deb ...
Unpacking libswresample5:arm64 (8:7.1.3-0+deb13u1+rpt1) over (8:7.1.2-0+deb13u1+rpt2) ...
Preparing to unpack .../036-ffmpeg_8%3a7.1.3-0+deb13u1+rpt1_arm64.deb ...
Unpacking ffmpeg (8:7.1.3-0+deb13u1+rpt1) over (8:7.1.2-0+deb13u1+rpt2) ...
Preparing to unpack .../037-firefox_147.0.2-1+rpt1_arm64.deb ...
Unpacking firefox (147.0.2-1+rpt1) over (145.0.1-1+rpt1) ...
Preparing to unpack .../038-gpgv_2.4.7-21+deb13u1+b1_arm64.deb ...
Unpacking gpgv (2.4.7-21+deb13u1+b1) over (2.4.7-21+b3) ...
Preparing to unpack .../039-libcap2-bin_1%3a2.75-10+b3_arm64.deb ...
Unpacking libcap2-bin (1:2.75-10+b3) over (1:2.75-10+b1) ...
Preparing to unpack .../040-libcom-err2_1.47.2-3+b7_arm64.deb ...
Unpacking libcom-err2:arm64 (1.47.2-3+b7) over (1.47.2-3+b3) ...
Preparing to unpack .../041-libmagickcore-7.q16-10-extra_8%3a7.1.1.43+dfsg1-1+deb13u5_arm64.deb ...
Unpacking libmagickcore-7.q16-10-extra:arm64 (8:7.1.1.43+dfsg1-1+deb13u5) over (8:7.1.1.43+dfsg1-1+deb13u3) ...
Preparing to unpack .../042-libmbedcrypto16_3.6.5-0.1~deb13u1_arm64.deb ...
Unpacking libmbedcrypto16:arm64 (3.6.5-0.1~deb13u1) over (3.6.4-2) ...
Preparing to unpack .../043-librpicam-app1_1.11.0-1_arm64.deb ...
Unpacking librpicam-app1:arm64 (1.11.0-1) over (1.10.1-1) ...
Preparing to unpack .../044-libsnmp-base_5.9.4+dfsg-2+deb13u1_all.deb ...
Unpacking libsnmp-base (5.9.4+dfsg-2+deb13u1) over (5.9.4+dfsg-2) ...
Preparing to unpack .../045-libsnmp40t64_5.9.4+dfsg-2+deb13u1_arm64.deb ...
Unpacking libsnmp40t64:arm64 (5.9.4+dfsg-2+deb13u1) over (5.9.4+dfsg-2) ...
Preparing to unpack .../046-libsodium23_1.0.18-1+deb13u1_arm64.deb ...
Unpacking libsodium23:arm64 (1.0.18-1+deb13u1) over (1.0.18-1+b2) ...
Preparing to unpack .../047-libss2_1.47.2-3+b7_arm64.deb ...
Unpacking libss2:arm64 (1.47.2-3+b7) over (1.47.2-3+b3) ...
Preparing to unpack .../048-vlc_1%3a3.0.23-0+deb13u1+rpt1_arm64.deb ...
Unpacking vlc (1:3.0.23-0+deb13u1+rpt1) over (1:3.0.21-10+rpt3) ...
Preparing to unpack .../049-vlc-plugin-base_1%3a3.0.23-0+deb13u1+rpt1_arm64.deb ...
Unpacking vlc-plugin-base:arm64 (1:3.0.23-0+deb13u1+rpt1) over (1:3.0.21-10+rpt3) ...
Preparing to unpack .../050-vlc-data_1%3a3.0.23-0+deb13u1+rpt1_all.deb ...
Unpacking vlc-data (1:3.0.23-0+deb13u1+rpt1) over (1:3.0.21-10+rpt3) ...
Preparing to unpack .../051-libvlccore9_1%3a3.0.23-0+deb13u1+rpt1_arm64.deb ...
Unpacking libvlccore9:arm64 (1:3.0.23-0+deb13u1+rpt1) over (1:3.0.21-10+rpt3) ...
Preparing to unpack .../052-vlc-plugin-skins2_1%3a3.0.23-0+deb13u1+rpt1_arm64.deb ...
Unpacking vlc-plugin-skins2:arm64 (1:3.0.23-0+deb13u1+rpt1) over (1:3.0.21-10+rpt3) ...
Preparing to unpack .../053-vlc-plugin-qt_1%3a3.0.23-0+deb13u1+rpt1_arm64.deb ...
Unpacking vlc-plugin-qt:arm64 (1:3.0.23-0+deb13u1+rpt1) over (1:3.0.21-10+rpt3) ...
Preparing to unpack .../054-vlc-plugin-video-output_1%3a3.0.23-0+deb13u1+rpt1_arm64.deb ...
Unpacking vlc-plugin-video-output:arm64 (1:3.0.23-0+deb13u1+rpt1) over (1:3.0.21-10+rpt3) ...
Preparing to unpack .../055-libvlc5_1%3a3.0.23-0+deb13u1+rpt1_arm64.deb ...
Unpacking libvlc5:arm64 (1:3.0.23-0+deb13u1+rpt1) over (1:3.0.21-10+rpt3) ...
Preparing to unpack .../056-vlc-bin_1%3a3.0.23-0+deb13u1+rpt1_arm64.deb ...
Unpacking vlc-bin (1:3.0.23-0+deb13u1+rpt1) over (1:3.0.21-10+rpt3) ...
Preparing to unpack .../057-libvlc-bin_1%3a3.0.23-0+deb13u1+rpt1_arm64.deb ...
Unpacking libvlc-bin:arm64 (1:3.0.23-0+deb13u1+rpt1) over (1:3.0.21-10+rpt3) ...
Selecting previously unselected package linux-headers-6.12.62+rpt-common-rpi.
Preparing to unpack .../058-linux-headers-6.12.62+rpt-common-rpi_1%3a6.12.62-1+rpt1_all.deb ...
Unpacking linux-headers-6.12.62+rpt-common-rpi (1:6.12.62-1+rpt1) ...
Selecting previously unselected package linux-image-6.12.62+rpt-rpi-2712.
Preparing to unpack .../059-linux-image-6.12.62+rpt-rpi-2712_1%3a6.12.62-1+rpt1_arm64.deb ...
Unpacking linux-image-6.12.62+rpt-rpi-2712 (1:6.12.62-1+rpt1) ...
Selecting previously unselected package linux-kbuild-6.12.62+rpt.
Preparing to unpack .../060-linux-kbuild-6.12.62+rpt_1%3a6.12.62-1+rpt1_arm64.deb ...
Unpacking linux-kbuild-6.12.62+rpt (1:6.12.62-1+rpt1) ...
Selecting previously unselected package linux-headers-6.12.62+rpt-rpi-2712.
Preparing to unpack .../061-linux-headers-6.12.62+rpt-rpi-2712_1%3a6.12.62-1+rpt1_arm64.deb ...
Unpacking linux-headers-6.12.62+rpt-rpi-2712 (1:6.12.62-1+rpt1) ...
Selecting previously unselected package linux-image-6.12.62+rpt-rpi-v8.
Preparing to unpack .../062-linux-image-6.12.62+rpt-rpi-v8_1%3a6.12.62-1+rpt1_arm64.deb ...
Unpacking linux-image-6.12.62+rpt-rpi-v8 (1:6.12.62-1+rpt1) ...
Selecting previously unselected package linux-headers-6.12.62+rpt-rpi-v8.
Preparing to unpack .../063-linux-headers-6.12.62+rpt-rpi-v8_1%3a6.12.62-1+rpt1_arm64.deb ...
Unpacking linux-headers-6.12.62+rpt-rpi-v8 (1:6.12.62-1+rpt1) ...
Preparing to unpack .../064-linux-headers-rpi-2712_1%3a6.12.62-1+rpt1_arm64.deb ...
Unpacking linux-headers-rpi-2712 (1:6.12.62-1+rpt1) over (1:6.12.47-1+rpt1) ...
Preparing to unpack .../065-linux-headers-rpi-v8_1%3a6.12.62-1+rpt1_arm64.deb ...
Unpacking linux-headers-rpi-v8 (1:6.12.62-1+rpt1) over (1:6.12.47-1+rpt1) ...
Preparing to unpack .../066-linux-image-rpi-2712_1%3a6.12.62-1+rpt1_arm64.deb ...
Unpacking linux-image-rpi-2712 (1:6.12.62-1+rpt1) over (1:6.12.47-1+rpt1) ...
Preparing to unpack .../067-linux-image-rpi-v8_1%3a6.12.62-1+rpt1_arm64.deb ...
Unpacking linux-image-rpi-v8 (1:6.12.62-1+rpt1) over (1:6.12.47-1+rpt1) ...
Preparing to unpack .../068-pplug-power-data_1.4_arm64.deb ...
Unpacking pplug-power-data (1.4) over (1.3) ...
Preparing to unpack .../069-lpplug-power_1.4_arm64.deb ...
Unpacking lpplug-power (1.4) over (1.3) ...
Preparing to unpack .../070-lpplug-volumepulse_1.7_arm64.deb ...
Unpacking lpplug-volumepulse (1.7) over (1.6) ...
Preparing to unpack .../071-openssl_3.5.4-1~deb13u2_arm64.deb ...
Unpacking openssl (3.5.4-1~deb13u2) over (3.5.4-1~deb13u1+rpt1) ...
Preparing to unpack .../072-pi-package-data_0.19_all.deb ...
Unpacking pi-package-data (0.19) over (0.18) ...
Preparing to unpack .../073-pi-package-session_0.19_arm64.deb ...
Unpacking pi-package-session (0.19) over (0.18) ...
Preparing to unpack .../074-pi-package_0.19_arm64.deb ...
Unpacking pi-package (0.19) over (0.18) ...
Preparing to unpack .../075-pipanel_1%3a2.8_arm64.deb ...
Unpacking pipanel (1:2.8) over (1:2.7) ...
Preparing to unpack .../076-piwiz_1.6_arm64.deb ...
Unpacking piwiz (1.6) over (1.5) ...
Selecting previously unselected package python3-openexr.
Preparing to unpack .../077-python3-openexr_1.3.10-1_arm64.deb ...
Unpacking python3-openexr (1.3.10-1) ...
Preparing to unpack .../078-python3-pidng_4.0.9+git20251223.99f6c09-1_arm64.deb ...
Unpacking python3-pidng (4.0.9+git20251223.99f6c09-1) over (4.0.9+git20250603.8427835-1+trixie) ...
Preparing to unpack .../079-python3-picamera2_0.3.33-1_all.deb ...
Unpacking python3-picamera2 (0.3.33-1) over (0.3.32-1) ...
Preparing to unpack .../080-python3-pip_25.1.1+dfsg-1+rpt1_all.deb ...
Unpacking python3-pip (25.1.1+dfsg-1+rpt1) over (25.1.1+dfsg-1) ...
Preparing to unpack .../081-python3-pip-whl_25.1.1+dfsg-1+rpt1_all.deb ...
Unpacking python3-pip-whl (25.1.1+dfsg-1+rpt1) over (25.1.1+dfsg-1) ...
Preparing to unpack .../082-python3-urllib3_2.3.0-3+deb13u1_all.deb ...
Unpacking python3-urllib3 (2.3.0-3+deb13u1) over (2.3.0-3) ...
Preparing to unpack .../083-raindrop_1.15_arm64.deb ...
Unpacking raindrop (1.15) over (1.14) ...
Preparing to unpack .../084-rc-gui_2.10_arm64.deb ...
Unpacking rc-gui (2.10) over (2.9) ...
Preparing to unpack .../085-rp-bookshelf_1.8_arm64.deb ...
Unpacking rp-bookshelf (1.8) over (1.7) ...
Preparing to unpack .../086-rpi-connect_2.7.0_arm64.deb ...
Unpacking rpi-connect (2.7.0) over (2.6.1) ...
Preparing to unpack .../087-rpi-eeprom_28.12-1_all.deb ...
Unpacking rpi-eeprom (28.12-1) over (28.9-1) ...
Preparing to unpack .../088-rpi-imager_2.0.6_arm64.deb ...
Unpacking rpi-imager (2.0.6) over (2.0.1) ...
Preparing to unpack .../089-rpi-userguide_1.4_arm64.deb ...
Unpacking rpi-userguide (1.4) over (1.3) ...
Preparing to unpack .../090-rpicam-apps-core_1.11.0-1_arm64.deb ...
Unpacking rpicam-apps-core (1.11.0-1) over (1.10.1-1) ...
Preparing to unpack .../091-rpicam-apps-encoder_1.11.0-1_arm64.deb ...
Unpacking rpicam-apps-encoder:arm64 (1.11.0-1) over (1.10.1-1) ...
Preparing to unpack .../092-rpicam-apps-opencv-postprocess_1.11.0-1_arm64.deb ...
Unpacking rpicam-apps-opencv-postprocess (1.11.0-1) over (1.10.1-1) ...
Preparing to unpack .../093-rpicam-apps-preview_1.11.0-1_arm64.deb ...
Unpacking rpicam-apps-preview:arm64 (1.11.0-1) over (1.10.1-1) ...
Preparing to unpack .../094-rpicam-apps_1.11.0-1_all.deb ...
Unpacking rpicam-apps (1.11.0-1) over (1.10.1-1) ...
Preparing to unpack .../095-rpicam-apps-lite_1.11.0-1_all.deb ...
Unpacking rpicam-apps-lite (1.11.0-1) over (1.10.1-1) ...
Preparing to unpack .../096-sq_1.3.1-2+b2_arm64.deb ...
Unpacking sq (1.3.1-2+b2) over (1.3.1-2+b1) ...
Preparing to unpack .../097-vlc-l10n_1%3a3.0.23-0+deb13u1+rpt1_all.deb ...
Unpacking vlc-l10n (1:3.0.23-0+deb13u1+rpt1) over (1:3.0.21-10+rpt3) ...
Preparing to unpack .../098-vlc-plugin-access-extra_1%3a3.0.23-0+deb13u1+rpt1_arm64.deb ...
Unpacking vlc-plugin-access-extra:arm64 (1:3.0.23-0+deb13u1+rpt1) over (1:3.0.21-10+rpt3) ...
Preparing to unpack .../099-vlc-plugin-notify_1%3a3.0.23-0+deb13u1+rpt1_arm64.deb ...
Unpacking vlc-plugin-notify:arm64 (1:3.0.23-0+deb13u1+rpt1) over (1:3.0.21-10+rpt3) ...
Preparing to unpack .../100-vlc-plugin-samba_1%3a3.0.23-0+deb13u1+rpt1_arm64.deb ...
Unpacking vlc-plugin-samba:arm64 (1:3.0.23-0+deb13u1+rpt1) over (1:3.0.21-10+rpt3) ...
Preparing to unpack .../101-vlc-plugin-video-splitter_1%3a3.0.23-0+deb13u1+rpt1_arm64.deb ...
Unpacking vlc-plugin-video-splitter:arm64 (1:3.0.23-0+deb13u1+rpt1) over (1:3.0.21-10+rpt3) ...
Preparing to unpack .../102-vlc-plugin-visualization_1%3a3.0.23-0+deb13u1+rpt1_arm64.deb ...
Unpacking vlc-plugin-visualization:arm64 (1:3.0.23-0+deb13u1+rpt1) over (1:3.0.21-10+rpt3) ...
Preparing to unpack .../103-wfplug-power_1.4_arm64.deb ...
Unpacking wfplug-power (1.4) over (1.3) ...
Preparing to unpack .../104-wfplug-volumepulse_1.7_arm64.deb ...
Unpacking wfplug-volumepulse (1.7) over (1.6) ...
Setting up libgnutls30t64:arm64 (3.8.9-3+deb13u1) ...
Setting up libfontembed1t64:arm64 (1.28.17-6+deb13u1) ...
Setting up python3-pidng (4.0.9+git20251223.99f6c09-1) ...
Setting up linux-image-6.12.62+rpt-rpi-2712 (1:6.12.62-1+rpt1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.12.62+rpt-rpi-2712
'/boot/initrd.img-6.12.62+rpt-rpi-2712' -> '/boot/firmware/initramfs_2712'
/etc/kernel/postinst.d/z50-raspi-firmware:
'/boot/vmlinuz-6.12.62+rpt-rpi-2712' -> '/boot/firmware/kernel_2712.img'
Setting up linux-image-6.12.62+rpt-rpi-v8 (1:6.12.62-1+rpt1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.12.62+rpt-rpi-v8
'/boot/initrd.img-6.12.62+rpt-rpi-v8' -> '/boot/firmware/initramfs8'
/etc/kernel/postinst.d/z50-raspi-firmware:
'/boot/vmlinuz-6.12.62+rpt-rpi-v8' -> '/boot/firmware/kernel8.img'
Setting up libc-l10n (2.41-12+rpt1+deb13u1) ...
Setting up libsodium23:arm64 (1.0.18-1+deb13u1) ...
Setting up pplug-power-data (1.4) ...
gtk-update-icon-cache: Cache file created successfully.
Setting up exfatprogs (1.2.9-1+deb13u1) ...
Setting up python3-pip-whl (25.1.1+dfsg-1+rpt1) ...
Setting up imagemagick-7-common (8:7.1.1.43+dfsg1-1+deb13u5) ...
Setting up libsnmp-base (5.9.4+dfsg-2+deb13u1) ...
Setting up linux-libc-dev (1:6.12.62-1+rpt1) ...
Setting up vlc-l10n (1:3.0.23-0+deb13u1+rpt1) ...
Setting up libcom-err2:arm64 (1.47.2-3+b7) ...
Setting up sq (1.3.1-2+b2) ...
Setting up locales (2.41-12+rpt1+deb13u1) ...
Generating locales (this might take a while)...
en_GB.UTF-8... done
Generation complete.
Setting up libavutil59:arm64 (8:7.1.3-0+deb13u1+rpt1) ...
Setting up chromium-sandbox (1:144.0.7559.59-1~deb13u1+rpt1) ...
Setting up rpi-connect (2.7.0) ...
For Raspberry Pi OS Lite, enable user lingering for your user:
loginctl enable-linger
This allows users who are not logged in to run long-running services.
For information on getting started with Raspberry Pi Connect, please see the official documentation:
https://rptl.io/rpi-connect
Setting up linux-kbuild-6.12.62+rpt (1:6.12.62-1+rpt1) ...
Setting up libpostproc58:arm64 (8:7.1.3-0+deb13u1+rpt1) ...
Setting up libcap2-bin (1:2.75-10+b3) ...
Setting up linux-image-rpi-2712 (1:6.12.62-1+rpt1) ...
Setting up busybox (1:1.37.0-6+b5) ...
Setting up libswresample5:arm64 (8:7.1.3-0+deb13u1+rpt1) ...
Setting up libswscale8:arm64 (8:7.1.3-0+deb13u1+rpt1) ...
Setting up libglib2.0-0t64:arm64 (2.84.4-3~deb13u2) ...
Setting up rpi-userguide (1.4) ...
gtk-update-icon-cache: Cache file created successfully.
Setting up libglib2.0-data (2.84.4-3~deb13u2) ...
Setting up python3-openexr (1.3.10-1) ...
Setting up linux-headers-6.12.62+rpt-common-rpi (1:6.12.62-1+rpt1) ...
Setting up gnupg-l10n (2.4.7-21+deb13u1) ...
Setting up libatspi2.0-0t64:arm64 (2.56.2-1+deb13u1) ...
Setting up rpicam-apps-opencv-postprocess (1.11.0-1) ...
Setting up libpng16-16t64:arm64 (1.6.48-1+deb13u1) ...
Setting up pi-package-data (0.19) ...
Setting up libss2:arm64 (1.47.2-3+b7) ...
Setting up libavcodec61:arm64 (8:7.1.3-0+deb13u1+rpt1) ...
Setting up dhcpcd-base (1:10.1.0-11+deb13u2) ...
Installing new version of config file /etc/dhcpcd.conf ...
Setting up linux-image-rpi-v8 (1:6.12.62-1+rpt1) ...
Setting up gir1.2-glib-2.0:arm64 (2.84.4-3~deb13u2) ...
Setting up python3-pip (25.1.1+dfsg-1+rpt1) ...
Setting up rpicam-apps-preview:arm64 (1.11.0-1) ...
Setting up piwiz (1.6) ...
Setting up rp-bookshelf (1.8) ...
Setting up logsave (1.47.2-3+b7) ...
Setting up libvlccore9:arm64 (1:3.0.23-0+deb13u1+rpt1) ...
Setting up libmagickcore-7.q16-10:arm64 (8:7.1.1.43+dfsg1-1+deb13u5) ...
Setting up python3-urllib3 (2.3.0-3+deb13u1) ...
Setting up vlc-plugin-qt:arm64 (1:3.0.23-0+deb13u1+rpt1) ...
Setting up at-spi2-common (2.56.2-1+deb13u1) ...
Setting up gpgv (2.4.7-21+deb13u1+b1) ...
Setting up gpgconf (2.4.7-21+deb13u1+b1) ...
Setting up rpi-eeprom (28.12-1) ...
Setting up chromium-common (1:144.0.7559.59-1~deb13u1+rpt1) ...
Setting up rpi-imager (2.0.6) ...
Setting up libcupsfilters1t64:arm64 (1.28.17-6+deb13u1) ...
Setting up libmbedcrypto16:arm64 (3.6.5-0.1~deb13u1) ...
Setting up linux-headers-6.12.62+rpt-rpi-2712 (1:6.12.62-1+rpt1) ...
Setting up libc-dev-bin (2.41-12+rpt1+deb13u1) ...
Setting up openssl (3.5.4-1~deb13u2) ...
Setting up librpicam-app1:arm64 (1.11.0-1) ...
Setting up wfplug-volumepulse (1.7) ...
Setting up vlc-data (1:3.0.23-0+deb13u1+rpt1) ...
Setting up gpg (2.4.7-21+deb13u1+b1) ...
Setting up rsync (3.4.1+ds1-5+deb13u1) ...
rsync.service is a disabled or a static unit not running, not starting it.
Setting up vlc-plugin-notify:arm64 (1:3.0.23-0+deb13u1+rpt1) ...
Setting up vlc-plugin-video-output:arm64 (1:3.0.23-0+deb13u1+rpt1) ...
Setting up gnupg-utils (2.4.7-21+deb13u1+b1) ...
Setting up vlc-plugin-samba:arm64 (1:3.0.23-0+deb13u1+rpt1) ...
Setting up rc-gui (2.10) ...
Setting up linux-headers-6.12.62+rpt-rpi-v8 (1:6.12.62-1+rpt1) ...
Setting up cups-browsed (1.28.17-6+deb13u1) ...
Setting up linux-headers-rpi-v8 (1:6.12.62-1+rpt1) ...
Setting up libsnmp40t64:arm64 (5.9.4+dfsg-2+deb13u1) ...
Setting up gpg-agent (2.4.7-21+deb13u1+b1) ...
Setting up libatk1.0-0t64:arm64 (2.56.2-1+deb13u1) ...
Setting up libmagickwand-7.q16-10:arm64 (8:7.1.1.43+dfsg1-1+deb13u5) ...
Setting up lpplug-volumepulse (1.7) ...
Setting up alacarte (3.56.0-2+rpt2) ...
Setting up firefox (147.0.2-1+rpt1) ...
Setting up vlc-plugin-skins2:arm64 (1:3.0.23-0+deb13u1+rpt1) ...
Setting up gir1.2-atk-1.0:arm64 (2.56.2-1+deb13u1) ...
Setting up vlc-plugin-video-splitter:arm64 (1:3.0.23-0+deb13u1+rpt1) ...
Setting up gpgsm (2.4.7-21+deb13u1+b1) ...
Setting up wfplug-power (1.4) ...
Setting up libglib2.0-bin (2.84.4-3~deb13u2) ...
Setting up raindrop (1.15) ...
Setting up libvlc5:arm64 (1:3.0.23-0+deb13u1+rpt1) ...
Setting up e2fsprogs (1.47.2-3+b7) ...
update-initramfs: deferring update (trigger activated)
Setting up cups-filters-core-drivers (1.28.17-6+deb13u1) ...
Setting up libavformat61:arm64 (8:7.1.3-0+deb13u1+rpt1) ...
Setting up python3-picamera2 (0.3.33-1) ...
Setting up lpplug-power (1.4) ...
Setting up dirmngr (2.4.7-21+deb13u1+b1) ...
Setting up vlc-plugin-visualization:arm64 (1:3.0.23-0+deb13u1+rpt1) ...
Setting up vlc-plugin-access-extra:arm64 (1:3.0.23-0+deb13u1+rpt1) ...
Setting up pi-package-session (0.19) ...
Setting up pipanel (1:2.8) ...
Setting up rpicam-apps-core (1.11.0-1) ...
Setting up libavfilter10:arm64 (8:7.1.3-0+deb13u1+rpt1) ...
Setting up linux-headers-rpi-2712 (1:6.12.62-1+rpt1) ...
Setting up libvlc-bin:arm64 (1:3.0.23-0+deb13u1+rpt1) ...
Setting up gnupg (2.4.7-21+deb13u1) ...
Setting up libc6-dev:arm64 (2.41-12+rpt1+deb13u1) ...
Setting up cups-filters (1.28.17-6+deb13u1) ...
Setting up vlc-plugin-base:arm64 (1:3.0.23-0+deb13u1+rpt1) ...
Setting up pi-package (0.19) ...
Setting up libatk-bridge2.0-0t64:arm64 (2.56.2-1+deb13u1) ...
Setting up libmagickcore-7.q16-10-extra:arm64 (8:7.1.1.43+dfsg1-1+deb13u5) ...
Setting up gpg-wks-client (2.4.7-21+deb13u1+b1) ...
Setting up libavdevice61:arm64 (8:7.1.3-0+deb13u1+rpt1) ...
Setting up vlc-bin (1:3.0.23-0+deb13u1+rpt1) ...
Setting up rpicam-apps-lite (1.11.0-1) ...
Setting up ffmpeg (8:7.1.3-0+deb13u1+rpt1) ...
Setting up chromium (1:144.0.7559.59-1~deb13u1+rpt1) ...
Setting up rpicam-apps-encoder:arm64 (1.11.0-1) ...
Setting up vlc (1:3.0.23-0+deb13u1+rpt1) ...
Setting up rpicam-apps (1.11.0-1) ...
Setting up chromium-l10n (1:144.0.7559.59-1~deb13u1+rpt1) ...
Processing triggers for mailcap (3.74) ...
Processing triggers for desktop-file-utils (0.28-1) ...
Processing triggers for initramfs-tools (0.148.3+rpt2) ...
update-initramfs: Generating /boot/initrd.img-6.12.62+rpt-rpi-v8
'/boot/initrd.img-6.12.62+rpt-rpi-v8' -> '/boot/firmware/initramfs8'
update-initramfs: Generating /boot/initrd.img-6.12.62+rpt-rpi-2712
'/boot/initrd.img-6.12.62+rpt-rpi-2712' -> '/boot/firmware/initramfs_2712'
Processing triggers for hicolor-icon-theme (0.18-2) ...
Processing triggers for cups (2.4.10-3+deb13u2) ...
Updating PPD files for cups-filters ...
Updating PPD files for escpr ...
Updating PPD files for hpcups ...
Updating PPD files for postscript-hp ...
Processing triggers for gnome-menus (3.36.0-3) ...
Processing triggers for libc-bin (2.41-12+rpt1+deb13u1) ...
Processing triggers for systemd (257.9-1~deb13u1) ...
Processing triggers for man-db (2.13.1-1) ...
Processing triggers for shared-mime-info (2.4-5+b2) ...
Processing triggers for debianutils (5.23.2) ...
Processing triggers for libvlc-bin:arm64 (1:3.0.23-0+deb13u1+rpt1) ...
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
実行結果
# Executing docker install script, commit: f381ee68b32e515bb4dc034b339266aff1fbc460
+ sh -c apt-get -qq update >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get -y -qq install ca-certificates curl >/dev/null
+ sh -c install -m 0755 -d /etc/apt/keyrings
+ sh -c curl -fsSL "https://download.docker.com/linux/debian/gpg" -o /etc/apt/keyrings/docker.asc
+ sh -c chmod a+r /etc/apt/keyrings/docker.asc
+ sh -c echo "deb [arch=arm64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian trixie stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get -qq update >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get -y -qq install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin docker-model-plugin >/dev/null
Using systemd to manage Docker service
+ sh -c systemctl enable --now docker.service
UNIT LOAD ACTIVE SUB DESCRIPTION
proc-sys-fs-binfmt_misc.automount loaded active running Arbitrary Executable File Formats File S …
sys-devices-platform-axi-1000120000.pcie… loaded active plugged /sys/devices/platform/axi/1000120000.pci…
sys-devices-platform-axi-1000120000.pcie… loaded active plugged /sys/devices/platform/axi/1000120000.pci…
sys-devices-platform-axi-1001100000.mmc-… loaded active plugged /sys/devices/platform/axi/1001100000.mmc…
sys-devices-platform-axi-1002000000.v3d-… loaded active plugged /sys/devices/platform/axi/1002000000.v3d…
sys-devices-platform-axi-1002000000.v3d-… loaded active plugged /sys/devices/platform/axi/1002000000.v3d…
sys-devices-platform-axi-axi:gpu-drm-car… loaded active plugged /sys/devices/platform/axi/axi:gpu/drm/ca…
sys-devices-platform-axi-axi:gpu-drm-car… loaded active plugged /sys/devices/platform/axi/axi:gpu/drm/ca…
sys-devices-platform-axi-axi:gpu-drm-car… loaded active plugged /sys/devices/platform/axi/axi:gpu/drm/ca…
sys-devices-platform-axi-axi:gpu-drm-car… loaded active plugged /sys/devices/platform/axi/axi:gpu/drm/ca…
sys-devices-platform-axi-axi:gpu-drm-car… loaded active plugged /sys/devices/platform/axi/axi:gpu/drm/ca…
sys-devices-platform-soc\x40107c000000-1… loaded active plugged /sys/devices/platform/soc@107c000000/100…
sys-devices-platform-soc\x40107c000000-1… loaded active plugged /sys/devices/platform/soc@107c000000/100…
sys-devices-platform-soc\x40107c000000-1… loaded active plugged /sys/devices/platform/soc@107c000000/100…
sys-devices-platform-soc\x40107c000000-1… loaded active plugged /sys/devices/platform/soc@107c000000/107…
sys-devices-platform-soc\x40107c000000-1… loaded active plugged /sys/devices/platform/soc@107c000000/107…
sys-devices-platform-soc\x40107c000000-1… loaded active plugged /sys/devices/platform/soc@107c000000/107…
sys-devices-platform-soc\x40107c000000-1… loaded active plugged /sys/devices/platform/soc@107c000000/107…
sys-devices-virtual-block-loop0.device loaded active plugged /sys/devices/virtual/block/loop0
sys-devices-virtual-block-ram0.device loaded active plugged /sys/devices/virtual/block/ram0
sys-devices-virtual-block-ram1.device loaded active plugged /sys/devices/virtual/block/ram1
sys-devices-virtual-block-ram10.device loaded active plugged /sys/devices/virtual/block/ram10
sys-devices-virtual-block-ram11.device loaded active plugged /sys/devices/virtual/block/ram11
sys-devices-virtual-block-ram12.device loaded active plugged /sys/devices/virtual/block/ram12
sys-devices-virtual-block-ram13.device loaded active plugged /sys/devices/virtual/block/ram13
sys-devices-virtual-block-ram14.device loaded active plugged /sys/devices/virtual/block/ram14
sys-devices-virtual-block-ram15.device loaded active plugged /sys/devices/virtual/block/ram15
sys-devices-virtual-block-ram2.device loaded active plugged /sys/devices/virtual/block/ram2
sys-devices-virtual-block-ram3.device loaded active plugged /sys/devices/virtual/block/ram3
sys-devices-virtual-block-ram4.device loaded active plugged /sys/devices/virtual/block/ram4
sys-devices-virtual-block-ram5.device loaded active plugged /sys/devices/virtual/block/ram5
sys-devices-virtual-block-ram6.device loaded active plugged /sys/devices/virtual/block/ram6
sys-devices-virtual-block-ram7.device loaded active plugged /sys/devices/virtual/block/ram7
sys-devices-virtual-block-ram8.device loaded active plugged /sys/devices/virtual/block/ram8
sys-devices-virtual-block-ram9.device loaded active plugged /sys/devices/virtual/block/ram9
sys-devices-virtual-block-zram0.device loaded active plugged /sys/devices/virtual/block/zram0
sys-devices-virtual-misc-rfkill.device loaded active plugged /sys/devices/virtual/misc/rfkill
sys-devices-virtual-net-docker0.device loaded active plugged /sys/devices/virtual/net/docker0
sys-devices-virtual-tty-ttyprintk.device loaded active plugged /sys/devices/virtual/tty/ttyprintk
sys-module-configfs.device loaded active plugged /sys/module/configfs
sys-module-fuse.device loaded active plugged /sys/module/fuse
sys-subsystem-bluetooth-devices-hci0.dev… loaded active plugged /sys/subsystem/bluetooth/devices/hci0
sys-subsystem-net-devices-docker0.device loaded active plugged /sys/subsystem/net/devices/docker0
sys-subsystem-net-devices-eth0.device loaded active plugged /sys/subsystem/net/devices/eth0
sys-subsystem-net-devices-wlan0.device loaded active plugged /sys/subsystem/net/devices/wlan0
-.mount loaded active mounted Root Mount
boot-firmware.mount loaded active mounted /boot/firmware
dev-mqueue.mount loaded active mounted POSIX Message Queue File System
proc-sys-fs-binfmt_misc.mount loaded active mounted Arbitrary Executable File Formats File S …
run-lock.mount loaded active mounted Legacy Locks Directory /run/lock
run-rpc_pipefs.mount loaded active mounted RPC Pipe File System
run-user-1000-doc.mount loaded active mounted /run/user/1000/doc
run-user-1000-gvfs.mount loaded active mounted /run/user/1000/gvfs
run-user-1000.mount loaded active mounted /run/user/1000
sys-fs-fuse-connections.mount loaded active mounted FUSE Control File System
sys-kernel-config.mount loaded active mounted Kernel Configuration File System
sys-kernel-debug.mount loaded active mounted Kernel Debug File System
sys-kernel-tracing.mount loaded active mounted Kernel Trace File System
tmp.mount loaded active mounted Temporary Directory /tmp
cups.path loaded active running CUPS Scheduler
systemd-ask-password-plymouth.path loaded active waiting Forward Password Requests to Plymouth Di …
systemd-ask-password-wall.path loaded active waiting Forward Password Requests to Wall Direct …
init.scope loaded active running System and Service Manager
session-1.scope loaded active running Session 1 of User nomura
session-3.scope loaded active running Session 3 of User nomura
session-4.scope loaded active running Session 4 of User nomura
accounts-daemon.service loaded active running Accounts Service
alsa-restore.service loaded active exited Save/Restore Sound Card State
avahi-daemon.service loaded active running Avahi mDNS/DNS-SD Stack
bluetooth.service loaded active running Bluetooth service
cloud-config.service loaded active exited Cloud-init: Config Stage
cloud-final.service loaded active exited Cloud-init: Final Stage
cloud-init-local.service loaded active exited Cloud-init: Local Stage (pre-network)
cloud-init-network.service loaded active exited Cloud-init: Network Stage
console-setup.service loaded active exited Set console font and keymap
containerd.service loaded active running containerd container runtime
cron.service loaded active running Regular background program processing da …
cups-browsed.service loaded active running Make remote CUPS printers available loca …
cups.service loaded active running CUPS Scheduler
dbus.service loaded active running D-Bus System Message Bus
docker.service loaded active running Docker Application Container Engine
getty@tty1.service loaded active running Getty on tty1
glamor-test.service loaded active exited Check for glamor
keyboard-setup.service loaded active exited Set the console keyboard layout
kmod-static-nodes.service loaded active exited Create List of Static Device Nodes
lightdm.service loaded active running Light Display Manager
ModemManager.service loaded active running Modem Manager
NetworkManager-dispatcher.service loaded active running Network Manager Script Dispatcher Service
NetworkManager-wait-online.service loaded active exited Network Manager Wait Online
NetworkManager.service loaded active running Network Manager
nfs-blkmap.service loaded active running pNFS block layout mapping daemon
packagekit.service loaded active running PackageKit Daemon
plymouth-quit-wait.service loaded active exited Hold until boot process finishes up
plymouth-read-write.service loaded active exited Tell Plymouth To Write Out Runtime Data
plymouth-start.service loaded active exited Show Plymouth Boot Screen
polkit.service loaded active running Authorization Manager
rp1-test.service loaded active exited Check for RP1 displays for Xorg
rpc-statd-notify.service loaded active exited Notify NFS peers of a restart
rpcbind.service loaded active running RPC bind portmap service
rpi-eeprom-update.service loaded active exited Check for Raspberry Pi EEPROM updates
rpi-setup-loop@var-swap.service loaded active exited rpi-setup-loop - set up file on loop dev …
serial-getty@ttyAMA10.service loaded active running Serial Getty on ttyAMA10
ssh.service loaded active running OpenBSD Secure Shell server
systemd-binfmt.service loaded active exited Set Up Additional Binary Formats
systemd-fsck@dev-disk-by\x2dpartuuid-90b… loaded active exited File System Check on /dev/disk/by-partuu…
systemd-journal-flush.service loaded active exited Flush Journal to Persistent Storage
systemd-journald.service loaded active running Journal Service
systemd-logind.service loaded active running User Login Management
systemd-modules-load.service loaded active exited Load Kernel Modules
systemd-random-seed.service loaded active exited Load/Save OS Random Seed
systemd-remount-fs.service loaded active exited Remount Root and Kernel File Systems
systemd-sysctl.service loaded active exited Apply Kernel Variables
systemd-timesyncd.service loaded active running Network Time Synchronization
systemd-tmpfiles-setup-dev-early.service loaded active exited Create Static Device Nodes in /dev grace …
systemd-tmpfiles-setup-dev.service loaded active exited Create Static Device Nodes in /dev
systemd-tmpfiles-setup.service loaded active exited Create System Files and Directories
systemd-udev-load-credentials.service loaded active exited Load udev Rules from Credentials
systemd-udev-trigger.service loaded active exited Coldplug All udev Devices
systemd-udevd.service loaded active running Rule-based Manager for Device Events and …
systemd-user-sessions.service loaded active exited Permit User Sessions
systemd-zram-setup@zram0.service loaded active exited Create swap on /dev/zram0
udisks2.service loaded active running Disk Manager
user-runtime-dir@1000.service loaded active exited User Runtime Directory /run/user/1000
user@1000.service loaded active running User Manager for UID 1000
wpa_supplicant.service loaded active running WPA supplicant
-.slice loaded active active Root Slice
system-getty.slice loaded active active Slice /system/getty
system-modprobe.slice loaded active active Slice /system/modprobe
system-rpi\x2dsetup\x2dloop.slice loaded active active Slice /system/rpi-setup-loop
system-serial\x2dgetty.slice loaded active active Slice /system/serial-getty
system-systemd\x2dfsck.slice loaded active active Slice /system/systemd-fsck
system-systemd\x2dzram\x2dsetup.slice loaded active active Slice /system/systemd-zram-setup
system.slice loaded active active System Slice
user-1000.slice loaded active active User Slice of UID 1000
user.slice loaded active active User and Session Slice
avahi-daemon.socket loaded active running Avahi mDNS/DNS-SD Stack Activation Socket
cloud-init-hotplugd.socket loaded active listening cloud-init hotplug hook socket
cups.socket loaded active running CUPS Scheduler
dbus.socket loaded active running D-Bus System Message Bus Socket
docker.socket loaded active running Docker Socket for the API
rpcbind.socket loaded active running RPCbind Server Activation Socket
sshd-unix-local.socket loaded active listening OpenSSH Server Socket (systemd-ssh-gener …
systemd-creds.socket loaded active listening Credential Encryption/Decryption
systemd-hostnamed.socket loaded active listening Hostname Service Socket
systemd-initctl.socket loaded active listening initctl Compatibility Named Pipe
systemd-journald-dev-log.socket loaded active running Journal Socket (/dev/log)
systemd-journald.socket loaded active running Journal Sockets
systemd-rfkill.socket loaded active listening Load/Save RF Kill Switch Status /dev/rfk …
systemd-sysext.socket loaded active listening System Extension Image Management
systemd-udevd-control.socket loaded active running udev Control Socket
systemd-udevd-kernel.socket loaded active running udev Kernel Socket
dev-zram0.swap loaded active active rpi-swap managed swap device (zram+file)
basic.target loaded active active Basic System
bluetooth.target loaded active active Bluetooth Support
cloud-config.target loaded active active Cloud-config availability
cloud-init.target loaded active active Cloud-init target
getty.target loaded active active Login Prompts
graphical.target loaded active active Graphical Interface
local-fs-pre.target loaded active active Preparation for Local File Systems
local-fs.target loaded active active Local File Systems
multi-user.target loaded active active Multi-User System
network-online.target loaded active active Network is Online
network-pre.target loaded active active Preparation for Network
network.target loaded active active Network
nfs-client.target loaded active active NFS client services
nss-user-lookup.target loaded active active User and Group Name Lookups
paths.target loaded active active Path Units
remote-fs-pre.target loaded active active Preparation for Remote File Systems
remote-fs.target loaded active active Remote File Systems
rpc_pipefs.target loaded active active rpc_pipefs.target
rpcbind.target loaded active active RPC Port Mapper
slices.target loaded active active Slice Units
sockets.target loaded active active Socket Units
sound.target loaded active active Sound Card
swap.target loaded active active Swaps
sysinit.target loaded active active System Initialization
time-set.target loaded active active System Time Set
timers.target loaded active active Timer Units
apt-daily-upgrade.timer loaded active waiting Daily apt upgrade and clean activities
apt-daily.timer loaded active waiting Daily apt download activities
dpkg-db-backup.timer loaded active waiting Daily dpkg database backup timer
e2scrub_all.timer loaded active waiting Periodic ext4 Online Metadata Check for …
fstrim.timer loaded active waiting Discard unused filesystem blocks once a …
logrotate.timer loaded active waiting Daily rotation of log files
man-db.timer loaded active waiting Daily man-db regeneration
rpi-zram-writeback.timer loaded active waiting zram writeback timer
systemd-tmpfiles-clean.timer loaded active waiting Daily Cleanup of Temporary Directories
Legend: LOAD → Reflects whether the unit definition was properly loaded.
ACTIVE → The high-level unit activation state, i.e. generalization of SUB.
SUB → The low-level unit activation state, values depend on unit type.
187 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
INFO: Docker daemon enabled and started
+ sh -c docker version
Client: Docker Engine - Community
Version: 29.2.0
API version: 1.53
Go version: go1.25.6
Git commit: 0b9d198
Built: Mon Jan 26 19:26:06 2026
OS/Arch: linux/arm64
Context: default
Server: Docker Engine - Community
Engine:
Version: 29.2.0
API version: 1.53 (minimum version 1.44)
Go version: go1.25.6
Git commit: 9c62384
Built: Mon Jan 26 19:26:06 2026
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: v2.2.1
GitCommit: dea7da592f5d1d2b7755e3a161be07f43fad8f75
runc:
Version: 1.3.4
GitCommit: v1.3.4-0-gd6d73eb8
docker-init:
Version: 0.19.0
GitCommit: de40ad0
================================================================================
To run Docker as a non-privileged user, consider setting up the
Docker daemon in rootless mode for your user:
dockerd-rootless-setuptool.sh install
Visit https://docs.docker.com/go/rootless/ to learn about rootless mode.
To run the Docker daemon as a fully privileged service, but granting non-root
users access, refer to https://docs.docker.com/go/daemon-access/
WARNING: Access to the remote API on a privileged Docker daemon is equivalent
to root access on the host. Refer to the 'Docker daemon attack surface'
documentation for details: https://docs.docker.com/go/attack-surface/
================================================================================
sudo usermod -aG docker $USER
sudo apt install -y python3-venv python3-pip git
実行結果
python3-pip is already the newest version (25.1.1+dfsg-1+rpt1).
python3-pip set to manually installed.
git is already the newest version (1:2.47.3-0+deb13u1).
git set to manually installed.
Summary:
Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 0
2. 再起動(重要)
権限設定を反映させるため、一度再起動します。
sudo reboot
フェーズ2:USBセンサーの固定化 (udev設定)
オムロンセンサーをどのUSBポートに挿しても、常に /dev/ttyUSB_OMRON という名前で認識されるようにします。
1. ルールファイルの作成
sudo vi /etc/udev/rules.d/99-omron-2jciebu.rules
2. 以下の内容を貼り付け
# オムロン環境センサー(2JCIE-BU) ID=0590:00d4
# 1. ドライバの割り当て
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0590", ATTRS{idProduct}=="00d4", RUN+="/sbin/modprobe ftdi_sio", RUN+="/bin/sh -c 'echo 0590 00d4 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id'"
# 2. デバイス名の固定 (/dev/ttyUSB_OMRON)
ACTION=="add", KERNEL=="ttyUSB*", ATTRS{idVendor}=="0590", ATTRS{idProduct}=="00d4", SYMLINK+="ttyUSB_OMRON", MODE="0666"
3. 設定の反映
sudo udevadm control --reload-rules
sudo udevadm trigger
★ここでセンサーをUSBポートに挿してください。
ls -l /dev/ttyUSB_OMRON
を実行し、以下のようにファイルが表示されれば成功です。
lrwxrwxrwx 1 root root 7 Jan 31 13:40 /dev/ttyUSB_OMRON -> ttyUSB0
フェーズ3:プロジェクトフォルダと設定の作成
1. ディレクトリ作成
mkdir -p ~/iot-factory/mosquitto/config
mkdir -p ~/iot-factory/mosquitto/data
mkdir -p ~/iot-factory/mosquitto/log
mkdir -p ~/iot-factory/telegraf
mkdir -p ~/iot-factory/timescaledb
mkdir -p ~/iot-factory/grafana
mkdir -p ~/iot-factory/metabase
cd ~/iot-factory
2. docker-compose.yml の作成
vi docker-compose.yml
貼り付け内容:
services:
# --- 1. MQTT Broker ---
mosquitto:
image: eclipse-mosquitto:latest
container_name: mosquitto
restart: always
ports:
- "1883:1883"
volumes:
- ./mosquitto/config:/mosquitto/config
- ./mosquitto/data:/mosquitto/data
- ./mosquitto/log:/mosquitto/log
# --- 2. Database (TimescaleDB / PostgreSQL) ---
timescaledb:
image: timescale/timescaledb:latest-pg16
container_name: timescaledb
restart: always
environment:
- POSTGRES_PASSWORD=password1234
- POSTGRES_USER=postgres
- POSTGRES_DB=factory_iot
ports:
- "5432:5432"
volumes:
- ./timescaledb:/var/lib/postgresql/data
# --- 3. Data Collector (Telegraf) ---
telegraf:
image: telegraf:latest
container_name: telegraf
restart: always
depends_on:
- mosquitto
- timescaledb
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
environment:
- POSTGRES_PASSWORD=password1234
# --- 4. Visualization A (Grafana) ---
grafana:
image: grafana/grafana:latest
container_name: grafana
restart: always
ports:
- "3000:3000"
volumes:
- ./grafana:/var/lib/grafana
# --- 5. Visualization B (Metabase) ---
metabase:
image: metabase/metabase:latest
container_name: metabase
restart: always
ports:
- "3001:3000" # ホストの3001番を使用
volumes:
- ./metabase:/metabase-data
environment:
- MB_DB_FILE=/metabase-data/metabase.db
3. Mosquitto設定ファイル
vi mosquitto/config/mosquitto.conf
貼り付け内容:
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log
listener 1883
allow_anonymous true
4. Telegraf設定ファイル
vi telegraf/telegraf.conf
貼り付け内容:
※ここで「どの情報をDBのインデックス(タグ)にするか」を定義します。
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
flush_interval = "10s"
# --- Input: MQTT ---
[[inputs.mqtt_consumer]]
servers = ["tcp://mosquitto:1883"]
topics = ["factory/sensor/env"]
data_format = "json"
# ★ここが重要:以下のキーは「数値」ではなく「属性(タグ)」としてDBに保存されます
tag_keys = [
"company_name",
"office_name",
"factory_name",
"line_name",
"equipment_name",
"sensor_id"
]
# 文字列フィールドの扱い
json_string_fields = ["status"]
# --- Output: TimescaleDB (PostgreSQL) ---
[[outputs.postgresql]]
connection = "host=timescaledb user=postgres password=password1234 dbname=factory_iot sslmode=disable"
schema = "public"
tags_as_foreign_keys = false
# 自動テーブル作成テンプレート(TimescaleDB用)
create_templates = [
'''CREATE TABLE {{ .table }} ({{ .columns }})''',
'''SELECT create_hypertable('{{ .table }}', 'time', chunk_time_interval => INTERVAL '7 days', if_not_exists => TRUE)'''
]
5. コンテナ起動
docker compose up -d
自分の環境ではmicroSD + Wi-Fiは失敗して、SSD(USB接続) + 有線LANは、上記のコマンドで一気にいけました。
どちらかというとネットワーク環境の影響が大きいかなーって印象です。
実行結果(失敗)
[+] up 18/55
[+] up 18/55escale/timescaledb:latest-pg16 [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 10.7s
[+] up 18/55escale/timescaledb:latest-pg16 [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 10.8s
[+] up 18/55escale/timescaledb:latest-pg16 [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 10.9s
[+] up 18/55escale/timescaledb:latest-pg16 [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 11.0s
[+] up 18/55escale/timescaledb:latest-pg16 [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 11.1s
[+] up 18/55escale/timescaledb:latest-pg16 [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 11.2s
[+] up 18/55escale/timescaledb:latest-pg16 [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 11.3s
[+] up 18/55escale/timescaledb:latest-pg16 [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 11.4s
[+] up 18/55escale/timescaledb:latest-pg16 [⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 11.5s
[+] up 18/55escale/timescaledb:latest-pg16 [⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 11.6s
[+] up 18/55escale/timescaledb:latest-pg16 [⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 11.7s
[+] up 18/55escale/timescaledb:latest-pg16 [⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 11.8s
[+] up 18/55escale/timescaledb:latest-pg16 [⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 11.9s
[+] up 18/55escale/timescaledb:latest-pg16 [⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 12.0s
[+] up 18/55escale/timescaledb:latest-pg16 [⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 12.1s
[+] up 18/55escale/timescaledb:latest-pg16 [⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 12.2s
[+] up 18/55escale/timescaledb:latest-pg16 [⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 12.3s
[+] up 18/55escale/timescaledb:latest-pg16 [⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 12.4s
[+] up 18/55escale/timescaledb:latest-pg16 [⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 12.5s
[+] up 18/55escale/timescaledb:latest-pg16 [⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 12.6s
[+] up 18/55escale/timescaledb:latest-pg16 [⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 12.7s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 12.8s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 12.9s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 13.0s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 13.1s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 13.2s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 13.3s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 13.4s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 13.5s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 13.6s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 13.7s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 13.8s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 13.9s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 14.0s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 14.1s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 14.2s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 14.3s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 14.4s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 14.5s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 14.6s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 14.7s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 14.8s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 14.9s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 15.0s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 15.1s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 15.2s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 15.3s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 15.4s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 15.5s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 15.6s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 15.7s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 15.8s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 15.9s
[+] up 18/55escale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 16.0s
⠋ Image timescale/timescaledb:latest-pg16 [⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 16.0s
⠋ Image telegraf:latest [⣿⣿⣤⡀⣶⣀⣿⣿] 71.7MB / 169.4MB Pulling 16.0s
⠋ Image metabase/metabase:latest [⠀⠀⠀⠀⠀⠀⠀⣿] Pulling 16.0s
⠋ Image grafana/grafana:latest [⣿⣿⣿⣿⣿⠀⣿⣦⠀⠀] Pulling 16.0s
✔ Image eclipse-mosquitto:latest Pulled 10.6s
failed to copy: httpReadSeeker: failed open: failed to do request: Get "https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/d0/d029414ffab73c2cdc0ed11f28215fa32c6e67035a81da529c1cfadeae1de11f/data?expires=1769837877&signature=IB3wMVoY3z7X0b7sMaceXYYpNro%3D&version=3": dial tcp: lookup production.cloudflare.docker.com on 192.168.1.1:53: read udp 192.168.1.13:46014->192.168.1.1:53: i/o timeout
処理がタイムアウトしてしまったので、geminiに聞いたところ
このエラーは 「DNSルックアップエラー(インターネット上の住所検索のタイムアウト)」 です。 具体的には、production.cloudflare.docker.com というDockerのイメージ保管場所を探そうとした際に、お使いのルーター(192.168.1.1)からの応答が遅すぎてタイムアウトしています。
ラズパイで大きなコンテナ(MetabaseやTimescaleDBなど)を一度にダウンロードしようとすると、ネットワーク負荷でこのエラーがよく発生します。
以下の手順でDNS設定を一時的に変更し、一つずつダウンロードすることで解決できます。
ということなので、DNSの設定を変更して1つずつダウンロードします。
失敗したときは
手順1:DNSサーバーの一時変更(GoogleのDNSを使う)
ラズパイがインターネット上の住所を探す際、ルーターではなくGoogleのサーバー(8.8.8.8)を使うように設定します。
1. ターミナルで以下のコマンドを実行して設定ファイルを開きます。
sudo vi /etc/resolv.conf
2. ファイルの中身を書き換えます。
もともと nameserver 192.168.1.1 などと書かれている行の一番上に、以下の一行を追加してください。
nameserver 8.8.8.8
例:
nameserver 8.8.8.8
nameserver 192.168.1.1
3. 保存して終了します。
手順2:イメージを1つずつダウンロードする
docker compose up -d はすべてを同時に行おうとして回線が詰まることがあるため、一つずつ手動でダウンロード(Pull)します。
以下のコマンドを順番に実行し、エラーが出ないか確認してください。
cd ~/iot-factory
1. Mosquitto (軽量)
docker compose pull mosquitto
[+] pull 1/1
✔ Image eclipse-mosquitto:latest Pulled 2.3
2. Telegraf (中量)
docker compose pull telegraf
[+] pull 1/7
✔ Image telegraf:latest Pulled 13.8
3. TimescaleDB (重量)
docker compose pull timescaledb
[+] pull 20/20
✔ Image timescale/timescaledb:latest-pg16 Pulled 38.7s
4. Grafana (重量)
docker compose pull grafana
[+] pull 11/11
[+] pull 11/11ana/grafana:latest Pulled 33.9
✔ Image grafana/grafana:latest Pulled 33.9s
5. Metabase (超重量 - ここが一番時間がかかります)
docker compose pull metabase
[+] pull 9/9
[+] pull 9/9tabase/metabase:latest Pulled 64.5
✔ Image metabase/metabase:latest Pulled 64.5s
手順3:再実行
すべてダウンロードし終わったら(エラーが出なくなったら)、再度起動コマンドを実行します。
docker compose up -d
実行結果
[+] up 1/5
[+] up 1/5k iot-factory_default Created 0.1
[+] up 1/5k iot-factory_default Created 0.1
[+] up 1/5k iot-factory_default Created 0.1
[+] up 1/5k iot-factory_default Created 0.1
[+] up 2/5k iot-factory_default Created 0.1
✔ Network iot-factory_default Created 0.1[+] up 3/5er mosquitto Creating 0.5s
✔ Network iot-factory_default Created 0.1s✔ Container metabase Created 0.6
[+] up 5/6er mosquitto Creating 0.7s
✔ Network iot-factory_default Created 0.1s⠴ Container timescaledb Creating 0.6s
✔ Container mosquitto Created 0.7s
[+] up 5/6ner metabase Created 0.6
✔ Network iot-factory_default Created 0.1s✔ Container grafana Created 0.6
✔ Container mosquitto Created 0.7s✔ Container timescaledb Created 0.7
[+] up 6/6ner metabase Created 0.6
✔ Network iot-factory_default Created 0.1s✔ Container grafana Created 0.6
✔ Container mosquitto Created 0.7s✔ Container timescaledb Created 0.7
✔ Container metabase Created 0.6[+] up 6/6er telegraf Creating 0.2s
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6[+] up 6/6
✔ Network iot-factory_default Created 0.1s
✔ Container mosquitto Created 0.7s
✔ Container metabase Created 0.6s
✔ Container grafana Created 0.6s
✔ Container timescaledb Created 0.7s
✔ Container telegraf Created 0.2s
これで ✔ Container ... Created と表示されれば成功です。もしこれでも同じエラーが出る場合は、ラズパイのWi-Fi接続が不安定な可能性がありますので、一度ラズパイを再起動(sudo reboot)してから再度試してみてください。
状態を確認
docker compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
grafana grafana/grafana:latest "/run.sh" grafana 7 minutes ago Restarting (1) 18 seconds ago
metabase metabase/metabase:latest "/app/run_metabase.sh" metabase 7 minutes ago Up 7 minutes 0.0.0.0:3001->3000/tcp, [::]:3001->3000/tcp
mosquitto eclipse-mosquitto:latest "/docker-entrypoint.…" mosquitto 7 minutes ago Up 7 minutes 0.0.0.0:1883->1883/tcp, [::]:1883->1883/tcp
telegraf telegraf:latest "/entrypoint.sh tele…" telegraf 7 minutes ago Up 7 minutes 8092/udp, 8125/udp, 8094/tcp
timescaledb timescale/timescaledb:latest-pg16 "docker-entrypoint.s…" timescaledb 7 minutes ago Up 7 minutes 0.0.0.0:5432->5432/tcp, [::]:5432->5432/tcp
Grafanaが再起動を繰り返しているようです。
ログの確認
docker compose logs grafana
実行結果
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
ログを見ると「フォルダの書き込み権限エラー(Permission denied)」 のようです。
Grafanaのコンテナ内部では ID 472 というユーザーで動いていますが、ラズパイ側のフォルダ(~/iot-factory/grafana)が root や pi ユーザーの持ち物になっているため、Grafanaがデータを書き込めずにエラーで再起動を繰り返しています。
エラー解消手順
cd ~/iot-factory
sudo chown -R 472:472 ./grafana
docker compose restart grafana
[+] restart 0/1
⠸ Container grafana Restarting 0.3s
再度、状態を確認します。
docker compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
grafana grafana/grafana:latest "/run.sh" grafana 31 minutes ago Up About a minute 0.0.0.0:3000->3000/tcp, [::]:3000->3000/tcp
metabase metabase/metabase:latest "/app/run_metabase.sh" metabase 31 minutes ago Up 31 minutes 0.0.0.0:3001->3000/tcp, [::]:3001->3000/tcp
mosquitto eclipse-mosquitto:latest "/docker-entrypoint.…" mosquitto 31 minutes ago Up 31 minutes 0.0.0.0:1883->1883/tcp, [::]:1883->1883/tcp
telegraf telegraf:latest "/entrypoint.sh tele…" telegraf 31 minutes ago Up 31 minutes 8092/udp, 8125/udp, 8094/tcp
timescaledb timescale/timescaledb:latest-pg16 "docker-entrypoint.s…" timescaledb 31 minutes ago Up 30 minutes 0.0.0.0:5432->5432/tcp, [::]:5432->5432/tcp
Grafanaへのアクセス
http://[ラズパイのホスト名orIPアドレス]:3000/
Metabaseへアクセス
http://[ラズパイのホスト名orIPアドレス]:3001/

フェーズ4:センサー制御プログラムの作成
Pythonを使って、センサーからデータを取得し、設定ファイルのメタデータを付与してMQTTへ送信する仕組みを作ります。
1. Python仮想環境とライブラリ
cd ~/iot-factory
python3 -m venv venv
source venv/bin/activate
pip install paho-mqtt pyserial configparser
実行結果
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting paho-mqtt
Downloading https://www.piwheels.org/simple/paho-mqtt/paho_mqtt-2.1.0-py3-none-any.whl (67 kB)
Collecting pyserial
Downloading https://www.piwheels.org/simple/pyserial/pyserial-3.5-py2.py3-none-any.whl (90 kB)
Collecting configparser
Downloading https://www.piwheels.org/simple/configparser/configparser-7.2.0-py3-none-any.whl (17 kB)
Installing collected packages: pyserial, paho-mqtt, configparser
Successfully installed configparser-7.2.0 paho-mqtt-2.1.0 pyserial-3.5
2. 設定ファイル (config.ini) の作成
ここで会社名などを自由に設定します。
vi config.ini
貼り付け内容:
[MQTT]
broker = localhost
port = 1883
topic = factory/sensor/env
client_id = pi_sensor_01
[Serial]
port = /dev/ttyUSB_OMRON
baudrate = 115200
timeout = 1
[App]
# 計測間隔(秒)
interval = 10
[Metadata]
# ★ここを変えるとDBの属性が変わります
company_name = CompanyA
office_name = Tokyo_Office
factory_name = Building_A
line_name = Assembly_Line_1
equipment_name = Soldering_Robot_05
3. Pythonスクリプト (sensor_app.py) の作成
すべてのセンサー値を取得し、CRC計算を行う完全版コードです。
vi sensor_app.py
貼り付け内容:
import serial
import time
import struct
import json
import configparser
import argparse
import os
import sys
import paho.mqtt.client as mqtt
from datetime import datetime
# --- 1. 設定ファイルの読み込み診断 ---
config = configparser.ConfigParser()
# スクリプトと同じ場所にある config.ini を探す
current_dir = os.path.dirname(os.path.abspath(__file__))
config_path = os.path.join(current_dir, 'config.ini')
print(f"[INFO] Loading config from: {config_path}")
if not os.path.exists(config_path):
print(f"[ERROR] Config file NOT found at: {config_path}")
print("Please make sure 'config.ini' is in the same directory.")
sys.exit(1)
# 読み込み実行
read_files = config.read(config_path)
if not read_files:
print("[ERROR] Config file found but failed to read. Check permissions.")
sys.exit(1)
# セクション確認
if 'Metadata' not in config:
print("\n[ERROR] '[Metadata]' section is missing!")
print(f"Found sections: {config.sections()}")
print("Please check config.ini content.")
sys.exit(1)
# メタデータ取得
METADATA = dict(config.items('Metadata'))
print(f"[INFO] Metadata loaded: {METADATA}")
# 設定値の取得
MQTT_BROKER = config.get('MQTT', 'broker', fallback='localhost')
MQTT_PORT = config.getint('MQTT', 'port', fallback=1883)
MQTT_TOPIC = config.get('MQTT', 'topic', fallback='factory/sensor/env')
SERIAL_PORT = config.get('Serial', 'port', fallback='/dev/ttyUSB_OMRON')
INTERVAL = config.getint('App', 'interval', fallback=10)
def calc_crc(payload):
crc = 0xFFFF
for byte in payload:
crc = crc ^ byte
for _ in range(8):
if crc & 1:
crc = (crc >> 1) ^ 0xA001
else:
crc = crc >> 1
return crc
def get_full_data(ser):
command = b'\x52\x42\x05\x00\x01\x21\x50'
crc = calc_crc(command)
command += struct.pack('<H', crc)
ser.reset_input_buffer()
ser.write(command)
time.sleep(0.2)
response = ser.read(64)
if len(response) < 10: return None
try:
if response[0] != 0x52 or response[1] != 0x42: return None
data_segment = response[8:8+16]
if len(data_segment) < 16: return None
vals = struct.unpack('<hhhihhh', data_segment)
data = {
"temperature": vals[0] / 100.0,
"humidity": vals[1] / 100.0,
"light": vals[2],
"pressure": vals[3] / 1000.0,
"noise": vals[4] / 100.0,
"etvoc": vals[5],
"eco2": vals[6],
}
return data
except Exception as e:
print(f"Parse Error: {e}")
return None
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--debug', action='store_true', help='Debug mode')
args = parser.parse_args()
client = None
client_id_val = config.get('MQTT', 'client_id', fallback='pi_sensor')
if args.debug:
print("\n=== DEBUG MODE STARTED ===")
print(f"Target Serial: {SERIAL_PORT}")
else:
print("Sensor App Started...")
# ★★★ 修正箇所: CallbackAPIVersion.VERSION2 を指定 ★★★
try:
client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2, client_id=client_id_val)
except AttributeError:
# 万が一古いバージョンのライブラリだった場合の救済措置
client = mqtt.Client(client_id=client_id_val)
while True:
try:
client.connect(MQTT_BROKER, MQTT_PORT, 60)
client.loop_start()
break
except:
print("Waiting for MQTT...")
time.sleep(5)
try:
ser = serial.Serial(SERIAL_PORT, config.getint('Serial', 'baudrate', fallback=115200), timeout=1)
except Exception as e:
print(f"[FATAL] Serial Connection Error: {e}")
print(f"Check if {SERIAL_PORT} exists.")
return
try:
while True:
sensor_values = get_full_data(ser)
if sensor_values:
payload = sensor_values.copy()
payload.update(METADATA)
if args.debug:
print(f"[{datetime.now().strftime('%H:%M:%S')}] Data: {json.dumps(payload, ensure_ascii=False)}")
else:
msg = json.dumps(payload)
client.publish(MQTT_TOPIC, msg)
print(f"Sent: {msg}")
else:
if args.debug: print(".", end="", flush=True)
time.sleep(INTERVAL)
except KeyboardInterrupt:
print("\nStopping...")
finally:
ser.close()
if client:
client.loop_stop()
client.disconnect()
if __name__ == "__main__":
main()
フェーズ5:自動起動設定 (Systemd)
ラズパイの電源を入れたら、Pythonスクリプトが勝手に動き出すように設定します。
- Unitファイルの作成
sudo vi /etc/systemd/system/iot-sensor.service
ファイルの中身は以下のようになります。
piというところは、自分のログイン名に変えてください。
- User=pi → User=[自分のログイン名]
- /home/pi/ → /home/[自分のログイン名]/
です。ディレクトリ指定は3か所ほどあります。
[Unit]
Description=Omron Sensor to MQTT Service
After=network.target docker.service
# USBデバイスが見えてから起動
Requires=dev-ttyUSB_OMRON.device
After=dev-ttyUSB_OMRON.device
[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/iot-factory
ExecStart=/home/pi/iot-factory/venv/bin/python3 /home/pi/iot-factory/sensor_app.py
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
- 有効化と起動
sudo systemctl daemon-reload
sudo systemctl enable iot-sensor.service
Created symlink '/etc/systemd/system/multi-user.target.wants/iot-sensor.service' → '/etc/systemd/system/iot-sensor.service'.
sudo systemctl start iot-sensor.service
-
状態確認
systemctl status iot-sensor.serviceを実行し、緑色の丸(Active)でログにSent: {...}と出ていれば成功です。
systemctl status iot-sensor.service
● iot-sensor.service - Omron Sensor to MQTT Service
Loaded: loaded (/etc/systemd/system/iot-sensor.service; enabled; preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sat 2026-01-31 15:19:15 JST; 10s ago
Invocation: f227a2e18da64adca1a0d03b39a309c9
Process: 9552 ExecStart=/home/nomura/iot-factory/venv/bin/python3 /home/nomura/iot-factory/sensor_app.py>
Main PID: 9552 (code=exited, status=217/USER)
CPU: 7ms
Jan 31 15:19:25 raspi5 systemd[1]: iot-sensor.service: Scheduled restart job, restart counter is at 2.
Jan 31 15:19:25 raspi5 systemd[1]: Started iot-sensor.service - Omron Sensor to MQTT Service.
フェーズ6:ツールの接続設定
PCのブラウザからラズパイにアクセスして設定を行います(ラズパイのIPアドレスを 192.168.X.X とします)。
1. Grafana の設定
-
URL:
http://[ラズパイのホスト名orIPアドレス]:3000/(ID: admin / PW: admin)
- 初回ログインの時は、パスワードの再設定を求められます
- データソース追加:
- [Connections] -> [Add new connection] -> PostgreSQL を選択
画面
- Host:
timescaledb:5432 - Database:
factory_iot - User:
postgres - Password:
password1234 - TLS/SSL Mode:
disable - [Save & test] をクリック。「Database Connection OK」なら成功。
-
可視化: Explore画面でSQLを選択し、
SELECT * FROM mqtt_consumerでデータが見えます。
2. Metabase の設定
※起動まで数分かかる場合があります。
-
URL:
http://**[ラズパイのホスト名orIPアドレス]**:3001/ - セットアップ: 言語を選択後、データソース設定へ。
- データベース追加:
- データベースの種類: PostgreSQL
- 表示名: Factory IoT DB (任意)
- ホスト:
timescaledb(※Docker内部名で解決できない場合、ラズパイのIPアドレスを指定) - ポート:
5432 - データベース名:
factory_iot - ユーザー名:
postgres - パスワード:
password1234
-
完了: 自動的に
mqtt_consumerというテーブルが読み込まれ、GUIで「工場別」「ライン別」の分析ができるようになります。
運用・変更について
-
工場情報の変更:
~/iot-factory/config.iniを編集し、sudo systemctl restart iot-sensorするだけです。 -
データ確認: ターミナルで
docker compose logs -f telegrafを見ると、DBへの書き込み状況が確認できます。
これで、完全自動で立ち上がり、メタデータ付きで高度な分析が可能なオンプレミスIoTシステムの完成です。









