Monthly Archives: August 2014

HTML5 Conversion complete

I’ve spent a good part of a week updating/correcting/fixing all my web pages to be compliant to HTML5 specs.
Not a fun job i tell you.But i also fixed all the mistakes as well.

So now every page is complete. Only one HTML5 error which is my Blink text, this is because it uses the tag that’s been dropped/banned, I get around this by using a style/script in my CSS that takes care of this.
It seems to work in every browser i have and my android phone.

I had to drop my multi coloured blinking text due to the page refresh image script stopping it working..

Anyway, this can be viewed on my site

ACE2’S WEATHER SITE

Templates are shared on my site :

template files

As always, I don’t mind sharing, but please don’t pan them off as your own…

 

Please feel free to make a donation, all donations will be used to improve this blog/weather site

Donate Button with Credit Cards
btn_donateCC_LG
PayPal enabled

 

Advertisements

Edited the overlays

At the start, i was using 1 overlay to display the real-time weather data onto the image, This worked well, but if some figure changed from 1 digit to 2 digits, it would cause the whole line after that to move as well.
It still looked ok…..

Now it’s improved plus a lot more.
I now overlay 8 lots of text on to the image, This includes the real-time data, replacement of site name(was done by camera before) and site address.

The trick of it was to include a template or as i called it main overlay:

Location: Morphett Vale  Date:            Time:          Temp:       Rain:        Wind Speed:          Wind Direction:

This is the main overlay, which is static names that don’t change at all.

I then overlay the data one by one and finally i overlay the address & site name.

I use ffmpeg as my overlay program and all this is done with a single line of very long commands:  it draws a semi-transparent box, sets the font, font colour and position of text

ffmpeg -i snapshot.JPG -vf “[in]drawtext=”fontsize=16:fontcolor=white:shadowcolor=black:box=1:boxcolor=black@0.6:fontfile=”c:/windows/fonts/LTYPEB.ttf”:textfile=layermain.txt:x=40:y=700″, drawtext=fontsize=16:fontcolor=white:box=0:fontfile=”c:/windows/fonts/LTYPEB.ttf”:textfile=’layerdatetime.txt’:x=340:y=700, drawtext=fontsize=16:fontcolor=white:box=0:fontfile=”c:/windows/fonts/LTYPEB.ttf”:textfile=’layertemp.txt’:x=660:y=701,drawtext=fontsize=16:fontcolor=white:box=0:fontfile=”c:/windows/fonts/LTYPEB.ttf”:textfile=’layerrain.txt’:x=780:y=701,drawtext=fontsize=16:fontcolor=white:box=0:fontfile=”c:/windows/fonts/LTYPEB.ttf”:textfile=’layerwind.txt’:x=970:y=701,drawtext=fontsize=16:fontcolor=white:box=0:fontfile=”c:/windows/fonts/LTYPEB.ttf”:textfile=’layerdir.txt’:x=1225:y=701,drawtext=fontsize=16:fontcolor=white:shadowcolor=black:box=1:boxcolor=black@0.3:fontfile=”c:/windows/fonts/LTYPEB.ttf”:textfile=’layername.txt’:x=3:y=4,drawtext=fontsize=16:fontcolor=white:shadowcolor=black:box=1:boxcolor=black@0.3:fontfile=”c:/windows/fonts/LTYPEB.ttf”:textfile=’layeraddress.txt’:x=980:y=4 [out]” -y snapshot.jpg

All the overlay data is generated by Cumulus using web tags.

Date<#date>, Time<#timehhmmss>, Temp<#temp>, Rain<#rfall>, Wind Speed<#wlatest> and Wind Direction<#currentwdir>

These Webtags are processed by Cumulus every 10 seconds and that’s about it.

Please feel free to make a donation, all donations will be used to improve this blog/weather site

Donate Button with Credit Cards
btn_donateCC_LG
PayPal enabled

 

 

 

 

 

Motion detection script for lightning

I re-created the script to include a switch for motion detection, as it is the camera takes a shot if motion is detected, but i’m not sure if it’s fast enough, so……….

I’ll use the camera’s own motion detection as a switch to start my own capture every 4 seconds for 1 hour.

I added a single line into my 10 second script

if exist u:snap\MDAlarm*.jpg start check.bat

This will start my capture script. To make sure it only runs once for the total of the detection time(1 hour). I set the check bat to read a text switch

::check to see if has been trigged before
Find “1” C:\cumulus\scripts\lightning.txt >nul && goto END

