webcam plugin behaving strange

proger
Observer
Observer
Posts: 35
Joined: Tue Jan 16, 2018 4:52 pm
Location: Norway
Station model: davis vantage vue
Software: Meteobridge
Contact:

webcam plugin behaving strange

Post by proger » Sat Aug 18, 2018 5:04 am

I suddenly got a problem with webcam plugin
My camera is sending photo every 10 minutes to the website.
but the plugin is only changing the photo every hour on the wecam plugin
Have a look at the thumbnails here http://www.auestadhome.com/template/plu ... /index.php
As you can see the photos are the same for every hour and a new photo next hour. And so on.
I cannot figure out what is going on since the camera and plugin has worked fine until the last month

Anyone else got this problem or can help me out here. Been working with it for days now
Image

User avatar
Johnny
Developer
Developer
Posts: 313
Joined: Sat Aug 19, 2017 10:16 pm
Location: Watford, Hertfordshire, England
Station model: Davis Vantage Pro2 Plus
Software: Meteobridge
Contact:

Re: webcam plugin behaving strange

Post by Johnny » Sat Aug 18, 2018 8:22 am

Hi Proger, that link is not working, "The requested URL /template/plugins/webcam/index.php was not found on this server"
Image
Davis Vantage Pro2 Plus: http://www.watfordweather.uk

proger
Observer
Observer
Posts: 35
Joined: Tue Jan 16, 2018 4:52 pm
Location: Norway
Station model: davis vantage vue
Software: Meteobridge
Contact:

Re: webcam plugin behaving strange

Post by proger » Sat Aug 18, 2018 8:55 am

Yes Sorry.
I am trying to delete the plugin and start over again.
also deleting all photos and database so will see if this is working
Image

proger
Observer
Observer
Posts: 35
Joined: Tue Jan 16, 2018 4:52 pm
Location: Norway
Station model: davis vantage vue
Software: Meteobridge
Contact:

Re: webcam plugin behaving strange

Post by proger » Sat Aug 18, 2018 10:31 am

Well tried to set it up all over. But same behavier of the plugin.
Link in post over is working again.
If any one got suggestions it is more than welcome
Image

User avatar
EveshamWeather
Observer
Observer
Posts: 20
Joined: Sat Sep 02, 2017 11:11 am
Location: Evesham, UK
Station model: Davis Vantage Vue
Software: Weewx
Contact:

Re: webcam plugin behaving strange

Post by EveshamWeather » Sun Aug 19, 2018 1:27 pm

Is the image that gets uploaded actually changing? I have had it in the past where my upload was failing so Meteotemplate just added the same image to database every time it updated.
Vince

Image

proger
Observer
Observer
Posts: 35
Joined: Tue Jan 16, 2018 4:52 pm
Location: Norway
Station model: davis vantage vue
Software: Meteobridge
Contact:

Re: webcam plugin behaving strange

Post by proger » Sun Aug 19, 2018 3:10 pm

Yes that is updating and being renamed.
you can see that here.
What is strange is that is is updating once pr hour
http://www.auestadhome.com/template/indexDesktop.php

What is strange is that is is updating once pr hour
Image

User avatar
Dehatter
Professional
Professional
Posts: 349
Joined: Sun Jan 07, 2018 5:11 am
Location: Matthews, NC, USA
Station model: Ecowitt WH80
Software: Ecowitt GW1000
Contact:

Re: webcam plugin behaving strange

Post by Dehatter » Mon Aug 20, 2018 2:48 am

Just being sure we do not overlook the obvious, but your image source in the plug-in set up is:

Code: Select all

http://auestadhome.com/template/Webcamphoto/webcam2.jpg
Correct?

If so this has not updated since 21:56 August 19.

tom
Image

proger
Observer
Observer
Posts: 35
Joined: Tue Jan 16, 2018 4:52 pm
Location: Norway
Station model: davis vantage vue
Software: Meteobridge
Contact:

Re: webcam plugin behaving strange

Post by proger » Mon Aug 20, 2018 7:29 am

Yes I have put correct URL in there.
If you study the 18 august you should see that the plugin only updates photos
every hour.
But the Camera is set to ftp every 500 second and the webcam block is updating every 500 second.
and this work fine.
I have also set the webcam plugin update interval to 500sec and save interval to the database to 10 min

What I wonder is the plugin reading from the downloaded photo from camera (the snap photo) or is it reading from
the renamed photo (webcam2.jpg) ?
on the website filemanager both these photos is changing as they are ment to

