Author Topic: How to make ftp upload be the same name  (Read 1636 times)

0 Members and 1 Guest are viewing this topic.

Offline Gruve5

  • Member
  • *
  • Posts: 43
    • Gruver Weather Service
How to make ftp upload be the same name
« on: February 19, 2019, 12:02:03 PM »
Hi,
  I am trying to set up my Amcrest camera to upload to my website server so that I can pull that image from the site and use it elsewhere. My problem is, everytime the Amcrest image sends a image, it of course makes a new file name matching the date and time it sends it. Does anyone know how I can either make it send one file name to the server or how to take the files the website receives and make it one filename so I can use the images.  I can see the camera's images are getting sent to the server, but they all have different names.
I would love to get this up and running because Amcrest has a 4k camera and it looks excellent!

Michael

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6364
    • Valentine Nebraska's Real-Time Weather
Re: How to make ftp upload be the same name
« Reply #1 on: February 19, 2019, 12:11:29 PM »
Many webcams have that issue with ftp. One workaround is have something like Blue Iris do the website upload.
So run BI on PC connected with the camera and have BI upload to the website.
Randy

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: How to make ftp upload be the same name
« Reply #2 on: February 19, 2019, 12:18:02 PM »

Offline Gruve5

  • Member
  • *
  • Posts: 43
    • Gruver Weather Service
Re: How to make ftp upload be the same name
« Reply #3 on: February 22, 2019, 08:45:50 PM »
Thanks for the responses. I'm honestly not that fluent in html to understand what to do.  I do have a website that currently has the same ip camera image file being uploaded to it, however, my new camera creates a new file everytime.  Do I simply add that html to my site html? Or do I need to save that html in a file and upload it.

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: How to make ftp upload be the same name
« Reply #4 on: February 22, 2019, 09:44:11 PM »
I haven't used it for a while and not home at the moment to look at the insstructions but the script has to be uploaded to your remote and I had it in a separate folder.  The image date-stamped file being ftp was also in its own folder as it is deleted as soon as it is renamed.  The fixed renamed file was in another folder and the previous file is then replaced by the new renamed file.  I believe a cron job was set up to run the script once a minute.


Enjoy,
Paul

Offline the beteljuice

  • the beteljuice
  • Forecaster
  • *****
  • Posts: 316
    • test site
Re: How to make ftp upload be the same name
« Reply #5 on: February 22, 2019, 10:35:42 PM »
Silly question .....

Presumeably this is a static image ?

What model is it and can't it be told to use a fixed name ?
Imagine what you will KNOW tomorrow !

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How to make ftp upload be the same name
« Reply #6 on: February 23, 2019, 06:47:58 AM »
The Amcrest camera or DVR is going to do what it does. I would not use it to FTP. Instead you can access just about anything you want over the network or over the Internet using a different system.

Here is the Amcrest API. You can pull still shot from camera.
https://s3.amazonaws.com/amcrest-files/Amcrest+HTTP+API+3.2017.pdf

This by the way works not just on Amcrest. It works on any Dahua clone camera or NVR which is what Amcrest sells. Mine is a Q-See. In this link you can see all the many brands that actually are rebrand of Dahua.
https://ipvm.com/reports/dahua-oem

In case that link dies... Some pupular brands like:
ADT
Amcrest
Bosch
Lorex FLIR
Honeywell
Panasonic
Q-see
Speco Tech
... and more as Dahua is probably the largest NVR and camera OEM.

I currently use this method with my Meteobridge. It pulls the still shot using documented API. It looks like this in my case talking to my DVR.
https://admin:password@192.168.1.220/cgi-bin/snapshot.cgi?channel=8
or
https://admin:password@192.168.1.220/cgi-bin/snapshot.cgi?channel=8&loginuse=admin&loginpas=admin

There are some slight variations depending on brand and model. Sometimes you need it to end with the admin admin at the end for username and password, meaning not the real password but actually using admin admin. Sometimes I think you can omit the real username and password after the http and also get rid of the @ and then put the real username and password at the end. Just play around with your browser and those URLs till you get an image. Or Google this stuff and find more documentation and online resources with this. Now you have a starting point.

I'm pulling channel 8 because I'm using a camera NVR but the same API is supported on the camera. You'd just pull channel 1 or 0 if talking directly to the camera. My channel 8 is actually channel 9 on the NVR because it starts naming them with 0 instead of 1. This I found is another variation depending on medel so the API is not followed strictly or has had some revisions and I guess I've run into some old cameras and NVRs. Sad thing is that often these resellers abandon and don't keep current firmware available for their products. I support various networks and have different brands in different places and I have seen these inconsistencies.

If you do this over the Internet then you also need to open and forward ports.

In my case since the Meteobridge is pulling the image I then use the Meteobridge service to publish to the Meteobridge.com camera network. There you can have a plain image or one with weather text overlay.

URL to your image is always the same jpg:

https://admin.meteobridge.com/cam/SomeLongNumberAutomaticallyAssingedToYou/cam.jpg
or in the case of the one with weather text overlay
https://admin.meteobridge.com/cam/SomeLongNumberAutomaticallyAssingedToYou/camplus.jpg

Now whenever a weather website needs a camera URL I use that one from Meteobridge.com. Just realize I'm not saying you need a Meteobridge. I'm saying you can pull images from your camera using another system which can be your website or it can be an internal system that then uploads or FTP it to your website.

Bottom line; you don't need the camera to FTP.

« Last Edit: February 23, 2019, 05:32:13 PM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How to make ftp upload be the same name
« Reply #7 on: February 23, 2019, 08:55:30 AM »
Here is other useful links

Main page to find brands
https://www.ispyconnect.com/sources.aspx

Specific Amcrest link
https://www.ispyconnect.com/man.aspx?n=Amcrest
« Last Edit: February 23, 2019, 09:06:57 AM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

 

anything