If it has never run it starts the next section and set the switch to not allow it to re-run until timer has finished

IF EXIST u:\snap\MDAlarm*.jpg ncftpput -R -u**** -p ****** ftp.******** /lightning U:\snap\MDAlarm*.jpg
IF EXIST u:\snap\MDAlarm*.jpg DEL /F /Q /A “u:\snap\MDAlarm*.jpg”

::check to see if has been trigged before
Find “1” C:\cumulus\scripts\lightning.txt >nul && goto END
::start the lightning grab
taskkill /f /t /im snapafterhours.exe
start lightninggrab.exe

::turn the switch/trigger file to on
xcopy C:\cumulus\scripts\1.txt C:\cumulus\scripts\lightning.txt /y

::start the timer to kill the lightning grabber
start timer.bat

Next i start the snap grabber and set the timer.
Once the timer expires, it resets the switch text file, moves the capture files to another location and waits for the next detection.

Now to wait and see if this works and the best thing is it will still capture via camera as well as this…

 

 

 Please feel free to make a donation, all donations will be used to improve this blog/weather site

Donate Button with Credit Cards
PayPal enabled

CamT

<!–DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;
xmlns=”http://www.w3.org/1999/xhtml”&gt;
<head>
<meta content=”text/html; charset=iso-8859-1″ http-equiv=”Content-Type” />
ACE2’S weather data” />
ACE2’S weather data, weather, data, weather station” />
<span class=”hiddenSpellError” pre=”” data-mce-bogus=”1″>ACE2’S</span> weather

<script type=”text/javascript”>
// Take wind direction value, return the text label based upon 16 point compass — function by beeker425 see http://www.weather-watch.com/smf/index.php/topic,20097.0.html
var langWindDir = new Array(“N”, “NNE”, “NE”, “ENE”,”E”, “ESE”, “SE”, “SSE”,”S”, “SSW”, “SW”, “WSW”,”W”, “WNW”, “NW”, “NNW”);
function wDL ($winddir) // user language NNW
{
return langWindDir[Math.floor(((parseInt($winddir) + 11) / 22.5) % 16 )];
}
</script>

css” rel=”stylesheet” type=”text/css” />
css” rel=”stylesheet” type=”text/css” />
</head>

<body>
<div id=”content”>

ACE2’S WEATHER STATION

<h2 style=”text-align: center; text-transform: none;”>Latitude S 35° 06′ 38″   Longitude E 138° 31′ 39″   Elevation 102 m
<br>

Web Cam&nbsp;

<p align=”center”>
<style style=”text/css”>
.hoverTable{
width:100%;
border-collapse:collapse;
}

/* Define the default color for all the table rows */
.hoverTable tr{
background: ;
}
/* Define the hover highlight color for the table row */
.hoverTable tr:hover {
background-color: transparent
}
</style>

<img src=”snapshot.jpg”width=100% />

<p align=”center”><font color=’red’>Welcome to my after hours Webcam operating between Dusk & Dawn.</font></p>
<p align=”center”><font color=’red’>No time-lapse videos created between dusk & dawn.</font></p>
<p align=”center”><font color=’red’>Please click the image to view the final hourly time-lapse for the day which is the last 3 hours of footage.</font></p>
<p align=”center”>Shots updated every 10 minutes 24 hours a day..<br/>
Feel free to check out the<a href=”video.htm”> time-lapse video’s</a> over the last 3 days as well. <br/>
Main Time-lapse videos created 40 minutes after dusk.<br/>
and check out my archive YouTube channel which has all mytime lapse videos
<p align=”center”>
<td colspan=”4″ class=”td_navigation_bar”>
now&nbsp;:
today&nbsp;:
yesterday&nbsp;:
this&nbsp;month :
monthly&nbsp;records
</td>
<br />
<br />
<td colspan=”4″ class=”td_navigation_bar”>
Observations&nbsp;:
Gauges&nbsp;:
this&nbsp;year : 
records&nbsp;: trends
</td>
<br />
<br />
<td colspan=”4″ class=”td_navigation_bar”>
Time Lapse Video’s&nbsp;:
<a href=”http://www.youtube.com/channel/UC6Nf9MSTJkceTDYCngVIwfQ&#8221; target=”_blank”>YouTube Archive</a>
</td>
<br />
<br />
<td colspan=”4″ class=”td_navigation_bar”>
<a href=”cam.htm”>WebCam</a>&nbsp;:&nbsp;
<a href=”highlights.htm”>Daily Pic Highlights</a>
</td>
<br />
<br />
<td colspan=”4″ class=”td_navigation_bar”>
<a href=”http://ace2irrigationsolutions.wordpress.com/&#8221; target=”_blank”>Gardening Blog</a>&nbsp;:&nbsp;
<a href=”about.htm”>about</a>
</td>
<br />
<br />
<td colspan=”4″ class=”td_navigation_bar”>
<a href=”lightning.htm”>Lightning experiment</a>
</td>
<br />
<br />
<script type=”text/javascript”>
var col = new String();
var x=1;var y;