Roger
Image

User avatar
Dehatter
Professional
Professional
Posts: 349
Joined: Sun Jan 07, 2018 5:11 am
Location: Matthews, NC, USA
Station model: Ecowitt WH80
Software: Ecowitt GW1000
Contact:

Re: webcam plugin behaving strange

Post by Dehatter » Mon Aug 20, 2018 8:19 am

proger wrote: Mon Aug 20, 2018 7:29 am But the Camera is set to ftp every 500 second and the webcam block is updating every 500 second.
and this work fine.
Your image http://auestadhome.com/template/Webcamphoto/webcam2.jpg is not updating so your block is not updating every 500 secs.

image at 10:59 your time is shown to be taken at 9:49 your time.
webcam2.jpg
webcam2.jpg (89.79 KiB) Viewed 8916 times
Image

proger
Observer
Observer
Posts: 35
Joined: Tue Jan 16, 2018 4:52 pm
Location: Norway
Station model: davis vantage vue
Software: Meteobridge
Contact:

Re: webcam plugin behaving strange

Post by proger » Mon Aug 20, 2018 9:53 am

Capture.JPG
Capture.JPG (148.55 KiB) Viewed 8909 times
I have checked that and it is updating fine.

A bad photo there
But the time on web photo and computer is the same hour
Image

andyk1
Professional
Professional
Posts: 431
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: webcam plugin behaving strange

Post by andyk1 » Mon Aug 20, 2018 10:47 am

Have you look at the cron jobs to see if by chance the time was changed to 1 Hour. I am assuming you are using meteobridge? Look at those settings and your FTP setting in the camera. Shooting in the dark here but I have had this happen with a camera going bad.

Andy
Image

proger
Observer
Observer
Posts: 35
Joined: Tue Jan 16, 2018 4:52 pm
Location: Norway
Station model: davis vantage vue
Software: Meteobridge
Contact:

Re: webcam plugin behaving strange

Post by proger » Mon Aug 20, 2018 12:19 pm

1. camera uploading to website every 10 min : checked
2. cronjob of renaming file every 10 min : checked
3. webcam block working properly replacing photo : checked
4. cronjob running webcamupdate.php every 10 min: checked (but not replacing photo until new hour)

I have totally run out ideas what to do so more or less give up the whole webcam plugin and timelaps..
I have this script renaming files.
is there anyone who can change this so I keep the original photo and not delete it.

<?php
$fileList = glob('*.jpg');
var_dump($fileList);
foreach (glob("directory/snap/*.jpg") as $filename) {
echo "Renaming " . $filename . " now.</br>";
if(file_exists($filename)) {
rename($filename, "webcam2" . ".jpg");
echo $filename . " is now webcam2" . ".jpg</br>";
}
}
?>
Image

andyk1
Professional
Professional
Posts: 431
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: webcam plugin behaving strange

Post by andyk1 » Mon Aug 20, 2018 1:23 pm

Did you check your CAMERA's FTP setting? The time section where you choose seconds or minutes. You have a directory path of..../snap so I am assuming you are using a foscam? if so double check the time interval and FTP

For Foscam

Settings/Network/FTP Setting that all is correct then look in
Settings/Video/Snapshot Settings for the correct time interval between pictures. I set mine for 285 seconds because of network delays and upload times and fairly close to the cron job intervals of 300 seconds.

To me it seems like a timing issue. Somewhere your new picture upload is not happening every 500 seconds as you say. The reason for all the pictures the same and not changing is because the cron job is using the same ../cam/webcamimage.jpg or where ever your image file is in your host server. It's only being updated/uploaded once an hour for whatever the reason and that needs to be tracked down.

Webcam block settings
Webcam plugin settings
cron job settings
FTP upload settings
If you are using a meteobridge, Those setting also
Did you change/modify any CAM php files?

It is working but only once every hour but reusing the same picture every ten minutes

Andy

Edited Grammatical error's on 8-21-2018 @ 21:55
Last edited by andyk1 on Wed Aug 22, 2018 2:55 am, edited 1 time in total.
Image

proger
Observer
Observer
Posts: 35
Joined: Tue Jan 16, 2018 4:52 pm
Location: Norway
Station model: davis vantage vue
Software: Meteobridge
Contact:

Re: webcam plugin behaving strange

Post by proger » Mon Aug 20, 2018 1:38 pm

Thanks Andyk1
I will take a very deep study when I get home from work tonight
There has to be something somewhere and just have to find the small issue :)
Image

