IP5M as a Weather Cam - How Does FTP Work?

Have some questions or having issues with your IP Camera(s), Post them here for the mods and other users to assist you with.
Post Reply
n7mot
Posts: 4
Joined: Wed Sep 22, 2021 3:30 am

IP5M as a Weather Cam - How Does FTP Work?

Post by n7mot »

I've set up an IP5m camera as a weather cam to supplement my weather station. All I want it to do is to FTP upload a new snapshot photo every five minutes to my website.

I set the Snapshot schedule so that everything is green and it should send all the time.

I set the Snapshot Destination as FTP.

I set up Storage/FTP with my web server and using the Test button it says it is connecting. I'm not finding any files on my server, however.

With my previous camera (at an old house) the camera (not an Amcrest) would upload the picture as netcam.jpg, which each new photo overwriting the old one.

Am I doing something obviously wrong or does this camera just not work as I expect? If there is a tutorial that will answer my questions, please feel free to reference that if this has been answered already.
User avatar
longedge
Site Admin
Posts: 584
Joined: Fri Mar 31, 2017 9:34 am

Re: IP5M as a Weather Cam - How Does FTP Work?

Post by longedge »

Hello and welcome to the forum.

As far as I know, all Amcrest cameras save snapshots using the time/date as the file name. You will need some sort of external intervention to rename your files to a static name.

I created my own app to do exactly what you want to do but I've never achieved full automation thanks to WIndows security :roll:.

There are third party solutions available that I know some people use but I've never explored them as mine suffices me.
My AMCREST Cameras:-
2 x IP3M-941B firmware V2.620.00AC00.3.R, Build Date: 2019-12-18
1 x IP2M-841B firmware V2.420.AC00.18.R, Build Date: 2019-08-03
User avatar
Revo2Maxx
Site Admin
Posts: 5885
Joined: Sat Jun 15, 2019 3:05 pm

Re: IP5M as a Weather Cam - How Does FTP Work?

Post by Revo2Maxx »

@n7mot Welcome to the forum

So it is hard to say how or why something isn't working right.. In FTP it isn't really just a Single type of file for the camera. As stated before there is name with time and such Also depending on the system if you put a name for folder then that will be (Normally) at the Folder you make for your FTP, Then the Name you made, then IP of the camera or n my case NVR then Date, then in mine for my Recorders this is where Channel, and times in the channel is Videos with time stamp for Jpg you would have to click on the Hour you want to look at..

For my Cameras sorry I found I still have a few going to my server most of them are from my Recorders but looked on a different FTP server and I still have a couple of Cameras in there.. For that I have Name setup in the cameras, So in the Root of the FTP server is that name, Then in that is the SN of the Camera as the next level, then date, then hour, then in the hour if you have Video and Jpg both will be listed as jpg or mp4...

Then for this camera you can setup your FULL time Recording in the Schedule for the Snapshots, Then on the page of the Camera under the snapshot you would want to change the 1s as it is normally set to a time that works for you and on mine I can change it from the 1 to 7s to as much as every 50,000 seconds. Once you get that you will have your 300 seconds in there

So I have mine setup for Motion but this is what it looks like for the images and there is no where to change the name to suit your needs only the starting folder in your Root FTP server can be added...
Screenshot (1109).png
Screenshot (1109).png (74.77 KiB) Viewed 3009 times
Be Safe.
n7mot
Posts: 4
Joined: Wed Sep 22, 2021 3:30 am

Re: IP5M as a Weather Cam - How Does FTP Work?

Post by n7mot »

Thank you all for your replies. The reason I wasn't seeing the files is that Amcrest won't allow me to put in more than a folder name, so the folder is up at the root of my FTP logon privileges. I found the files and I can see I'm going to have to get creative with some PHP code to accomplish what used to be pretty easy with that old camera. I'll also need to create a separate FTP logon so that the files aren't up at the root.

But, since these cameras are 5% of what I paid for that previous camera and these photos seem to be as good, I'll power through it.
User avatar
longedge
Site Admin
Posts: 584
Joined: Fri Mar 31, 2017 9:34 am

Re: IP5M as a Weather Cam - How Does FTP Work?

Post by longedge »

For all my cameras, there is a field "remote directory" in the destination settings for FTP. Do you not see the same?

