HIKVISION DS-2CD2042WD-I usage for weather website - Image Names and FTP

HIKDee

n3wb
Joined
Jun 15, 2016
Messages
1
Reaction score
0
Hello everyone,

I just gota brand new original (not chineses FW or hacked) DS-2CD2042WD-I bullet camera which I would like to use for my weather website.
I am a bit disappointed about the fact, that I cannot find any option to upload a Picture in a fixed time interval, which will overwrite the last version of the picture.
I used to upload a picture on my server by the name "actual.jpg" this picture was replaced every minute by a new "actual.jpg" so that I always presented the latest image of the camera on my website without using a huge amount of storage on my server.
I alsouploaded an hourly picture for each hour of the day.

I am pretty much restricted with the uploading option for single shots of my new HIKVISIONcamera and I am wondering if anyone out there knows a workaround.
I do have a Synology NAS which I could use for uploading images, then I would need an intelligent FTP which would upload from my NAS to my server and rename the images to "actual.jpg" when uploading to my Website once a minute.

A firmware which offers several FTP sets for uploading single images or hourly by creating intelligent subdirectory names on a web server would be perfect.
I used aMOBOTIX M10 before and this camera offered a lot of option on how to uploadimages to webserver, also allowed many options in name of file by offering prefixof date and time in the file name.

Any help iswelcome.
Thanx a lot

Dee
 

slimmer

n3wb
Joined
Jul 9, 2018
Messages
2
Reaction score
0
Location
united arab emirates
good day

i have a hikvision model DS-2CD2042WD-I and DS-2CD2142FWD-I i want to know the jgp/mjpg stream path so i can add to my fibaro app (automation).need help for this. thanks
 

peraburek

Young grasshopper
Joined
Jun 18, 2014
Messages
39
Reaction score
8
Hello @HIKDee,

Synology can do this without any problems

I am using the same setup with my Synology NAS, so adjust your paths

create account for your camera and allow FTP
make sure in your Hikvision camera FTP setting that you enter "home" folder otherwise camera won't be able to save - test test test

on your Synology NAS go to
Control Panel -> Task Scheduler -> Create Scheduled Task -> User-defined Script
under Create task -> Schedule Choose Frequency -> Every 5 minutes, or whatever you like
First run time: 00:00 (if you are doing setup at 14:50h, set this to 15:00h)
Last run time: 23:55

under Task Settings - copy ADJUST "username-camera" and "192.168.x.y" then paste this code

Code:
find /volume1/homes/username-camera/ -name "*.jpg" -size -300k -delete && sleep 10 | cp -rf `ls -ut /volume1/homes/username-camera/192.168.x.y_* | head -1` /volume1/web/weather.jpg
#delete blank-error images and copy latest image to weather.jpg

delete files older than 10 minutes
Code:
find /volume1/homes/username-camera/* -type f -mmin +10 | xargs rm -rf
final code should be combination of both
Code:
find /volume1/homes/username-camera/ -name "*.jpg" -size -300k -delete && sleep 10 | cp -rf `ls -ut /volume1/homes/username-camera/192.168.x.y_* | head -1` /volume1/web/weather.jpg
find /volume1/homes/username-camera/* -type f -mmin +10 | xargs rm -rf
you will be able to access your file by going to http://your-synology-ip/weather.jpg
 
Last edited:
Top