andyk1
Professional
Professional
Posts: 431
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: webcam plugin behaving strange

Post by andyk1 » Mon Aug 20, 2018 1:41 pm

BTW, you have an awesome camera/time lapse setup. Don't give up on it... we'll figure it out. Lots of experienced users bumping heads on this.
Image

proger
Observer
Observer
Posts: 35
Joined: Tue Jan 16, 2018 4:52 pm
Location: Norway
Station model: davis vantage vue
Software: Meteobridge
Contact:

Re: webcam plugin behaving strange

Post by proger » Mon Aug 20, 2018 3:18 pm

I'll give it a couple of days and see what I can figure out.
I'll come back with feedback if I find out what course this.
Image

User avatar
Dehatter
Professional
Professional
Posts: 349
Joined: Sun Jan 07, 2018 5:11 am
Location: Matthews, NC, USA
Station model: Ecowitt WH80
Software: Ecowitt GW1000
Contact:

Re: webcam plugin behaving strange

Post by Dehatter » Tue Aug 21, 2018 6:36 pm

I have used the script that is linked below successfully in the past.

You will have to adjust the pathing to fit you directory structure.

This was written around a Foscam camera for a friend, but it can be adjusted for any camera that FTPs with a datestamp.

I can assist as necessary.

https://drive.google.com/open?id=1211ao ... zC-8C7hmBl

This script renames the latest image in a snapshot folder to webcamimage in a webcam folder, and then deletes all the images from the snapshot folder. It should be placed in your /template/load/crons/ folder. A cronjob is required to run it, but if you are already running an MT cronjob, the existing job will automatically run this one too.

if not, I suggest https://cron-job.org/ as this is free, works well, and sends emails if a failure occures.

The command format looks like this:

Code: Select all

http://www.yourdomain.com/template/load/cron.php?password=xxxx
where xxxx=your UPDATE password for the template as defined on the setup page.

This is what my setup page looks like and runs every 2 minutes. Please note that you do NOT need HTTP authentication, so you can leave that box unchecked. I entered information in there at one time when I first started and was trouble shooting.
CJ.jpg
CJ.jpg (115.77 KiB) Viewed 8852 times
Tom
Image

andyk1
Professional
Professional
Posts: 431
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: webcam plugin behaving strange

Post by andyk1 » Tue Aug 21, 2018 7:02 pm

Reading Dehatter's (Tom) reply who has helped me also with a similar problem way back. I remember having a tough time figuring out why my cam snaps where not updating. For one I was using the highest available version of PHP at the time and it actually needed to be lowered to PHP ver 5.6 I believe. If you happened to recently change your version it would be something to look at.

Thanks Tom for reminding me.

That being said I don't think that would be your problem as it is updating but once an hour. I still tend to think it has to do with either FTP upload intervals or cronjob not working right. It is reusing the last updated picture every ten minutes because that is the only available picture and somehow sends a new one once an hour.

It also may help if we knew what your set up looks like... i.e. weather array type, Ambient, ObserverIP, Meteobridge, Davis, Acurite etc.
Image

User avatar
Dehatter
Professional
Professional
Posts: 349
Joined: Sun Jan 07, 2018 5:11 am
Location: Matthews, NC, USA
Station model: Ecowitt WH80
Software: Ecowitt GW1000
Contact:

Re: webcam plugin behaving strange

Post by Dehatter » Tue Aug 21, 2018 8:51 pm

andyk1 wrote: Tue Aug 21, 2018 7:02 pm For one I was using the highest available version of PHP at the time and it actually needed to be lowered to PHP ver 5.6 I believe.
The link is to a new version of the script Andy. I think you can use this with current PHP.

FYI

Thanks to BlueBear (memberlist.php?mode=viewprofile&u=55) for pointing that out to me a few weeks ago.

Tom
Image

andyk1
Professional
Professional
Posts: 431
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: webcam plugin behaving strange

Post by andyk1 » Wed Aug 22, 2018 3:00 am

Dehatter wrote: Tue Aug 21, 2018 8:51 pm The link is to a new version of the script Andy. I think you can use this with current PHP.

FYI

Tom
Tom!!!

If I'm reading this correctly this is a replacement for my ../cam/webcam/camrename.php file you helped me with awhile back? After this edit I can raise my php level back up to the 7.???

Andy
Image

proger
Observer
Observer
Posts: 35
Joined: Tue Jan 16, 2018 4:52 pm
Location: Norway
Station model: davis vantage vue
Software: Meteobridge
Contact:

