WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Custom Website Templates => Topic started by: MatteoPV on May 13, 2019, 11:48:17 AM

Title: Help for my website
Post by: MatteoPV on May 13, 2019, 11:48:17 AM
Guys, I ask for advice.
A few days ago I installed a Davis Vantape Pro 2 that uploads the data to my WeatherLink Pro account via the wifi logger. Now I'd like to build my own website, I've already bought the domain.

Are there templates already made, ready to set?

Can I somehow use my WeatherLink Pro account data?
Title: Re: Help for my website
Post by: PaulMy on May 13, 2019, 01:22:55 PM
This is updated by WiFiLogger realtime.txt www.komokaweather.com/wifi-console/realtime.txt file for current conditions in template  http://www.komokaweather.com/pws-wfl/
Template here https://cumuluswiki.wxforum.net/a/HomeWeatherStationTemplate
You do not need to have or run Cumulus to use it.

Enjoy,
Paul


 
Title: Re: Help for my website
Post by: MatteoPV on May 13, 2019, 01:32:21 PM
Very beautifull!!!!!! So the wifi logger provides data directly to the template !!! It's not that you have a step by step guide ...... I read a little bit around but I'm confused
Title: Re: Help for my website
Post by: PaulMy on May 13, 2019, 02:37:11 PM
For that template you would download the zip, unzip, upload (via Filezilla) the unzipped files to your webserver.
Then from a web browser you would initially run the template which prompts to the Easyweathersetup page for you to fill in all the necessary setup information, which includes where to obtain some of the third party links, API key, etc. that you would need from the listed third-party sites.  And that is it.  Reasonably well explained in the Readme.  While this Cumulus version template is catered to use the Cumulus realtime.txt file you can run it without using Cumulus and use the WiFiLogger realtime.txt as the source instead.

There are other versions of this template such as Wim's www.komokaweather.com/pws-wu that use the Weather Underground data.

If you're still confused, just ask specifically on what, or where to go next.

Enjoy,
Paul 



Title: Re: Help for my website
Post by: MatteoPV on May 14, 2019, 07:35:25 AM
I did what you told me. I uploaded the files with filezilla and went to the adjustment page ........ I still have to adjust so many things but I succeed. At one point he asks me where to get the weather data, how can I make the wifi logger send me the txt file in real time ???
Title: Re: Help for my website
Post by: PaulMy on May 14, 2019, 09:37:37 AM
Glad you got it started.  Any web link?

The WiFiLogger settings for FTP realtime.txt export is only in 1 minute.
However the MQTT settings for realtime.txt is in seconds.

And sorry, I don't know anything about MQTT.

Enjoy,
Paul
Title: Re: Help for my website
Post by: MatteoPV on May 14, 2019, 01:36:37 PM
My wifi logger goes to update the realtime.txt file on my web server, now how do I set the template to let it use that file ??? The realtime file is correct, as structure is the same as yours but then the values ​​I get on the template are incorrect. What path did you set on the template to make it take that file?
Title: Re: Help for my website
Post by: wvdkuil on May 14, 2019, 02:09:01 PM
My wifi logger goes to update the realtime.txt file on my web server, now how do I set the template to let it use that file ??? The realtime file is correct, as structure is the same as yours but then the values ​​I get on the template are incorrect. What path did you set on the template to make it take that file?

As all persons who will try to help you  seem not  to be "clairvoyant" , you should post a link to the website.
We want to click on that link to see what the problem is.

Also the link to the realtime.txt file would be helpful.

Wim
Title: Re: Help for my website
Post by: MatteoPV on May 14, 2019, 02:51:44 PM
Meanwhile, I put the link of my site under construction:

http://www.meteocamporamoso.it/pwsWD/

This is the linck of the realtime.txt file:

http://www.meteocamporamoso.it/pwsWD/demodata/realtime.txt

The wifi logger updates the realtime.txt file every 10 minutes. I set the template as if drawing the file from Cumuls.

I also made the official WeatherLink Pro APIs, they work but I haven't found a guide on how to use them
Title: Re: Help for my website
Post by: wvdkuil on May 14, 2019, 03:00:01 PM
Meanwhile, I put the link of my site under construction:

http://www.meteocamporamoso.it/pwsWD/

This is the linck of the realtime.txt file:

http://www.meteocamporamoso.it/pwsWD/demodata/realtime.txt

The wifi logger updates the realtime.txt file every 10 minutes. I set the template as if drawing the file from Cumuls.

I also made the official WeatherLink Pro APIs, they work but I haven't found a guide on how to use them
You have to change  the location of your upload-file in easyweather from
Code: [Select]
/htdocs/pwsWD/demodata/realtime.txtto
Code: [Select]
./demodata/realtime.txtThen the scripts can find your file.
===
For your FTP program you have to use the "outside" address as that calls in form your home:  /htdocs/pwsWD/demodata/realtime.txt

The scripts on your website use an "inside address", they are already in the pwsWD folder and they use
"./" for start from here plus the folder name plus "/"  and the filename

Wim
Title: Re: Help for my website
Post by: wvdkuil on May 14, 2019, 03:05:50 PM
. . . shortened . . .
I also made the official WeatherLink Pro APIs, they work but I haven't found a guide on how to use them
You have to select in easyweather at "How dow we get our live data?" the "Weatherlink.com ...api"
Then you answer the other questions and at the bottom of the list you fill in the three wl.com fields

Wim
Title: Re: Help for my website
Post by: MatteoPV on May 14, 2019, 03:28:02 PM
First of all, thank you !!!! It works well even if with some inaccuracy on the minimum and minimum temperature data.

Tomorrow I also test with API.

I have to play a little
Title: Re: Help for my website
Post by: MatteoPV on May 15, 2019, 08:52:24 AM
Nothing to do, it just doesn't work. Even if now the path sel realtime file seems correct it does not read cmuqneu the data, I do not understand. It seems a wrong setting of the realtime file creation by the wifi logger; how did you set the file creation in the wifi logger ??? What spaces left, etc.

I tried the API configuration .... once set, when I try to check the site it tells me 'invalid data'. Now the site is noline with the API configuration, you can check but it doesn't go
Title: Re: Help for my website
Post by: wvdkuil on May 15, 2019, 08:59:56 AM
. . . shortened . . .
I tried the API configuration .... once set, when I try to check the site it tells me 'invalid data'. Now the site is noline with the API configuration, you can check but it doesn't go
Using weatherlink.com you need to set the correct api key , password and DID. I attach a screenshot of a working website.
Title: Re: Help for my website
Post by: wvdkuil on May 15, 2019, 09:04:33 AM
Nothing to do, it just doesn't work. Even if now the path sel realtime file seems correct it does not read cmuqneu the data, I do not understand. It seems a wrong setting of the realtime file creation by the wifi logger; how did you set the file creation in the wifi logger ??? What spaces left, etc.
. . . shortened . . .
As you switched to using the wl.com api it is impossible to test the cumulus version..
Decide which version you want to test first. I can take a look if it does not work correctly and check the file.

Wim

The realtime.txt file is a "spaces-seperated"files where every space ends a field.
Your copy contains extra spaces which results in extra fields.
The scripts can not find the correct data with your realtime.txt file as they expect the data in the correct place not one or two fields further on.
Code: [Select]
05/15/19 15:04:01  8 70 3.2 13.0 19.3 168 0.00 0.00 1016.1 S 3 km/h C mb mm --- --- 1.60 1.60 --- 18 50  7 --- 10 9:42  2 6:24 33.8 10:45 33.8 10:45 1017.4 0:00 1015.1 6:03 2.16 2.16 33.8  8 --- --- 0.00 --- --- 0.00 0 0 0 0 0 0 0 0 0 0 A screenshot shows on the left a correct file from a download, on the right your file.

Wim