I save snapshots to the FTP server on my NAS to a share named "cameras". When initially setup and tested each camera creates it's own folder within the cameras folder. The device name specified in camera settings/system/general is used to name that sub-folder.
FTP_SETTINGS.jpg
FTP_SETTINGS.jpg (30.38 KiB) Viewed 2994 times
Just bye the bye, you should make sure that the user setup in the camera has got full permissions on the folder. I believe that not doing so is one of the causes of FTP test failures.
My AMCREST Cameras:-
2 x IP3M-941B firmware V2.620.00AC00.3.R, Build Date: 2019-12-18
1 x IP2M-841B firmware V2.420.AC00.18.R, Build Date: 2019-08-03
jack7
Posts: 904
Joined: Tue May 29, 2018 7:46 pm

Re: IP5M as a Weather Cam - How Does FTP Work?

Post by jack7 »

n7mot wrote: Thu Sep 23, 2021 3:48 am Thank you all for your replies. The reason I wasn't seeing the files is that Amcrest won't allow me to put in more than a folder name, so the folder is up at the root of my FTP logon privileges. I found the files and I can see I'm going to have to get creative with some PHP code to accomplish what used to be pretty easy with that old camera. I'll also need to create a separate FTP logon so that the files aren't up at the root.

But, since these cameras are 5% of what I paid for that previous camera and these photos seem to be as good, I'll power through it.
Another possibility without using FTP is to fetch a snapshot from the camera using an Amcrest API command.
You could try this code at your website.  I have not used it.
https://ipcamtalk.com/threads/is-there- ... ost-387206
n7mot
Posts: 4
Joined: Wed Sep 22, 2021 3:30 am

Re: IP5M as a Weather Cam - How Does FTP Work?

Post by n7mot »

longedge wrote: Thu Sep 23, 2021 6:25 am For all my cameras, there is a field "remote directory" in the destination settings for FTP. Do you not see the same?
Yes. My problem was I was two levels up and trying to have a path and not just a folder i.e. dir1/dir2/webcamfolder. It can only take a folder name so I created a separate FTP account that is at the dir2 level where a simple folder name will work.

Thanks.
n7mot
Posts: 4
Joined: Wed Sep 22, 2021 3:30 am

Re: IP5M as a Weather Cam - How Does FTP Work?

Post by n7mot »

jack7 wrote: Thu Sep 23, 2021 12:24 pm Another possibility without using FTP is to fetch a snapshot from the camera using an Amcrest API command.
You could try this code at your website.  I have not used it.
https://ipcamtalk.com/threads/is-there- ... ost-387206
This is FTPing to a hosted website so I would need the camera to be available on a publically accessible IP address and these cameras are all behind a firewall on a periodically changing IP address (DHCP on 4G). But it's cool to know that option is available.

Thanks.
User avatar
longedge
Site Admin
Posts: 584
Joined: Fri Mar 31, 2017 9:34 am

Re: IP5M as a Weather Cam - How Does FTP Work?

Post by longedge »

n7mot wrote: Thu Sep 23, 2021 7:23 pmMy problem was I was two levels up and trying to have a path and not just a folder i.e. dir1/dir2/webcamfolder. It can only take a folder name so I created a separate FTP account that is at the dir2 level where a simple folder name will work.
I'm not sure what the problem is there. I just did a test on one of my cameras (device name "Front") and changed the "Remote Directory" entry to read "cameras/dir1/dir2/test". I clicked save and then test and then I went to the folder "cameras" folder on my NAS. There is now a new set of folders in the cameras folder the path is - cameras/dir1/dir2/test/Front. Note that clicking on the test button creates the directory structure.

If that isn't working for you, then I can only imagine that there might be a problem with the user permissions on the FTP server. Just bye the bye, I'm pretty sure that reports that I've seen in the past of "Test failed" error messages can also be caused by insufficient user permissions.
ftp_dirs.jpg
ftp_dirs.jpg (32.52 KiB) Viewed 2934 times
My AMCREST Cameras:-
2 x IP3M-941B firmware V2.620.00AC00.3.R, Build Date: 2019-12-18
1 x IP2M-841B firmware V2.420.AC00.18.R, Build Date: 2019-08-03
GaryTTirn
Posts: 1
Joined: Tue Sep 28, 2021 9:51 am