Re: webcam plugin behaving strange

Post by proger » Wed Aug 22, 2018 8:31 am

Thanks alot for the php 5.6 tip.
My php ver was actullay set to 7.1

When I come home from work I will have a go setting up my webam timelaps again to see if that does the trick.

Since yesterday I have only run webcam block updating every 10 minutes and that work perfect.

thanks alot for the script Dehatter. Will test that out aswell.
Image

proger
Observer
Observer
Posts: 35
Joined: Tue Jan 16, 2018 4:52 pm
Location: Norway
Station model: davis vantage vue
Software: Meteobridge
Contact:

Re: webcam plugin behaving strange

Post by proger » Thu Aug 23, 2018 8:35 pm

Hello Again
No luck with plugin

My setup is:
Acurite 5 in 1 station
aculink internet bridge
D-link dir 505 running Meteobridge
Foscam fi9900ep v3

What I have done:
Delete all files and database from server concerning webcam
(webam block, webcam plugin and Webcam time-lapse block)
change php database to ver 5.4

Starting over:
Set permission for the "webbilder" folder to 777 included subfolder and files in here.
webcamera ftp and image setup:
setting up ftp from camera to web server (success)
download interval set to 540 sec (checked 10 photos coming down to server.)
CRON JOB for rename photo.
Set up meteobrigde for cron job to rename file to webcam2.jpg. Using dehatters script. ( renaming photo every ten minutes with the new one)
all of the above is monitored via the file manager on my providers homepage for at least one hour for confirmation that it works.
Installed the webcam block :
img URL: http://auestadhome.com/template/webbilder/webcam2.jpg
Refresh interval in seconds: 600
Webcam Plugin
Download from Meteotemplate
copy to Plugin directory
control panel meteotemplate
image url: http://auestadhome.com/template/webbilder/webcam2.jpg
update interval: 600
save interval to database: 9

And this is where it goes wrong. Only one update an hour.
It all works fine until I start the Crone job for updateWebcam.php
I have no clue what to do.
I give up.
anyone want to have a go at this is welcome to give it a try.
I can change all password you need to temporary password if any of you would be so kind to give it a go.

Roger
Image

User avatar
Dehatter
Professional
Professional
Posts: 349
Joined: Sun Jan 07, 2018 5:11 am
Location: Matthews, NC, USA
Station model: Ecowitt WH80
Software: Ecowitt GW1000
Contact:

Re: webcam plugin behaving strange

Post by Dehatter » Thu Aug 23, 2018 10:40 pm

did you change the timezone in the image rename script to your timezone?

did you put BOTH the file updateWebcam.php (originally located in the plugin folder) and my image rename file (default name camrenameFC.php) in the /template/load/crons/ folder?

Additionally, a single cronjob command using this format

Code: Select all

http://www.auestadhome.com/template/load/cron.php?password=yourupdatepassword
runs ALL the php scripts located in that cron folder. You do not need 2 cronjobs.

Also. not sure if you gave up or what, but your block is not updating either.

Tom
Image

proger
Observer
Observer
Posts: 35
Joined: Tue Jan 16, 2018 4:52 pm
Location: Norway
Station model: davis vantage vue
Software: Meteobridge
Contact:

Re: webcam plugin behaving strange

Post by proger » Fri Aug 24, 2018 2:02 am

did you change the timezone in the image rename script to your timezone?
Yes I did.
did you put BOTH the file updateWebcam.php (originally located in the plugin folder) and my image rename file (default name camrenameFC.php) in the /template/load/crons/ folder?
No I did not. But I have done that now
Also. not sure if you gave up or what, but your block is not updating either.
Course the camera stop sending snaps at 10 pm.
But I have set it go 24 hours a day now.

Roger
Image

proger
Observer
Observer
Posts: 35
Joined: Tue Jan 16, 2018 4:52 pm
Location: Norway
Station model: davis vantage vue
Software: Meteobridge
Contact:

Re: webcam plugin behaving strange

Post by proger » Fri Aug 24, 2018 3:34 am

I can't get the script to work when I move the camrenamefc to the cron folder.
I just can't figure out what folders to put in the lines in script
All my files goes into a folder named "webbilder" HTTP://auestadhome.com/webbilder/FI9900 ... F8B2B/snap
I want to save the renamed photo in /webbilder/webam2.jpg

camrenamefc is in /webbilder/

Can you help me with what to put in there

Roger
Image

Post Reply