function blink()
{
if(x%2)
{
col = “rgb(255,0,0)”;
}else{
col = “rgb(0,0,255)”;
}

aF.style.color=col;x++;if(x>2){x=1};setTimeout(“blink()”,500);
}
</script>
<body onload=”blink()”>

<a id=”aF” href=”https://ace2weather.wordpress.com/”><b>**NEW** Weather Station Blog **NEW**</b></a>
<br />

Also see my weather station on Weather Underground which is updated every 5 minutes located in the morphett vale area

and Visit my BLOG with information about home vegie gardening and irrigation fertilizer injector system plus loads more

<img height=”178″ width=”138″ src=”images/weather is.jpg”>

Page updated <#update><br>
Powered By <a href=”http://ace2irrigationsolutions.wordpress.com/&#8221; target=”_blank”>ACE2</a> using <a href=”http://sandaysoft.com/products/cumulus&#8221; target=”_blank”>Cumulus</a>
v1.9.4 (1097))<br>
I can also be contacted by EMAIL: ACE2 WEATHER

<img src=”http://s10.flagcounter.com/mini/UEOh/bg_A3F3FF/txt_000000/border_CCCCCC/flags_0/” alt=”Flag Counter” border=”0″>
</div>
</body>
</html>

 

 

 Please feel free to make a donation, all donations will be used to improve this blog/weather site

Donate Button with Credit Cards
PayPal enabled

thinking of tweaking the motion detection

After we had a storm a few days ago which i think included lightning, the motion detection took 2 shots of a black sky, I’m thinking of writing my own script.
At the moment, i use the camera own interface to detect and capture.

I have a plan to still use the camera’s motion detection, but use this as a switch to start a manual capture every 3 seconds for the rest of the night. I figure i would have a better chance to get a shot of lightning using that method.
Maybe something like below (Run this in the 10 minute script in the script off section with a text switch)

IF EXIST u:\snap\MDAlarm*.jpg Find “1” C:\cumulus\scripts\lightning.txt >nul && goto END & start lightning.bat &

The lightning bat could look like this

* xcopy C:\cumulus\scripts\1.txt C:\cumulus\scripts\lightning.txt /y
* :start
* timeout /nobreak /t 3
* taskkill /f /t /im wget.exe
* wget “http://192.168.1.97:88//cgi-bin/CGIProxy.fcgi?cmd=*********&usr=vistor&  pwd=************&” -O lightning.jpg
ffmpeg -i lightning.jpg-vf “drawtext=”fontsize=16:fontcolor=white:shadowcolor=black:box=1:boxcolor=black@0.6:fontfile=”c:/windows/fonts/LTYPEB.ttf”:textfile=overlay.txt:x=60:y=700″” -q:v 3 c:/cumulus/scripts/lighning/lightning.jpg  -y
* Find “1” C:\cumulus\scripts\lapseswitch.txt >nul && goto END
* goto start
* :END
* exit

Untested of course, but the line in the 10 min script will look for the number 1 in the lightning text file, this will act as a switch and once the text file equal one, it will not reopen /start the bat file again(making it a run once)

The next script will make the lightning text equal 1, pause for 3 seconds(between captures), kill the task if it’s running, this could interfere with my normal afterhours capture, but that doesn’t matter as i don’t keep or use these for time-lapse.
The next wget line take the capture and adds overlay(i might change the details of the overlay for this capture).
Next it’ll look for the sunrise switch and if found close this script down and a final line in the 10 minute script in the on section to over write the lightning text to 0 for the next night.

I’ll give the camera’s own interface one last chance, i edited the selection area to monitor closer to the trees, so we’ll see……..

 

 

 Please feel free to make a donation, all donations will be used to improve this blog/weather site

Donate Button with Credit Cards
PayPal enabled