webcam plugin behaving strange

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 » Fri Aug 24, 2018 8:06 am

proger wrote: Fri Aug 24, 2018 2:02 am Can you help me with what to put in there
I think this is how you asked for it.

https://drive.google.com/open?id=1otNPo ... 67imhyFprj

1. Do you have updateWebcam.php in the folder http://www.auestadhome.com/template/load/crons/ ?

2.If not locate it in the http://www.auestadhome.com/template/plugins/webcam/ folder and copy it to the crons folder above.

3.Download the file shared above and then copy it to the same http://www.auestadhome.com/template/load/crons/ folder.

4.I know you are running your cron job from MB but i HIGHLY HIGHLY recommend using https://cron-job.org/ . See directions/picture in a previous post. It is totally free and you don't have to figure anything out. Also its not dependent on your hardware AND a bonus, it off-loads work from your MB. It also emails you when it fails, which MB will not. You only need to have 1 cron job as MT will run ALL programs in the /crons/ folder. It will run the updates at your specified interval (1,2,5,10,15, or 30 minutes). I personally use 2 minutes for timing limitations (everything does not trigger exactly on time). My camera uploads every 1 minute. My MT updates every 10 minutes, but the block on the homepage will update every 2 minutes (using the same setup as I do).

5.Have the url http://auestadhome.com/template/webbilder/webcam2.jpg as the source for both block and plugin. You have to setup both the block and the plugin.

Everything SHOULD start to work.

I can help you with another way since you are using MB that will put the MB data on the bottom of the image....example...
camplus (2).jpg
camplus (2).jpg (66.72 KiB) Viewed 4327 times
Tom
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 » Fri Aug 24, 2018 8:10 am

andyk1 wrote: Wed Aug 22, 2018 3:00 am 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.???
Yeppers!! I accidentally copied a command that PHP stopped supporting after ver 5. I fixed that and used the new command.

New

Code: Select all

if (! preg_match('/\.(jpg)$/',$fname)) continue;
Old

Code: Select all

if (! ereg($pattern,$fname)) continue;
ereg is NOT supported ver 6 and up (though I think it should be-look how simple the old code is). So if the camrename has ereg in it then it won;t work with the current versions of PHP.

Clearly be it known that I did not write the original file but got it from another MT user. I additionally do not use the file any longer as my timealspe software takes care of everything for me now. https://iptimelapse.com/ (<-plug for Michael there)

lol
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 » Fri Aug 24, 2018 9:09 am

Hi Tom!!

Got it and thanks.

I changed my line 27 of camrename.php but there's a line 25
25 if (ereg('^\.{1,2}$',$fname)) continue;
With the same ereg. Change that also?

Andy
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 » Fri Aug 24, 2018 4:42 pm

yes,

You need to check the 2 files line by line or just modify the new with your paths.

I think that is the only thing I changed, but cant remember.

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 » Sat Aug 25, 2018 1:23 am

Tom!!!

Thanks a lot and it was just in time. I didn't realize till I changed the two (2) lines 25 and 27 only with those 2 lousy words and it works just fine. I was able to move back to PHP7.2 without a problem and doing so I saw that PHP 5.6 ends this 12/2018.

I also gave a few users a copy of my camrename.php with modified paths so if your reading this please follow Toms changes to that file. and change your PHP ver.

Tom!!! again thanks a million.

Andy
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 » Sat Aug 25, 2018 2:23 am

THIS THREAD IS FINALLY.....FINALLY RESOLVED.

User's host had a built in cache for 1 hour on images giving the appearance that something was broken.

The script and crons work fine.

The fix was to add the following code to the .htaccess file...

Code: Select all

Header add "disablevcache" "true"
Just in case someone else uses one.com for hosting.

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 » Sat Aug 25, 2018 2:52 am

I can't thank you enough Dehatter .
You have done a splendid job finding the problem.

I am glad that it is over and I can go on making timelaps again.

Roger
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 » Sat Aug 25, 2018 6:22 am

Give Tom access to your host server... temp password. He will find the problem. To me it seems a time issue still. Somewhere instead of 600 seconds it's 60 min somewhere. Either a cron job which is unlikely since you checked over and over.

In foscam FTP section there is a test upload. did you run that and was it successful?

In meteobridge in the Services section there is also a test FTP to make sure that is working correctly. In meteobridge make sure you are using port 21 and not 22 for ftp uploads. In Foscam FTP settings under Network... Port 21 and Passive Mode. Check the test there also. if it fails something is wrong in spelling, path, camrename.php.

Somewhere and I don't know where there is a 60 min not 600 sec issue.

As I said... Tom can fix it if you will allow.

Andy

P.S. You can disregard my suggestion on the PHP version as Toms (read up a few posts ago) fixes that and I am on PHP 7.2 and all is working fine. PHP 5.6 expires 12/2018

Also you should take Toms advise and move your cronjobs off your meteobridge to (https//cron-jobs.org) to take the extra load off your meteobridge.
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 » Sat Aug 25, 2018 6:32 am

Sorry about that I missed the resolved message. Good work Tom. We all appreciate it and others can link to this if the have the same issue in the future.

I vote for Tom to get an EXPERT FORCASTER badge... ;)
Image

Post Reply