User Tools

Notes on using the Seek Scan thermal camera

Thermal image showing the top of a water heater. It is mostly orangeCamera: Seek Thermal Seek Scan

PN: YW-AAA

My configuration: raspberry pi 4 64-bit

  1. Download, build, and install libseek-thermal
  2. Install v4l2loopback
    1.  sudo apt install v4l2loopback
  3. Make udev rule
    1. /etc/udev/rules.d/53-seek.rules
      SUBSYSTEM=="usb", ATTRS{idVendor}=="289d", ATTRS{idProduct}=="0010", MODE="0666", GROUP="users"
  4. Download mediamtx
  5. Add camera to mediamtx.yml
    1. 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
  6. Create v4l2 device. I'm using /dev/video5
    1. sudo modprobe v4l2loopback video_nr=5 card_label="seek" exclusive_caps=1
  7. Run seek_viewer
    1.  seek_viewer --colormap=2 --mode=v4l2 --output=/dev/video5
    2. Colormap 2 is the jet colormap from opencv.
  8. Run mediamtx
    1.  ./mediamtx
  9. Open in chrome
  10. Open in VLC
    1.  rtsp://192.168.1.100:8554/cam
  11. Open in chrome android

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 154×207).

I used the answer from here which will crop it to 154×206.

mediamtx.yml
  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 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.

mediamtx.yml
  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