A simple but useful task.

We will try below to connect to a Hikvision camera and download a snapshot.

For this we will use an inject node, an http request node and a file node:

HTTP node

Method: GET

URL: http://camera-ip/ISAPI/Streaming/channels/1/picture

Check “use basic authentication” and enter your admin username and password

Return: a binary buffer

File node

Make sure that you have a folder with read/write permissions.

Filename: /path/to/your/image.jpg

Action: overwrite file

Uncheck “Add newline..” and “Create directory..”

Now every time you inject data, Node-RED will connect to the camera and save the image to the path specified above.