Author Topic: Weather34 template(non meteobridge versions)  (Read 117960 times)

0 Members and 1 Guest are viewing this topic.

Offline dupreezd

  • Forecaster
  • *****
  • Posts: 512
Re: HOMEWEATHERSTATION Dashboard template
« Reply #325 on: August 29, 2017, 11:03:36 AM »
Need some advise
Yesterday we had a short power outage resulting in this WU entry.

Quote
8:38 AM    -- °F    -- °F    -- %    --    -- mph    -- mph    -- in    -- in    -- in    --    -- w/m²

pws\chartswudata\28082017.txt then contains these values
Quote
2017-08-28 08:38:00,-999.0,-99.9,-100.00,North,-999,-999.0,-999.0,-999,-99.99,,,-99.99,-9999,WH2600 V4.2.1,2017-08-28 13:38:00,

When looking at the today rain graph, it shows a big dip.

in todayrainfall.php
Quote
   function processData2(allText) {
      var allLinesArray = allText.split('\n');
      if(allLinesArray.length>0){
         
         for (var i = 2; i <= allLinesArray.length-1; i++) {
            var rowData = allLinesArray.split(',');
            if ( rowData.length >1)
            //rainfall
            dataPoints1.push({label:moment(rowData[0]).format('HH:mm'),y:parseFloat(rowData[12])});
            
         }
         drawChart(dataPoints1 , dataPoints2 );
      }

I changed the red line to
Quote
if ( rowData[12] >-1)

which 'fixed' the graph.
My PHP knowledge is very limited, so the question is, is there a more elegant solution?
Davis VP2 6163 | WiFi Logger
CWOP - FW0717
Blitzortung 2100

Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: HOMEWEATHERSTATION Dashboard template
« Reply #326 on: August 29, 2017, 11:20:30 AM »
yes the issue lies in the data stored at weather underground that txt file only pulls down what is stored at your weather underground . best way forward use mysql you have some control over it see ideas at the cumulus forum .

the idea you have put out doesn't correct the data stored in the txt file ? but it does erode the values of anything less than -1 being shown. get your head around mysql its far more efficient and reliable..   brian

« Last Edit: August 29, 2017, 11:22:50 AM by weatherist34 »

Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: HOMEWEATHERSTATION Dashboard template
« Reply #327 on: August 29, 2017, 11:39:37 AM »
having looked at your signature your using meteobridge , the mysql solution is right at your finger tips to use . Im really i cant support it just gets too overwhelming at times but rest assured this template used with the meteobridge api function will do a lot things not so apparent . on my website i simply where the ws1001 pings the updateweatherstation.php file every aprox 16 seconds i just added code below into the file which then automatically dumps the data into my database .

this should get you on the right track this is at the bottom of my file updateweatherstation.php this could easily be adapted to the mb.php file which is pinged or called by meteobridge at intervals when using this template you just have to adapt it according to the meteobridge tags .. end of each day i run an automated empty script at 11:59 and append the daily data a monthly and yearly csv file the database never gets to large and so easy to manage.. and the server never has to deal with a database with millions of rows .hence it runs smoothly and hosting companies like that :-)

 //insert into daily mysqli table
    mysqli_query($conn,"INSERT INTO weatherstation(time,outsideTemp,barometer,raintoday,UV,windgustmph,windSpeed,radiation,dewpoint,rainrate,direction,date,lightning)
    VALUES('$updated', '$temp', '$barometer','$raintoday','$uv','$windgust','$windspeed','$solar','$dewpoint','$rainrate','$direction','$date','$lightning')");   
    if (mysqli_connect_errno()) {
     printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
 }
//end mysqli and EOF //

hope it is of some help if not, im sure you can create your own solution..brian


Offline dupreezd

  • Forecaster
  • *****
  • Posts: 512
Re: HOMEWEATHERSTATION Dashboard template
« Reply #328 on: August 29, 2017, 12:03:06 PM »
Quote
the idea you have put out doesn't correct the data stored in the txt file ? but it does erode the values of anything less than -1 being shown

Yes, you are right, it does not fix the data file and I don't mind the wrong data being there. I was more interested to make the graph look right.

Before I had the Meteobridge, I did a redirect of my OIP to a home grown PHP program on my webserver. There I pulled out the data and changed it to CWOP format and then posted it to CWOP.
So I might have the foundation to start.
I run a VM server that acts as my firewall and a number of VM clients, including a webserver.
As it runs 24/7, I have the infrastructure and can easily add a SQL server to it.

Thanks for the information. 
Davis VP2 6163 | WiFi Logger
CWOP - FW0717
Blitzortung 2100

Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: HOMEWEATHERSTATION Dashboard template
« Reply #329 on: August 29, 2017, 12:06:38 PM »
Quote
the idea you have put out doesn't correct the data stored in the txt file ? but it does erode the values of anything less than -1 being shown

Yes, you are right, it does not fix the data file and I don't mind the wrong data being there. I was more interested to make the graph look right.

Before I had the Meteobridge, I did a redirect of my OIP to a home grown PHP program on my webserver. There I pulled out the data and changed it to CWOP format and then posted it to CWOP.
So I might have the foundation to start.
I run a VM server that acts as my firewall and a number of VM clients, including a webserver.
As it runs 24/7, I have the infrastructure and can easily add a SQL server to it.

Thanks for the information.

There you go shouldn't be too much trouble for you anyway always far better to create your own solutions easier to diagnose issues when the arise.. good luck and let us know how get on..brian

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5509
    • KomokaWeather
Re: HOMEWEATHERSTATION Dashboard template
« Reply #330 on: August 29, 2017, 12:45:14 PM »
Quote
a few of you have already downloaded this and are using it and I did not receive any issues sent back or bugs so it is good for general release.
All looks good to me www.komokaweather.com/pws.

I like the webcamS ;)
Enjoy,
Paul

Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: HOMEWEATHERSTATION Dashboard template
« Reply #331 on: August 29, 2017, 01:02:13 PM »
Quote
a few of you have already downloaded this and are using it and I did not receive any issues sent back or bugs so it is good for general release.
All looks good to me www.komokaweather.com/pws.

