Cctv recording and playback (work in progress)

I had to re-read some of the previous posts from last year to remember what we did.

  • Firstly, you have to setup static hosting from node-red by configuring httpStatic in the setting.js file.
  • Then you have to set the values of static path/root in the subflow to match those values.

The current problem is that your system is setup differently than mine and you probably do not have an external usb 6tb hard drive mounted at /run/media/system/surveillance1 as I do. The values are configurable so that you can make it match your specific setup of where you would want to write the data.

To clarify, I have a hard drive mounted at a location that I am using to write large quantities of video.

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        30G  9.3G   19G  34% /
devtmpfs        3.5G     0  3.5G   0% /dev
tmpfs           3.7G  904K  3.7G   1% /dev/shm
tmpfs           1.5G  932K  1.5G   1% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
/dev/mmcblk0p1  253M   31M  222M  13% /boot
/dev/sda1       5.5T  4.2T 1015G  81% /run/media/system/surveillance1
tmpfs           739M     0  739M   0% /run/user/1000

So, in the settings.js file, I added some configuration to tell node-red to map a location there and host files from it in the httpStatic sections.

httpStaticRoot: '/static/',
httpStatic: [
        { path: '/run/media/system/surveillance1/cctv/recordings/', root: '/recordings/' }
    ],

Using those values, I added that to the subflow node so that I can write to the correct location.

Currently, I am writing video 24/7 for 11 main streams and it seems to work ok.

2 Likes