Home Surveillance System (HSS)

Thanks, that is one of the ones that turned up in my Google search. I'm going to pass this along to the organizers of our reunion, might help them share the photos from the event.

I see you've updated the HSS json file from what I downloaded initially. Could you clarify a bit about how to best upgrade?

My guess would be to delete the old flow, import the new, deploy, and repeat steps 1 & 2 of the HSS Setup SAS tab and the first step of the HSS Initialization tab. Did I miss anything? or is there a better way?

Yes, that's exactly where the surgery needs to take place. You see those coco nodes (they are in two subflows, one for ip cams and one for other cam types). Instead of using the coco node you can send the image data to your external AI subsystem and return the resulting annotated image back with message properties holding detected object types. In addition, you also have to check the other nodes that are filtering out the object types of interest since those are configured according to the message properties provided by the coco node. In yor case, I assume you use ip cams, the subflow "IP CAM Object Detection" would need to be modified or replaced

The best way is to switch on the 'projects' facility in Node-RED then you could create a new project and download the latest json file to it. This means you can switch between the two (or more) projects anytime you like, so if something didn't work - you could switch back to the one that did. There are details on how to do this on the Forum, but basically you need to edit the settings.js file which is located at...

/home/pi/.node-red/settings.js

Scroll down and change the line that starts with enabled: to true,

        projects: {
            /** To enable the Projects feature, set this value to true */
            enabled: true,
            workflow: {
                /** Set the default projects workflow mode.
                 *  - manual - you must manually commit changes
                 *  - auto - changes are automatically committed
                 * This can be overridden per-user from the 'Git config'
                 * section of 'User Settings' within the editor
                 */
                mode: "manual"
            }

You can also select a different editor, like the Monaco editor that has text highlighting.

EDIT: Hi @wb666greene I've added your question to the FAQ section on the HSS website.

SFG is a brilliant piece of software and would be ideal for collecting and displaying your reunion photos.

All you need to do is create a folder on your web server (it must be capable of interpreting PHP) and upload SFG to it. Then drop the .jpegs into it and then sit back and let the 'magic' happen.

There are tons of settings in SFG that will (if you want to) allow you to customise it to suit your needs.

I can fully agree to what David wrote about using 'projects', it is really wonderful. In addition I just would like to add that if you have added or modified some stuff yourself (additional tabs, changed features, your own ip cams configured etc etc) you should export those tabs separately and then import them to the new flow. This is how I have found it the most convinient way to work. Like if I have modified the settings for "IP CAM11", I export that tab and then import it in the new flow, eventually compare the two and then delete the default. Also don't forget to configure your credentials for the Telegram and Email nodes in "HSS Notifications" if you use those

Thanks guys, Looks like a good time to dive into the projects feature.

If and when I get to that point, I'll likely be asking for some help in formatting the output mqtt message as currently I don't detect anything but "person" as I really don't see how detecting other objects does anything useful for a home security system.

This is using some very advanced features of node-red so its going to take a bit of playing around. A quick look at the IP Cam Object Detection sub-flow tells me I've a lot to learn!

Quickly hit my first problem. I edited hss_config_basic.txt to replace Camera-4 with the rtsp URL for one of my test IP cameras (5 M pixel, noname from China via Amazon). This URL plays in VLC, I believe the camera is h.264

I made cam3 stanza look like this:

# --------------------------------
        "cam4": {
            "type": "IP cam",
            "url": "rtsp://admin:aixyaCAm@192.168.2.26:554/stream0?username=admin&password=CE04588A",
            "rotation": "0deg",
            "comment": "Cheap 5 Mpixel RTSP IP cam"
        }

Any idea what is wrong? I note that all the examples are http cameras or files, are rtsp streams not supported?

Only feeds from http cameras are supported in the current release.

EDIT: I stand corrected on this - see Walter's response in the thread below.

Ok, looks like I am done for the time being then. I'll be awaiting the next release.

Tabs "IP CAM9" to "IP CAM12" are supporting rtsp streams

Is a bit manual editing needed, I could not find a better way to automate things, I really wish I could but for now, it is a bit like this unfortunately

You need to use one of the pre-configured IP CAMX tabs for that camera. Or create (copy) into a new tab like IP CAM13 etc, then in that insert the rtsp url similar to the others

In addition before it will work you will also have to:

  • edit your hss_config.txt file and add a section in there for the new camera, assuming "cam13"
# --------------------------------
        "cam13": {
            "type": "IP",
            "url": "/mp4frag/placeholder/hls.m3u8",
            "rotation": "0deg",
            "comment": "Cheap 5 Mpixel RTSP IP cam"
        },
  • in the tab "HSS Initialization" edit the function node "Build Name/value pairs for dropdowns" and add a section in here as well for the new camera
   if ( (cameras.hasOwnProperty('cam12')) && (cameras.cam12.url) ) {
      nv.push({ "Camera-12": "cam12" })
      i++
   }

   if ( (cameras.hasOwnProperty('cam13')) && (cameras.cam13.url) ) {
      nv.push({ "Camera-13": "cam13" })
      i++
   }

Deploy & run the initialization, you should then have the new camera (like cam13) in the drop-downs. Try to start the stream first and then you can select the camera to be presented to any of the monitors

If you have many rtsp cameras, you will have do this for each of them. The samples provided for cam9 - cam12 can of course be re-used, you just modify the url in the inject node for each camera in the respective tab. But if you have more than 4 rtsp cameras, you have to add tabs and modify the settings as described above. I do not know where the limit is, you can configure as many as you like, I do not know what the cpu load is when you start a stream from a rtsp camera, maybe it is not that high?

1 Like

I tend to agree. In some cases it could eventually be of interest to detect other families dogs. Or cars on your drive way, maybe combined with additional ANPR

1 Like

This looks like a good place to start, but where do I enter the "real" URL with username and password?

I'm lost with the /mp4frag/placeholder/hls.m3u8

This is just as it says, a placeholder for the actual m3u8 playlist that will be created once the streaming starts, don't worry about that (if you are interested, you can check the global hss.cameras.camXY context when a stream is running and you will see that the word "placeholder" has been replaced by a node id. This is a trick I use to be able to make a re-usable subflow)

The camera params are instead configured in the flow tab. See below the example for RedBull TV

Open the inject node and look att the params configured. Those are params needed for ffmpeg. In there you see the actual url, "http://.....", this is where you should put your "rtsp://......"

But, this might not be enough. I do not have any camera providing rtsp streams but there has been other discussions in here where the correct params when streaming rtsp has been published

Let me see if I can find them...

EDIT: Something like this I think might work:

The msg.action:

{"command":"start","args":["-loglevel","error","-nostats","-f","rtsp","-rtsp_transport","tcp","-re","-i","rtsp://admin:aixyaCAm@192.168.2.26:554/stream0?username=admin&password=CE04588A","-c:v","copy","-c:a","aac","-f","mp4","-movflags","+frag_keyframe+empty_moov+default_base_moof","pipe:1","-progress","pipe:3"]}

1 Like

Here's a useful link that should help people in finding out the stream-url for various IP cameras.
https://www.ispyconnect.com/cameras

greetings - I managed to get everything up and running ok - once I found the /ui url :wink: - but having created a modified config file and changed the HSS initialization tab to point at the new file, I can't deploy the app for some reason - you can see the error message here and associated area of the app - any ideas appreciated because I have no idea :slight_smile: 2021-10-07 13_27_39-Node-RED _ 192.168.0.59
2021-10-07 13_27_24-Node-RED _ 192.168.0.59
2021-10-07 13_27_05-Node-RED _ 192.168.0.59

Edit that node and change 'id' to 'idx', exit the node then go back and change it back to 'id' and you should be set. It is a known issue with the node.

1 Like

thank you very much for this :slight_smile:

Just checking - did you manage to get IP Cam9 to IP Cam12 working??
There are a couple of suggestions about this issue on the FAQ section of our website.

I'll check that thx - the default cams work but so far I've failed to get my esp32-cam ( with OV2640 ) to stream into this app

What software did you flash the esp32-cam with?