I like the webcamS ;)
Enjoy,
Paul

Good glad it's ok that's my home alone day over with and currently watching a waterspout develop out at about 2 or 3km  at sea we have had many this year quite unusual the amount we normally get two or three per year but this year I've lost count.. take care... brian..

Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: HOMEWEATHERSTATION Dashboard template
« Reply #332 on: September 02, 2017, 03:18:22 AM »
Good morning

the PM are filtering through as an alternative to get my attention :-) so here is some open answers ..

1. i removed the wind direction SVG icon in the forecast output as it is somewhat tedious on working to get it right in other languages other than english.
the script simply takes the wind direction output in the forecast itself , it doesnt generate a bearing number output like 90 it generates East .
so when looking at the output to generate the corresponding svg icon the issues arise ..

for just one example there could be others
SW in French is SO so would call SO.svg
SE in German is SO so would call SO.svg 

so see the problem it would take a lot of unique scripting to cater for correct icon to display across all the languages the problem shown above is that you cant have two identical named files and it gets messy and would probably require  a separate image folder for each language where one conflicts with the other.so I have removed it . its not just one language to look at it is and was 27 languages and extra icons would have to be made and checked across all languages .Confused?  so Im sorry it was removed and is only available in the WXSIM version .

note all icons are made in SVG i do myself using Sketch or AI using a vector image size of 1600px this way it scales up and down with out any loss of quality and working with SVG has no real bearing on the file size in general most svg's with in this template are less than 4k ! so there is no performance hit unlinke using a png or gif,jpg at image size 1600px .beauty of SVG you can actually edit it directly in a text editor or dedicated html,php,code editor .

example of controlling the output size <svg width="302pt" height="340pt" ....

so scaling up and down as you can see from screenshot scaled up x5 original size in the browser !


2.why the separate downloads for example cu-x5 ? it is for anyones benefit who likes to tweak the template to there liking using the individual versions CU-X5(cumulus) the only code you are using and editing is cumulus related stuff and your not loading up anything unused ..theoretically :-)

3.why cant i use the weatherflow code yet ?  i have only partially added this code for future reference/release of hardware and have not added any other stuff related to weatherflow hardware . until the hardware is fully available to purchase I am not releasing the full api based script or direct hardware script . When its all officially released i will release a dedicated branded version of the template solely for the weatherflow hardware. the code is fully working at my weather station url https://weather34.com once I have received the wind,rain,uv,solar hardware i will put up a full working demo.

4.why the silent updates ? these are just things that were put together and never got released prior to August 2017 . I recently cleared out my ext hard drive and found a few scripts and ideas I had been working on and 90% completed but never added them on to the releases in the past.So thats all they are and they are NOT significant in anyway that changes or adds on extra features there just designed based which theoretically improves the appearance and design..

5.why don't you release the MYSQL version done by Tony(HRVISTA)? best thing is to contact tony and discuss with him i thinks its better as he knows better about his implementation than I .. ps it works really well and could easily be adapted to meteobridge,weather display and so on ..but Im not getting involved mysql support in any way I use it at https://weather34.com and it is uses automated script routines at the end of each day 11:59:40 I never have to do any direct maintenance and it NEVER grows to more than 1mb in size :-) .

6.you recommend WXSIM but its expensive ? well its totally reliable and is a real good EXCELLENT addition to any personal weather station and takes away the emphasis on using the commercial or popular SCRAPED forecast data provided by companies like WU,DarkSky and so on .. you just have justify its cost and it really makes your weather station independent somewhat ! ps I dont use it I dont use any weather based computer software at all I just observe what others use..

