summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD Delmar Davis <don@suspectdevices.com>2025-06-30 09:02:08 -0700
committerD Delmar Davis <don@suspectdevices.com>2025-06-30 09:02:08 -0700
commit0d49935424c132615ab890b10740b8430b0ec69e (patch)
tree5c36fde89229a37e1d64ab6c0840b132a9154f14
parent56f552265ddd0ee6f35f42342236d5f17280754b (diff)
Flexh in merlot changes
-rw-r--r--docs/buildnotes/buster-motion-and-bookworm.md74
-rw-r--r--docs/rethinkeverything/kubernetes/ubuntu.md4
2 files changed, 60 insertions, 18 deletions
diff --git a/docs/buildnotes/buster-motion-and-bookworm.md b/docs/buildnotes/buster-motion-and-bookworm.md
index 62aec29..ad1be63 100644
--- a/docs/buildnotes/buster-motion-and-bookworm.md
+++ b/docs/buildnotes/buster-motion-and-bookworm.md
@@ -1,45 +1,87 @@
-### References
+# Install motion on raspberry pi running debian bookworm
-- <https://forums.raspberrypi.com/viewtopic.php?t=359023>
-- <https://pimylifeup.com/raspberry-pi-webcam-server/>
-- <https://github.com/Motion-Project/motion/discussions/1753>
-- <https://www.raspberrypi.com/documentation/computers/camera_software.html#getting-started>
-
-### Raw Dump of motion install
+Install and check the status of the motion service
```sh
wget https://github.com/Motion-Project/motion/releases/download/release-4.6.0/pi_bookworm_motion_4.6.0-1_arm64.deb
dpkg -i pi_bookworm_motion_4.6.0-1_arm64.deb
apt --fix-broken install
systemctl status motion
+```
+
+Make sure the camera works and adjust firmware config based on what libcamera has to say about it.
+
+```sh
libcamera-vid -t 20000 libcamera-vid --codec libav -o test.mp4
rpicam-still -v -o test.jpg
rpicam-vid -t 10s --codec libav -o test.mp4
nano /boot/firmware/config.txt
+...
+dtoverlay=ov5647
+...
reboot
+```
+
+Check that the camera still works (also check motion service)
+
+```sh
rpicam-vid -t 10s --codec libav -o test.mp4
rpicam-hello
-motion --version
+systemctl status motion
+```
+
+Install libcamerify and edit the motion.service definition.
+
+```sh
apt install libcamera-tools libcamera-dev libcamera-v4l2
libcamerify
nano /lib/systemd/system/motion.service
+...
+[Service]
+User=motion
+UMask=002
+EnvironmentFile=-/etc/default/motion
+#ExecStart=/usr/bin/motion
+ExecStart=/usr/bin/libcamerify /usr/bin/motion
+...
systemctl restart motion
systemctl daemon-reload
systemctl restart motion
systemctl status motion
-netstat -tunlp
-nano /etc/motion/motion.conf
-systemctl restart motion
+```
+
+Make the system allow remote connections and fix location for output.
+
+```sh
nano /etc/motion/motion.conf
-ls -ls /etc/motion/
-chown motion:adm motion.conf
-chown motion:adm /etc/motion/motion.conf
-chmod +w /etc/motion/motion.conf
+...
+# Target directory for pictures, snapshots and movies
+target_dir /var/lib/motion
+...
+# Restrict webcontrol connections to the localhost.
+webcontrol_localhost off
+...
+# Restrict stream connections to the localhost.
+stream_localhost off
+...
+^X
systemctl restart motion
systemctl status motion
netstat -tunlp
+```
+
+Probably want to put mount /var/lib/motion on a fileserver.
+
+```sh
mount utah:/tank/motion/buster /var/lib/motion
grep motion /etc/mtab>>/etc/fstab
mount -a
-cat /etc/fstab
```
+
+## References
+
+- <https://forums.raspberrypi.com/viewtopic.php?t=359023>
+- <https://pimylifeup.com/raspberry-pi-webcam-server/>
+- <https://github.com/Motion-Project/motion/discussions/1753>
+- <https://www.raspberrypi.com/documentation/computers/camera_software.html#getting-started>
+
diff --git a/docs/rethinkeverything/kubernetes/ubuntu.md b/docs/rethinkeverything/kubernetes/ubuntu.md
index 06c0468..997bd04 100644
--- a/docs/rethinkeverything/kubernetes/ubuntu.md
+++ b/docs/rethinkeverything/kubernetes/ubuntu.md
@@ -1,6 +1,6 @@
-YOU ARE HERE FLESHING THIS IN
+# YOU ARE HERE FLESHING THIS IN
-```
+```sh
apt update && apt upgrade -y
apt install apt-transport-https software-properties-common ca-certificates socat wget curl nano -y
swapoff -a