===== Notes on using the Seek Scan thermal camera =====
{{:wiki:screenshot_20250223_102424-1.png|Thermal image showing the top of a water heater. It is mostly orange}}Camera: Seek Thermal Seek Scan
PN: YW-AAA
My configuration: raspberry pi 4 64-bit
- Download, build, and install libseek-thermal
- [[https://github.com/OpenThermal/libseek-thermal]]
- Install v4l2loopback
-
sudo apt install v4l2loopback
- Make udev rule
-
SUBSYSTEM=="usb", ATTRS{idVendor}=="289d", ATTRS{idProduct}=="0010", MODE="0666", GROUP="users"
- Download mediamtx
- [[https://github.com/bluenviron/mediamtx]]
- Add camera to mediamtx.yml
-
paths:
cam:
runOnInit: ffmpeg -f v4l2 -i /dev/video5 -c:v libx264 -pix_fmt yuv444p -crf 0 -f rtsp rtsp://localhost:$RTSP_PORT/$MTX_PATH
- Create v4l2 device. I'm using /dev/video5
-
sudo modprobe v4l2loopback video_nr=5 card_label="seek" exclusive_caps=1
- Run seek_viewer
-
seek_viewer --colormap=2 --mode=v4l2 --output=/dev/video5
- Colormap 2 is the jet colormap from opencv.
- [[https://docs.opencv.org/4.x/d3/d50/group__imgproc__colormap.html#ga9a805d8262bcbe273f16be9ea2055a65]]
- Run mediamtx
-
./mediamtx
- Open in chrome
- [[http://192.168.1.100:8889/cam/]]
- Open in VLC
-
rtsp://192.168.1.100:8554/cam
- Open in chrome android
- [[http://192.168.1.100:8888/cam/]]
==== Misc ====
lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 008: ID 5149:13d3 Image Processor USB 2.0 PC Cam
Bus 001 Device 007: ID 289d:0010 Seek Thermal, Inc. PIR206 Thermal Camera [Seek Compact]
Bus 001 Device 006: ID 1a40:0801 Terminus Technology Inc. USB 2.0 Hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
udev info
DEVTYPE=usb_device
DRIVER=usb
PRODUCT=289d/10/100
TYPE=0/0/0
BUSNUM=001
DEVNUM=007
MAJOR=189
MINOR=6
ACTION=add
SUBSYSTEM=usb
TAGS=:seat:
ID_BUS=usb
ID_MODEL=PIR206_Thermal_Camera
ID_MODEL_ENC=PIR206\x20Thermal\x20Camera
ID_MODEL_ID=0010
ID_SERIAL=Seek_Thermal__Inc._PIR206_Thermal_Camera
ID_VENDOR=Seek_Thermal__Inc.
ID_VENDOR_ENC=Seek\x20Thermal\x2c\x20Inc.
ID_VENDOR_ID=289d
ID_REVISION=0100
ID_USB_MODEL=PIR206_Thermal_Camera
ID_USB_MODEL_ENC=PIR206\x20Thermal\x20Camera
ID_USB_MODEL_ID=0010
ID_USB_SERIAL=Seek_Thermal__Inc._PIR206_Thermal_Camera
ID_USB_VENDOR=Seek_Thermal__Inc.
ID_USB_VENDOR_ENC=Seek\x20Thermal\x2c\x20Inc.
ID_USB_VENDOR_ID=289d
ID_USB_REVISION=0100
ID_USB_INTERFACES=:fff000:fff001:
ID_VENDOR_FROM_DATABASE=Seek Thermal, Inc.
ID_MODEL_FROM_DATABASE=PIR206 Thermal Camera [Seek Compact]
ID_PATH=platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.1.1
ID_PATH_TAG=platform-fd500000_pcie-pci-0000_01_00_0-usb-0_1_1_1
CURRENT_TAGS=:seat:
ID_FOR_SEAT=usb-platform-fd500000_pcie-pci-0000_01_00_0-usb-0_1_1_1
Unload kernel module index.
Unloaded link configuration context.
==== go2rtc ====
I initially tried this setup using go2rtc instead of mediamtx, but ran in to a problem where only 1 client could join and only at the start of the stream. See [[https://github.com/RPi-Distro/ffmpeg/pull/10]]
==== Frigate ====
If you want to add this camera to Frigate, the rtsp stream needs to be in yuv420p format.
This requires the video to be in a resolution divisible by 2 (the default resolution is 154x207).
I used the answer from [[paths: # example: # my_camera: # source: rtsp://my_camera cam: runOnInit: ffmpeg -f v4l2 -i /dev/video5 -vf "crop=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -pix_fmt yuv420p -preset ultrafast -f rtsp rtsp://localhost:$RTSP_PORT/$MTX_PATH # Settings under path "all_others" are applied to all paths that|here]] which will crop it to 154x206.
cam:
runOnInit: ffmpeg -f v4l2 -i /dev/video5 -vf "crop=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -pix_fmt yuv420p -preset ultrafast -f rtsp rtsp://localhost:$RTSP_PORT/$MTX_PATH
In the Frigate config:
Seek:
ffmpeg:
inputs:
- path: rtsp:192.168.1.100:8554/cam
roles:
- record
detect:
enabled: false
==== Visual camera ====
The Seek Scan includes a visual camera as well. It's not very high quality.
On my system it was automatically set up as /dev/video0
Use the [[https://github.com/bluenviron/mediamtx?tab=readme-ov-file#generic-webcam|default usb webcam config.]]
Seek_viewer has a default image rotation. To have the visual camera match the rotation of the thermal camera, I used the transpose=2 option.
vcam:
runOnInit: ffmpeg -f v4l2 -i /dev/video0 -vf "transpose=2" -c:v libx264 -pix_fmt yuv420p -preset ultrafast -b:v 600k -f rtsp rtsp://localhost:$RTSP_PORT/$MTX_PATH