Page 2 of 10

Re: Weather on the wall, or my wBox :)

Posted: Mon 25 Dec 2017 3:29 pm
by bthoven
Here is mine.
2D804649-9290-4705-BB09-656E3BD1B9D6.jpeg

Re: Weather on the wall, or my wBox :)

Posted: Mon 25 Dec 2017 5:21 pm
by Smarmen
OK, I'm not sure, but let's go :)
File yrnoGenerIcoHtml.php Have you changed anything here?

Show me content from the row 224 to 227

Re: Weather on the wall, or my wBox :)

Posted: Mon 25 Dec 2017 11:31 pm
by bthoven
Smarmen wrote:OK, I'm not sure, but let's go :)
File yrnoGenerIcoHtml.php Have you changed anything here?

Show me content from the row 224 to 227
I did not touch anything in the file.
Ok, I know why now, because I changed $lang from "pl" to "en" in yrnoSettings file; so it returned weather status values in English text, and yrnoGenerIcoHtml can't match the English status. When I change it back to pl, it works.
3F353723-7051-4CB2-86DA-5BAC5E9B194E.jpeg

Re: Weather on the wall, or my wBox :)

Posted: Tue 26 Dec 2017 3:17 am
by bthoven
Hi,

Another question if you don't mind.

The Moon phase seems a bit too advanced; for example, today Moon phase is just around 49%, but it shows over 50%. Not sure how to fix this.
Capture.JPG
What is should be:
Capture2.JPG
Thank you

Re: Weather on the wall, or my wBox :)

Posted: Tue 26 Dec 2017 7:36 am
by Smarmen
Ok, I know why now, because I changed $lang from "pl" to "en" in yrnoSettings file; so it returned weather status values in English text, and yrnoGenerIcoHtml can't match the English status. When I change it back to pl, it works.
That's what I thought, but I wanted to make sure. You wanted well, but... "the devil is in the details" :evil:

You know, I wrote that this is not a ready and complete solution for everyone. I think it can be adjusted.

In yrnoGenerIcoHtml.php, row 224 to 227, now it is:

Code: Select all

			   if ($dayText2 == 'rano')     { $arrDay[]= '<img src="ico/_iFCtime1.png" title="do południa" alt ="" width ="50"/>';
		} else if ($dayText2 == 'południe') { $arrDay[]= '<img src="ico/_iFCtime2.png" title="w południe"  alt ="" width ="50"/>';
		} else if ($dayText2 == 'wieczór')  { $arrDay[]= '<img src="ico/_iFCtime3.png" title="po południu" alt ="" width ="50"/>';
		} else if ($dayText2 == 'noc')      { $arrDay[]= '<img src="ico/_iFCtime4.png" title="w nocy"      alt ="" width ="50"/>';
Try changes:
1. File yrnoSettings.php - change $lang from "pl" to "en"
2. File yrnoGenerIcoHtml.php - replace row 224 to 227

Code: Select all


			   if ($dayText2 == 'morning')   { $arrDay[]= '<img src="ico/_iFCtime1.png" title="morning"   alt ="" width ="50"/>';
		} else if ($dayText2 == 'afternoon') { $arrDay[]= '<img src="ico/_iFCtime2.png" title="afternoon" alt ="" width ="50"/>';
		} else if ($dayText2 == 'evening')   { $arrDay[]= '<img src="ico/_iFCtime3.png" title="evening"   alt ="" width ="50"/>';
		} else if ($dayText2 == 'night')     { $arrDay[]= '<img src="ico/_iFCtime4.png" title="night"     alt ="" width ="50"/>';
3. In the files aYRfull.php, aYRico.php, aYRmin.php must be adjusted after the tag meta name="Keywords" content=...

And NOW look this:
http://bthoven.dyndns.biz:802/wBox/yr/aYRfull.php
http://bthoven.dyndns.biz:802/wBox/yr/aYRico.php
http://bthoven.dyndns.biz:802/wBox/yr/aYRmin.php
What You think about? :mrgreen: You can use it on your webpages


About MOONphase - I know... and I'm still going to improve it :) This is related to the approximation of the image of light - full moon is OK. The procedure (not mine) is contained in the library moon-phase.js

Sorry for my googlish :)
Pozdrawiam

Re: Weather on the wall, or my wBox :)

Posted: Tue 26 Dec 2017 3:56 pm
by bthoven
Hi Pozdrawiam,

Thanks a lot. Great forecast pages.

Now I’ll try to put my webcam image (with auto refresh) into your template. May have to adjust some spacing. Never do web coding before. Any suggestion?

Re: Weather on the wall, or my wBox :)

Posted: Tue 26 Dec 2017 4:13 pm
by Smarmen
Hi
My name is Krzysiek (Chris).
Polish word "pozdrawiam" means regards :mrgreen:

About webcam - set it to takes pictures and i.e. every 30 seconds send to your server with the same name - let them overwrite. When it's be ready, send me a link to the photo, for example: http://bthoven.dyndns.biz:802/wBox/webcamimg.jpg
The photo file must be very small ! Otherwise all webpage will be slower.

Re: Weather on the wall, or my wBox :)

Posted: Tue 26 Dec 2017 4:19 pm
by bthoven
Hi Chris,

Really sorry. :o

My webcam image is at http://bthoven.dyndns.biz:802/europacafe.jpg