so there we are hope that answers some of them openly ..

https://weather34.com/homeweatherstation/




« Last Edit: September 02, 2017, 03:34:27 AM by weatherist34 »

Offline CNYWeather

  • Forecaster
  • *****
  • Posts: 2295
    • CNYWeather
Re: HOMEWEATHERSTATION Dashboard template
« Reply #333 on: September 02, 2017, 08:41:06 AM »
Anyone give me some sunrise/Sunset help?

Tried modifying $rise_zenith and $set_zenith to many different  numbers but I'm not able to come close on the correct numbers.

http://www.cnyweather.com/pws/index.php
Tony




Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: HOMEWEATHERSTATION Dashboard template
« Reply #334 on: September 02, 2017, 09:03:46 AM »
Anyone give me some sunrise/Sunset help?

Tried modifying $rise_zenith and $set_zenith to many different  numbers but I'm not able to come close on the correct numbers.

http://www.cnyweather.com/pws/index.php

no need to adjust anything outside the easyweathersetup.php   check your lat lon you are set at minus   -75.4621124 deg north
Location :-75.4621124 43.1579971  should it not be LAT 43.  LON -75.  ??

BRIAN
« Last Edit: September 02, 2017, 09:11:48 AM by weatherist34 »

Offline CNYWeather

  • Forecaster
  • *****
  • Posts: 2295
    • CNYWeather
Re: HOMEWEATHERSTATION Dashboard template
« Reply #335 on: September 02, 2017, 09:22:32 AM »
Fixed the Lat Lon, showing 16 hours of daylight now Brian.
Tony




Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: HOMEWEATHERSTATION Dashboard template
« Reply #336 on: September 02, 2017, 09:24:40 AM »
TONY are you in New York ??


Offline CNYWeather

  • Forecaster
  • *****
  • Posts: 2295
    • CNYWeather
Re: HOMEWEATHERSTATION Dashboard template
« Reply #337 on: September 02, 2017, 09:26:27 AM »
That is correct Brian.

$id = "KNYWESTM1";
$TZ = "America/New_York";
$UTC = "-4";
$lon = 43.1579971;
$lat = 75.4621124;
Tony




Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: HOMEWEATHERSTATION Dashboard template
« Reply #338 on: September 02, 2017, 09:28:53 AM »
That is correct Brian.

$id = "KNYWESTM1";
$TZ = "America/New_York";
$UTC = "-4";
$lon = 43.1579971;
$lat = 75.4621124;

your still set back to front :-) 
Location : 75.4621124 43.1579971

change to

 Location :43.1579971 75.4621124

if you get stuck just pm the password for easyweather you can change it anytime ..im here for another hour...brian


Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: HOMEWEATHERSTATION Dashboard template
« Reply #339 on: September 02, 2017, 09:52:51 AM »
ok ive adjusted it should be ok now


  Location : 43.157 -75.462      note the minus ..

sunset for new york according to google
19:26 Saturday, 2 September 2017 (GMT-4) Sunset in New York, NY, USA

yours now showing Today 7:35 pm(1925) so thats near enough :-)

have fun old friend...brian..




Offline hapsi

  • Member
  • *
  • Posts: 1
Re: HOMEWEATHERSTATION Dashboard template
« Reply #340 on: September 04, 2017, 02:54:21 AM »
Hi everyone!
I have a problem with my template (34-X 5). I have no MAX / AVG / MIN wind value and barometer. I'm using WS1001. Is there a tip to fix this? Below I marked the values I am writing about.
 [ You are not allowed to view attachments ]

Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: HOMEWEATHERSTATION Dashboard template
« Reply #341 on: September 05, 2017, 06:20:34 AM »
Hi everyone!
I have a problem with my template (34-X 5). I have no MAX / AVG / MIN wind value and barometer. I'm using WS1001. Is there a tip to fix this? Below I marked the values I am writing about.
 [ You are not allowed to view attachments ]

hello sorry for the delay in replying ...

you dont have a problem when using a ws1001 without any additional software/hardware there is NO max/min etc you need software cumulus,weather display etc or hardware like meteobridge .. without the software or hardware you need to be using a MYSQL(i) database . this is where
the max,min,average etc and chart data is pulled from on my site using a WS1001.. So in short you need to read up on using and setting up a MYSQL database on your server.. sorry there is no support from me for database useage , however there is a wealth of information all over the internet in how to set one up..

i received some pm reference the Air Quality Index (aqi) i run on my website at https://weather34.com  screenshot attached it is merely a simple script consisting of a few lines of php and and some css . Here in Istanbul there are numerous air quality based station available , Im fortunate to have one less than half a kilometre away so I use that for the reading ..if you need more information on how to add it on drop me a PM i will be around most of next week..

