Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
webcam
Moderator: daj
- dazza1223
- Posts: 860
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
webcam
hi all i have my webcam setup but erver so offen the webpage refresh and it ony got half as it will be in the middle of writing the jpg to a directory when the ajax refresh occurs, so instead of displaying a broken image
so here the js
file var t_webcam = 1 // interval in seconds
image_webcam = "/images/webcam.jpg" //name of the image
function Start_webcam() {
tmp_webcam = new Date();
tmp_webcam = "?"+tmp_webcam.getTime()
document.images["refreshwebcam"].src = image_webcam+tmp_webcam
setTimeout("Start_webcam()", t_webcam*1000)
}
Start_webcam();
so here the js
file var t_webcam = 1 // interval in seconds
image_webcam = "/images/webcam.jpg" //name of the image
function Start_webcam() {
tmp_webcam = new Date();
tmp_webcam = "?"+tmp_webcam.getTime()
document.images["refreshwebcam"].src = image_webcam+tmp_webcam
setTimeout("Start_webcam()", t_webcam*1000)
}
Start_webcam();
- vaggos
- Posts: 160
- Joined: Sat 06 Feb 2010 7:00 pm
- Weather Station: PROWEATHER STATION 1080
- Operating System: XP SP3, win7, Win10
- Location: Acharnes Athens Greece
- Contact:
Re: webcam
Try this:
Change the dimensions and the time of refresh (in msec)
Code: Select all
<IMG name="webcam"
width="240" height="177" alt="Please wait the image will appear soon"
src="../images/webcam.jpg"
border="0"></A>
<SCRIPT language="JavaScript" type="text/javascript">
interval = 60000;
imgsrc = "../images/webcam.jpg"
tmp = new Date();
tmp = "?" + tmp.getTime();
document.images["webcam"].src = imgsrc + tmp;
setTimeout("Refresh()", interval);
}
Refresh();
Acharnes Athens Greece Meteo station
http://www.meteoacharnes.gr
https://weather.meteoacharnes.gr/
Thanks Sandaysoft
- dazza1223
- Posts: 860
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: webcam
so do i put that in the js or html mate
- vaggos
- Posts: 160
- Joined: Sat 06 Feb 2010 7:00 pm
- Weather Station: PROWEATHER STATION 1080
- Operating System: XP SP3, win7, Win10
- Location: Acharnes Athens Greece
- Contact:
Re: webcam
It's script and put it i the place you want to have your webcam image in .html file.dazza1223 wrote:so do i put that in the js or html mate
Acharnes Athens Greece Meteo station
http://www.meteoacharnes.gr
https://weather.meteoacharnes.gr/
Thanks Sandaysoft
- dazza1223
- Posts: 860
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: webcam
so it gose in the html then?
Code: Select all
[attachment=0]webcam.rar[/attachment]
You do not have the required permissions to view the files attached to this post.
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: webcam
Like dazza vaggos said ... (oops)
replace your line #67
With (modified for your image size):
BTW - you have a closing </div> too many @ line #78
replace your line #67
Code: Select all
<img src="/images/webcam.jpg" width="1000" height="690" name="refreshwebcam"><SCRIPT src="js/webcam_refresh.js" language="JavaScript" type="text/javascript" ></SCRIPT>
Code: Select all
<IMG name="webcam"
width="1000" height="690" alt="Please wait the image will appear soon"
src="../images/webcam.jpg"
border="0"></A>
<SCRIPT language="JavaScript" type="text/javascript">
interval = 60000;
imgsrc = "../images/webcam.jpg"
tmp = new Date();
tmp = "?" + tmp.getTime();
document.images["webcam"].src = imgsrc + tmp;
setTimeout("Refresh()", interval);
}
Refresh();
</script>
Last edited by beteljuice on Thu 06 Apr 2017 9:02 am, edited 2 times in total.
......................Imagine, what you will KNOW tomorrow !
- dazza1223
- Posts: 860
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: webcam
thank u i give it a go to night
- dazza1223
- Posts: 860
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: webcam
ok it work but it dont auto refresh
Code: Select all
[attachment=0]webcamT (1).rar[/attachment]
You do not have the required permissions to view the files attached to this post.
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: webcam
You didn't "CODE: SELECT ALL"
You missed the closing
.. at the end of the code.
You missed the closing
Code: Select all
</script>
......................Imagine, what you will KNOW tomorrow !
- dazza1223
- Posts: 860
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: webcam
o sorry i for got that one lol OK i put it in but it still not auto refreshing mate
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: webcam
As we always say ......
a link would be useful !
a link would be useful !
......................Imagine, what you will KNOW tomorrow !
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: webcam
Hmm ...
The only thing I can see (unless some of the jquery stuff is hanging) is that line #73
is missing the closing ;
The only thing I can see (unless some of the jquery stuff is hanging) is that line #73
Code: Select all
imgsrc = "../images/webcam.jpg"
Code: Select all
imgsrc = "../images/webcam.jpg";
......................Imagine, what you will KNOW tomorrow !
- dazza1223
- Posts: 860
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: webcam
lol nope when i put that in it dont even show the photo
- ConligWX
- Posts: 1613
- Joined: Mon 19 May 2014 10:45 pm
- Weather Station: Davis vPro2+ w/DFARS + AirLink
- Operating System: Ubuntu 22.04 LTS
- Location: Bangor, NI
- Contact:
Re: webcam
You have a <img> tag, so why are you using "imgsrc" attribute ?
it should be "src" not "imgsrc"
remove the </a> too. this is only used is html ref to links, not img. img can close with just />
it should be "src" not "imgsrc"
Code: Select all
<img src="../images/webcam.jpg" name="webcam" width="1000" height="690" alt="Please wait the image will appear soon" border="0" />
Regards Simon
https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir • CumulusMX v4.0.0
https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir • CumulusMX v4.0.0