Sorry I can’t move it to wBox folder because the photo is being used by many weather templates now.

Re: Weather on the wall, or my wBox :)

Posted: Tue 26 Dec 2017 4:39 pm
by Smarmen
Hi
No problems, it's fun :D
The picture does not have to be in wBox folder - it's OK, it may be different, as it is now.
Give me a some time, I must try my idea :idea:

Re: Weather on the wall, or my wBox :)

Posted: Tue 26 Dec 2017 5:26 pm
by bthoven
Smarmen wrote:Hi
No problems, it's fun :D
The picture does not have to be in wBox folder - it's OK, it may be different, as it is now.
Give me a some time, I must try my idea :idea:
Hi Chris...thanks a lot...Chote.

Re: Weather on the wall, or my wBox :)

Posted: Tue 26 Dec 2017 6:45 pm
by grwkak
Using the templates and thanks to your changes have the forecast icons correct. I like the look and simplicity.

I did note that if you use inches for rain in yrnosettings.php then it fails to load forecast icons. I am using imperial units - all the others seem to work fine except rain!

My barometer is in inHg and does not display decimals - been looking to see how to change this - any suggestions?

Guy

http://wilsonsweather.host-ed.me/wBoxH.html

Re: Weather on the wall, or my wBox :)

Posted: Wed 27 Dec 2017 5:50 pm
by Smarmen
Hi Chris...thanks a lot...Chote.
Hi Chote
OK, download this: http://andreovia.pl/weather/doc/wBoxVcam.zip
Unpack and GO! :D
I am not satisfied with this solution, I would not put a webcam picture on this website, but if you want...

Here is a piece of code that supports webcam - row 16 to 27 in file wBoxVcam.html

Code: Select all

		<img class="NoNo" id="wcam" style="top:260px;  left: 10px;" src="http://bthoven.dyndns.biz:802/europacafe.jpg" alt="Loading..." height="280px" />
			<script language="javascript" type="text/javascript" >
				<!--
				function changeFot()
					{
						var d = new Date();
						var t = d.getTime();
						document.getElementById('wcam').src = "http://bthoven.dyndns.biz:802/europacafe.jpg?"+t;
					}
				var reloadcam = setInterval("changeFot()",2000);
				-->
			</script>
Note that the image address is saved as absolute - this is not a good solution, but it works :)
If someone wants to use it, he has to change the address accordingly.

Regards
Chris

Re: Weather on the wall, or my wBox :)

Posted: Wed 27 Dec 2017 6:31 pm
by Smarmen
grwkak wrote: I did note that if you use inches for rain in yrnosettings.php then it fails to load forecast icons. I am using imperial units - all the others seem to work fine except rain!
Look to file yr/yrnoSettings.php, row 35 to 40 - maybe you're deleting a space before signs?

Code: Select all

$uomTemp = '&deg;C';					// or = &deg;F
$uomRain = ' mm';						// or = in
$uomWind = ' km/h';					 // or = kts, m/s, mph
$uomBaro = ' hPa';					  // or = hPa, mb, inHg
$uomSnow = ' cm';					   // or = cm, in
$uomDistance = ' km';				  // or = km, mi
My barometer is in inHg and does not display decimals - been looking to see how to change this - any suggestions?
Yeah, look to file lib/wBox.js, row 47

Code: Select all

$('#RT11').text(Math.round(dataRT[10]));
Press value is rounded, replace code and will be fine

Code: Select all

$('#RT11').text(dataRT[10]);
You can do it :D
Regards

Re: Weather on the wall, or my wBox :)

Posted: Wed 27 Dec 2017 8:41 pm
by grwkak
Fixed the barometer issue - thanks!

With the rainfall - I had tried the space before - it made no difference.

The error (when executing the php script aYRico.php) is:

Invalid UOM for Rain: unit used in -
Program wil halt. Please change the settings in the yrnoSettings.php script

Guy

Re: Weather on the wall, or my wBox :)

Posted: Wed 27 Dec 2017 11:57 pm
by bthoven
Smarmen wrote:
Hi Chris...thanks a lot...Chote.
Hi Chote
OK, download this: http://andreovia.pl/weather/doc/wBoxVcam.zip
Unpack and GO! :D
I am not satisfied with this solution, I would not put a webcam picture on this website, but if you want...

Here is a piece of code that supports webcam - row 16 to 27 in file wBoxVcam.html

Code: Select all

		<img class="NoNo" id="wcam" style="top:260px;  left: 10px;" src="http://bthoven.dyndns.biz:802/europacafe.jpg" alt="Loading..." height="280px" />
			<script language="javascript" type="text/javascript" >
				<!--
				function changeFot()
					{
						var d = new Date();
						var t = d.getTime();
						document.getElementById('wcam').src = "http://bthoven.dyndns.biz:802/europacafe.jpg?"+t;
					}
				var reloadcam = setInterval("changeFot()",2000);
				-->
			</script>
Note that the image address is saved as absolute - this is not a good solution, but it works :)
If someone wants to use it, he has to change the address accordingly.

Regards
Chris

Hi Chris,

Thank you very much. It's really nice. Could you help do the same for the H version that have indoor temp/humidity? It would also be nice to have indoortemp/humidity for this V version. If I may ask. :)

Yours is my favorite now.
wboxwebcam.JPG
then followed by a combination of widgets on Android:
widgets.JPG