json output doesn't get any simpler than this

{"aqiv":50,"utime":"2017-09-05 12:00:00","mtime":1504602775,"stime":1504602775}

so the php is simply added into the livedata like this again it doesn't get simpler than this and the output from the station updates hourly

// weather34 Aqi  simple script
$json_string             = file_get_contents("jsondata/aqi.txt");
$parsed_json             = json_decode($json_string);
$aqiweather["aqi"]          = $parsed_json->{'aqiv'};



so the output is a simple circled value with the colour background changes according to the AQIindex colour scale based at https://aqicn.org/scale/




brian
« Last Edit: September 05, 2017, 06:24:05 AM by weatherist34 »

Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: HOMEWEATHERSTATION Dashboard template
« Reply #342 on: September 06, 2017, 04:09:01 AM »
good morning

i have received numerous requests can you just goto http://aqicn.org/city/all/  and determine your nearest AQI station ..the script is using the official aqicn api so just for starters all I need is your nearest AQI station or the url it returns . i will then send you a file to use which you can theoretically just replace existing .note the updates vary from 1 hour to 3 hours based on the actual station itself nothing can be done to reduce the interval data update time from our end..

i will endeavour to send it along next week.. brian


Offline pimohdaimaoh

  • Forecaster
  • *****
  • Posts: 300
  • "Be aware to our nature"
    • PIMOHWEATHER
Re: HOMEWEATHERSTATION Dashboard template
« Reply #343 on: September 06, 2017, 11:05:56 PM »
good morning

i have received numerous requests can you just goto http://aqicn.org/city/all/  and determine your nearest AQI station ..the script is using the official aqicn api so just for starters all I need is your nearest AQI station or the url it returns . i will then send you a file to use which you can theoretically just replace existing .note the updates vary from 1 hour to 3 hours based on the actual station itself nothing can be done to reduce the interval data update time from our end..

i will endeavour to send it along next week.. brian


Thanks for this brian, however no active AQI sensors installed around so I will request if I installed already my own AQI sensor. . . . .

-Mike-
« Last Edit: September 10, 2017, 03:50:58 AM by pimohdaimaoh »

Offline jmontamat

  • Member
  • *
  • Posts: 9
Re: HOMEWEATHERSTATION Dashboard template
« Reply #344 on: September 09, 2017, 07:12:45 AM »

Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: HOMEWEATHERSTATION Dashboard template
« Reply #345 on: September 10, 2017, 04:00:31 AM »
Thanks Brian.

http://aqicn.org/city/spain/catalunya/barcelona-eixample/

Josep.

morning Josep

sent via mail ..backup your original temperature.php but no problems reported yet.

brian

Offline jmontamat

  • Member
  • *
  • Posts: 9
Re: HOMEWEATHERSTATION Dashboard template
« Reply #346 on: September 10, 2017, 07:31:25 AM »
« Last Edit: September 10, 2017, 07:35:25 AM by jmontamat »

Offline nitrx

  • Senior Contributor
  • ****
  • Posts: 277
    • Apeldoorn-Oost The Netherlands
Re: HOMEWEATHERSTATION Dashboard template
« Reply #347 on: September 10, 2017, 09:08:55 AM »
Slightly offtopic @Brian or someone who has sold the wetherfow station is the price for a Weatherflow/sky station included taxes for Europe I mean is the current price 209 dollar included all?
Ron
Cumulus software
Apeldoorn NL
http://www.apeldoornmeteo.nl

several languages

Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: HOMEWEATHERSTATION Dashboard template
« Reply #348 on: September 10, 2017, 09:54:42 AM »
Hello I don't know exactly  I was sent a test unit I didn't pay anything apart from customs clearance.I think Piet from your country ordered one a few months ago perhaps check with him I think his forum name is giantocr if not I can send you his email . Brian

I should add my test unit is not the final product there has been some changes since I received it a few months ago..

Offline nitrx

  • Senior Contributor
  • ****
  • Posts: 277
    • Apeldoorn-Oost The Netherlands
Re: HOMEWEATHERSTATION Dashboard template
« Reply #349 on: September 10, 2017, 10:06:00 AM »
Hello I don't know exactly  I was sent a test unit I didn't pay anything apart from customs clearance.I think Piet from your country ordered one a few months ago perhaps check with him I think his forum name is giantocr if not I can send you his email . Brian

I should add my test unit is not the final product there has been some changes since I received it a few months ago..
Thanks Brian I already contacted Piet viceversa , so I can expect costums clearence , anyway the station specs looks fine I'll wait till they roll out defenenitiv it takes long.

Anyway thanks for the feedback

regards Ron
Ron
Cumulus software
Apeldoorn NL
http://www.apeldoornmeteo.nl

several languages