Re: IP5M as a Weather Cam - How Does FTP Work?

Post by GaryTTirn »

I have messed about with my IP4M-1051s, IP3M-943s and IP2M-841s as I didn't like the default FTP directory structure that includes a subfolder for each hour.

I found out one can get the FTP picture path by querying the HTTP API :

Code: Select all

curl --digest "http://USERNAME:PASSWORD@CAMERA/cgi-bin/configManager.cgi?action=getConfig&name=StorageGroup"

table.StorageGroup[0].Channels[0].MaxPictures=0
table.StorageGroup[0].FileHoldTime=0
table.StorageGroup[0].Memo=For Reading & Writing Files
table.StorageGroup[0].Name=ReadWrite
table.StorageGroup[0].OverWrite=true
table.StorageGroup[0].PicturePathRule=%y-%M-%d/%c/jpg/%h/%m/%s[%E][%O@%S][%R].jpg
table.StorageGroup[0].RecordPathRule=%y-%M-%d/%c/dav/%h/%h.%m.%s-%h.%m.%s[%E][%O@%S][%R].%t
table.StorageGroup[1].Channels[0].MaxPictures=0
table.StorageGroup[1].FileHoldTime=0
table.StorageGroup[1].Memo=For FTP Files
table.StorageGroup[1].Name=Remote
table.StorageGroup[1].OverWrite=true
table.StorageGroup[1].PicturePathRule=%y-%M-%d/%hhour/jpg/%h.%m.%s[%E][%O@%S][%R].jpg
table.StorageGroup[1].RecordPathRule=%y-%M-%d/%hhour/mp4/%h.%m.%s-%h.%m.%s[%E][%O@%S][%R].%t
I'm setting mine so that there is only single folder per day and snapshots and mp4 videos are in a different subdirectory under that daily directory.

Code: Select all

curl --digest "USERNAME:PASSWORD@CAMERA/cgi-bin/configManager.cgi?action=setConfig&StorageGroup[1].PicturePathRule=%25y-%25M-%25d%2Fjpg%2F%25h.%25m.%25s%5B%25E%5D%5B%25O%40%25S%5D%5B%25R%5D.jpg"

curl --digest "USERNAME:PASSWORD@CAMERA/cgi-bin/configManager.cgi?action=setConfig&StorageGroup[1].RecordPathRule=%25y-%25M-%25d%2Fmp4%2F%25h.%25m.%25s-%25h.%25m.%25s%5B%25E%5D%5B%25O%40%25S%5D%5B%25R%5D.%25t
After the sets :

Code: Select all

curl --digest "USERNAME:PASSWORD@CAMERA/cgi-bin/configManager.cgi?action=getConfig&name=StorageGroup"
table.StorageGroup[0].Channels[0].MaxPictures=0
table.StorageGroup[0].FileHoldTime=0
table.StorageGroup[0].Memo=For Reading & Writing Files
table.StorageGroup[0].Name=ReadWrite
table.StorageGroup[0].OverWrite=true
table.StorageGroup[0].PicturePathRule=%y-%M-%d/%c/jpg/%h/%m/%s[%E][%O@%S][%R].jpg
table.StorageGroup[0].RecordPathRule=%y-%M-%d/%c/dav/%h/%h.%m.%s-%h.%m.%s[%E][%O@%S][%R].%t
table.StorageGroup[1].Channels[0].MaxPictures=0
table.StorageGroup[1].FileHoldTime=0
table.StorageGroup[1].Memo=For FTP Files
table.StorageGroup[1].Name=Remote
table.StorageGroup[1].OverWrite=true
table.StorageGroup[1].PicturePathRule=%y-%M-%d/jpg/%h.%m.%s[%E][%O@%S][%R].jpg
table.StorageGroup[1].RecordPathRule=%y-%M-%d/mp4/%h.%m.%s-%h.%m.%s[%E][%O@%S][%R].%t
I would take a guess if one was to set that FTP Rule (table.StorageGroup[1].PicturePathRule) to

Code: Select all

curl --digest "USERNAME:PASSWORD@CAMERA/cgi-bin/configManager.cgi?action=setConfig&StorageGroup[1].PicturePathRule=snapshot.jpg"
all snapshots would be written to snapshot.jpg overwriting the old snapshot each time.
Post Reply