Title: Re: Help for my website
Post by: MatteoPV on May 15, 2019, 09:16:21 AM
Here I am!! Meanwhile, thanks for the answers.
Now I made the API configuration. I tried the Key API like WeatherLink with its scripts, it works .... but then put it here, it tells me it's wrong. I don't understand where I'm wrong. If you can take a look you would do me a favor
Title: Re: Help for my website
Post by: wvdkuil on May 15, 2019, 09:25:58 AM
Here I am!! Meanwhile, thanks for the answers.
Now I made the API configuration. I tried the Key API like WeatherLink with its scripts, it works ....
but then put it here, it tells me it's wrong.
You can only use your own API-key which you find on the weatherlink.com dashboard. API-keys from the documentation do not work in real life.
ALSO copy and paste the API-keu from your dashboard AND check if there are no spaces before or after the key.
Quote
I don't understand where I'm wrong. If you can take a look you would do me a favor
I can not take a look as the website will not start.
If I want to look to your settings, you should PM me the password which you later can change after we have it working.

Wim
Title: Re: Help for my website
Post by: PaulMy on May 15, 2019, 09:26:35 AM
Quote
It seems a wrong setting of the realtime file creation by the wifi logger; how did you set the file creation in the wifi logger ??? What spaces left, etc.
Wim is much more knowledgeable on this than I and working on one version (Wim's) will be the best until you've it it working, but for me the CU-HWS-2019-02 version by Ken (Saratogawx) works directly from the realtime.txt created and uploaded by WiFiLogger.

I have WiFiLogger upload the realtime.txt to my public_html/wifi-console folder so www.komokaweather.com/wifi-console/realtime.txt (http://www.komokaweather.com/wifi-console/realtime.txt)
I have FTP my HWS files in public_html/pws-wfl folder so www.komokaweather.com/pws-wfl (http://www.komokaweather.com/pws-wfl)
I have in HWS settings for "Your path to data file" entered as: ../wifi-console/realtime.txt

Unfortunately I can't check your realtime.txt file as clicking on the previously provided link gives me Warning: Potential Security Risk Ahead each time I try those links.

Enjoy,
Paul
Title: Re: Help for my website
Post by: MatteoPV on May 15, 2019, 09:31:02 AM
Nothing to do, it just doesn't work. Even if now the path sel realtime file seems correct it does not read cmuqneu the data, I do not understand. It seems a wrong setting of the realtime file creation by the wifi logger; how did you set the file creation in the wifi logger ??? What spaces left, etc.
. . . shortened . . .
As you switched to using the wl.com api it is impossible to test the cumulus version..
Decide which version you want to test first. I can take a look if it does not work correctly and check the file.

Wim

The realtime.txt file is a "spaces-seperated"files where every space ends a field.
Your copy contains extra spaces which results in extra fields.
The scripts can not find the correct data with your realtime.txt file as they expect the data in the correct place not one or two fields further on.
Code: [Select]
05/15/19 15:04:01  8 70 3.2 13.0 19.3 168 0.00 0.00 1016.1 S 3 km/h C mb mm --- --- 1.60 1.60 --- 18 50  7 --- 10 9:42  2 6:24 33.8 10:45 33.8 10:45 1017.4 0:00 1015.1 6:03 2.16 2.16 33.8  8 --- --- 0.00 --- --- 0.00 0 0 0 0 0 0 0 0 0 0 A screenshot shows on the left a correct file from a download, on the right your file.

Wim

I imagined there was such a problem. In the wifi logger c 'is an' FTP file setting 'entry and asks me:

'FTP file settings:
Date Format:
Date Separator:

here is the problem. I don't know how to adjust here
Title: Re: Help for my website
Post by: wvdkuil on May 15, 2019, 09:34:00 AM
Quote
It seems a wrong setting of the realtime file creation by the wifi logger; how did you set the file creation in the wifi logger ??? What spaces left, etc.
Wim is much more knowledgeable on this than I, but for me the CU-HWS-2019-02 version by Ken (Saratogawx) works directly from the realtime.txt created and uploaded by WiFiLogger.

I have WiFiLogger upload the realtime.txt to my public_html/wifi-console folder so www.komokaweather.com/wifi-console/realtime.txt (http://www.komokaweather.com/wifi-console/realtime.txt)
I have FTP my HWS files in public_html/pws-wfl folder so www.komokaweather.com/pws-wfl (http://www.komokaweather.com/pws-wfl)
I have in HWS settings for "Your path to data file" entered as: ../wifi-console/realtime.txt

Unfortunately I can't check your realtime.txt file as clicking on the previously provided link gives me Warning: Potential Security Risk Ahead each time I try those links.

Enjoy,
Paul
The security warning is about an invalid https certificate, annoying to say the least.

Below the first fields of realtime.txt from komokaweather without the extra spaces.
That realtime.txt is exactly as it should be. No problems, all fields in the right place.  WD34 template works fine.
So there must be a glitch in generating the other file.

Wim
Code: [Select]
    [0] => 05/15/19
    [1] => 09:27:06
    [2] => 15.1
    [3] => 47
    [4] => 3.9
    [5] => 3.1
    [6] => 3.2
    [7] => 305
    [8] => 0.00
    [9] => 0.20
    [10] => 1013.8
    [11] => NW
    [12] => 1
    [13] => km/h
    [14] => C
    [15] => hPa
    [16] => mm
    [17] => ---
    [18] => ---
    [19] => 62.20
    [20] => 286.20
    [21] => ---
    [22] => 24.9
    [23] => 35
Title: Re: Help for my website
Post by: MatteoPV on May 15, 2019, 09:46:49 AM
How can I check if I have the spaces or not ??? What program did you open the realtime.txt file ??

As for API, it's a mystery. I copied / pasted the Key present in my official WeatherLink dashboard, I checked that there are no spaces, etc. I put my password that I use to pass in WeatherLink and then the DID of my VP2 ....... doesn't go.
Title: Re: Help for my website
Post by: wvdkuil on May 15, 2019, 10:31:33 AM
How can I check if I have the spaces or not ??? What program did you open the realtime.txt file ??
With your own link you can check your file also https://www.meteocamporamoso.it/pwsWD/demodata/realtime.txt

But it is easier when using the debug-console of the HWS-template: https://www.meteocamporamoso.it/pwsWD/w34_module_test.php
Click the button "list contents" (the  "./demodata/realtime.txt" is selected by default as it is in your easyweather settings)
The file is displayed in the bottom part, where you can see the extra space
Code: [Select]
Unprocessed first 50 characters of the file :05/15/19 16:13:02  9 69 3.6 2.9 0.0 31Clicking on "List this file as space separeted fields file" shows the vertical list.
All files uploaded or stored to be used later can be inspected this way.

Quote
As for API, it's a mystery. I copied / pasted the Key present in my official WeatherLink dashboard, I checked that there are no spaces, etc. I put my password that I use to pass in WeatherLink and then the DID of my VP2 ....... doesn't go.
The answer from weatherlink.com with your settings is also stored in a file on your server. It is in "./jsondata/wl.com"
This is the returned html from wl.com
Code: [Select]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
</body></html>
If you are 100% sure that you entered the correct credentials can you please tell me where you entered them. 
Yes you set the language to Italian, set that visitors are not allowed to change that (although support is in ENGLISH only).
But the wl.com lines are not filled.
They are  empty with a blue background which signals that they not contain any information.

Wim
Title: Re: Help for my website
Post by: wvdkuil on May 15, 2019, 11:11:53 AM
@ MatteoPV

Sorry for the bad news.
I do not know which provider you have, but it seems your package is far to restrictive for using a dynamic template such as the HWS/weather34 type ones. The "data-blocks" (about 14 of them)are very dynamic and every minute multiple blocks within their own frequency are refreshed. But for that you need a decent webhosting plan.  When loading the page, all blocks are started individually so this results in 12 - 15 separete PHP processes in the apache que.
Attached is the screenshot when I try to load your page, more then half the blocks are empty and are only filled within a few minutes, not seconds as is normal. Even with other free or inexpensive  hosting packages this template  runs smoothly .

In the weather34/Meteobridge discussing on this same forum, the original author warned multiple times to obtain decent hosting.

You can use google to find the reasons of this 509 error message.
Wim
Title: Re: Help for my website
Post by: MatteoPV on May 15, 2019, 12:04:36 PM
My Host is paid, I'm running TOPHOST and I paid my Host.

Now I put https only in http
Title: Re: Help for my website
Post by: MatteoPV on May 15, 2019, 01:10:15 PM
I tried to configure the whole site from scratch, inserting all the APIs but it doesn't work.

At this point either I solve the problem of empty spaces in the realtime.txt file or abandon the project. I'm just sorry I already paid the host
Title: Re: Help for my website
Post by: wvdkuil on May 16, 2019, 03:24:32 AM
I tried to configure the whole site from scratch, inserting all the APIs but it doesn't work.
At this point either I solve the problem of empty spaces in the realtime.txt file or abandon the project. I'm just sorry I already paid the host
PLEASE contact your provider
Show them this post or send them the screenshot p509.jpg which i attached.

All you work did and all your time results in a working site BUT it is far to slow and there are unneeded errors.
See the attached screenshot.

Your provider allows your site far to few resources.
The 509 errors come form them. Not from your scripts

When a free  account  old link removed https://pwsdashboard.net/pws10/index.php  can run this template very quickly without any problem, it should be their concern that you can not run it with a paid-for account.
It is their problem (their settings)  they should solve. Or they should tell you how to use your cPanel to solve it yourself.

===
There are a total of 6.048 websites with the same IP-address 217.64.202.205 as yours. I visited a few and they seem to work normal.  Ask the support person of your provider what you can do to get a decent performing website. 

Wim
Title: Re: Help for my website
Post by: MatteoPV on May 16, 2019, 04:23:07 AM
After applying the tips you gave me and editing the realtime.txt file recommended by PaulMy, the site works. Now for 6 hours I can't touch anything because I upgraded my host to the higher performing version. However, I believe it will work. I see what happens towards evening
Title: Re: Help for my website
Post by: MatteoPV on May 16, 2019, 06:32:39 AM
Before, however, I noticed that everything worked but I didn't have the daily graphs of temperature, wind, rain, etc. To have the graphs I have to do ????
Title: Re: Help for my website
Post by: wvdkuil on May 16, 2019, 07:06:41 AM
Before, however, I noticed that everything worked but I didn't have the daily graphs of temperature, wind, rain, etc. To have the graphs I have to do ????
For the graphs it is the best and easiest way to upload to WU also.
That way you have access to your own data directly form their database.
And you get a free api-key to use for a 5 day forecast. Then you can choose between the DarkSky-forecast and the WU-forecast based on the quality for your specific region.

Wim
Title: Re: Help for my website
Post by: MatteoPV on May 16, 2019, 08:49:48 AM
Before, however, I noticed that everything worked but I didn't have the daily graphs of temperature, wind, rain, etc. To have the graphs I have to do ????
For the graphs it is the best and easiest way to upload to WU also.
That way you have access to your own data directly form their database.
And you get a free api-key to use for a 5 day forecast. Then you can choose between the DarkSky-forecast and the WU-forecast based on the quality for your specific region.

Wim

I did not mean that. The hourly, daily and weekly forecast is already taken and seems to me to be correct. I meant the graphs of my data ... wind, temperature, rain. If I click on the day or month buttons of the relevant boxes of my live data, I get a box but without a graphic
Title: Re: Help for my website
Post by: wvdkuil on May 16, 2019, 09:01:51 AM
Before, however, I noticed that everything worked but I didn't have the daily graphs of temperature, wind, rain, etc. To have the graphs I have to do ????
For the graphs it is the best and easiest way to upload to WU also.
That way you have access to your own data directly form their database.
And you get a free api-key to use for a 5 day forecast. Then you can choose between the DarkSky-forecast and the WU-forecast based on the quality for your specific region.

Wim
I did not mean that. The hourly, daily and weekly forecast is already taken and seems to me to be correct. I meant the graphs of my data ... wind, temperature, rain. If I click on the day or month buttons of the relevant boxes of my live data, I get a box but without a graphic
Most of the blocks display your current data coming from realtime.txt or from wl.com.

Some display forecast or current conditions => they use DarkSky to get relevant data
 = = => you can use other forecasters also, such as WU if you have an API-key

The pop-ups will show the graphs a few days after you start uploading to WU.
They need to get their data from somewhere and the easiest choice is WU.
Therefor you have to set the name of your station in the easyweathersettings.

If you decide not to upload (why?) you will have to follow a few steps to define a database-table to store 1 day of weather measurements.
And then run two extra cron-jobs each day.

Wim
Title: Re: Help for my website
Post by: MatteoPV on May 16, 2019, 09:12:01 AM
OK. Now I wait for the site to have migrated to the new server and then start watching
Title: Re: Help for my website
Post by: wvdkuil on May 16, 2019, 09:15:29 AM
OK. Now I wait for the site to have migrated to the new server and then start watching
But you should not wait to make an account at WeatherUnderground and start the uploading with your wiFi logger.
All that can already be done.

Then go to your stationspage on the WeatherUnderground site to check if your data arrives every so many minutes.

Wim
Title: Re: Help for my website
Post by: MatteoPV on May 16, 2019, 09:23:57 AM
https://www.meteocamporamoso.it/pwsWD/index.php

Thanks to the advice you gave me the site is finally working ..... even the graphics are coming. My station is recently online on WU.

I still have a couple of things to fix, redirects that I had set on the WL page and the input errors that I might talk about with the host manager
Title: Re: Help for my website
Post by: txweather.org on May 16, 2019, 10:48:50 AM
MatteoPV,

Your SSL cert is invalid. I would fix that if you can.
Title: Re: Help for my website
Post by: MatteoPV on May 16, 2019, 11:38:43 AM
MatteoPV,

Your SSL cert is invalid. I would fix that if you can.

Yes. Now see if it is my wrong setting or if I need to call in the host manager
Title: Re: Help for my website
Post by: txweather.org on May 16, 2019, 11:41:38 AM
MatteoPV,

Your SSL cert is invalid. I would fix that if you can.

Yes. Now see if it is my wrong setting or if I need to call in the host manager

Your issue is here:

Common Name (CN)   mediaimmobiliareaversa.com

The common name does not match your domain. I would contact whom ever created the cert for you and have them fix it or just regenerate a new cert with the right domain.

Good luck!
Title: Re: Help for my website
Post by: MatteoPV on May 16, 2019, 11:52:12 AM
MatteoPV,

Your SSL cert is invalid. I would fix that if you can.

Yes. Now see if it is my wrong setting or if I need to call in the host manager

Your issue is here:

Common Name (CN)   mediaimmobiliareaversa.com

The common name does not match your domain. I would contact whom ever created the cert for you and have them fix it or just regenerate a new cert with the right domain.

Good luck!

I've communicated everything to the host manager, we'll see what they respond to. Thanks for the informations
Title: Re: Help for my website
Post by: MatteoPV on May 18, 2019, 12:14:11 PM
There he is :

www.meteocamporamoso.it
Title: Re: Help for my website
Post by: MatteoPV on May 18, 2019, 12:52:20 PM
I have a question.....
Now the site is online and I'm super happy !!! But I would never lose my settings .... which file should I save to always have my settings safe ????
Title: Re: Help for my website
Post by: wvdkuil on May 18, 2019, 01:03:16 PM
I have a question.....
Now the site is online and I'm super happy !!! But I would never lose my settings .... which file should I save to always have my settings safe ????
(1) Make a copy and (2) download the copy to your PC:  w34_settings1.php

Wim
Title: Re: Help for my website
Post by: MatteoPV on May 19, 2019, 03:13:44 AM
This morning from a graph error. Clicking to see the hourly or daily graphs of the weather info from error
Title: Re: Help for my website
Post by: wvdkuil on May 19, 2019, 04:43:55 AM
This morning from a graph error. Clicking to see the hourly or daily graphs of the weather info from error
sometimes the WU servers return nearly empty data, but that data is then cache.
The WU site is stil in a transition phase.
Most of the times the graphic work ok after

@ALL
I am off on a two week vacation until June 2.
Nearly no internet.
Wim