Plugin WLIP

Post Reply
PNCATTE
Observer
Observer
Posts: 22
Joined: Wed Oct 10, 2018 8:05 am
Location: FLEURIE
Station model: Davis Pro 2
Software: WLIP
Contact:

Plugin WLIP

Post by PNCATTE » Sat Jan 04, 2020 8:42 am

Two concerns with the WLIP plugins.

To retrieve the data from WL, add a line to the file: setting.php
$ tokenID = '3557167274C874BF09454634831031D5A';

and modify file wlIPupdate.php,
line 67 : $url = "https://api.weatherlink.com/v1/NoaaExt. ... ".$tokenID;

Another concern the gusts are not correct.
on weatherlink there are no bursts and meteotemplateLive.txt
what he records
{ "T" 5.9, "H": 93, "P": 1032.6, "B": 221, "W": 1609, "G": 4827, "R": 0.20066, "RR" 0, " S "0," U ": 1577901058," TIN ": 22.2," HIN ": 38," SW ":" Wlip "," TTIME ": 1577901105," HTime ": 1577901105," ptime ": 1577901105," btime ": 1577901105," WTIME ": 1577901105," gtime ": 1577901105," RTime ": 1577901105," RRTime ": 1577901105," sTime ": 1577901105," utime ": 1577901105," TINTime ": 1577901105," HINTime " : 1577901105, "SWTime": 1577901105, "D": 4.8 "dTime": 1577901105, "A" 4.4 "atime": 1577901105}
modify the file:
In your file ..plugins \ WIIP \ wlIPupdate.php,
you have the link between the database fields and the xml tags of the weatherlink API:

For Gust you should have:
$ rawUpdate ['G'] = floatval ($ xml-> wind_mph) * 1.609; // km / h

which you can replace with:
Line 80 ; $ rawUpdate ['G'] = floatval ($ xml-> davis_current_observation-> wind_ten_min_gust_mph) * 1.609; // km / h


You have to put the cron on 1 minute, so that the maximum burst is recorded since they recorded in alldata every five minutes.

I attach the modified files thanks to the forum which allowed me to make this plugin work properly

Best wishes
Attachments
wlIP.zip
(4.11 KiB) Downloaded 111 times

fredericowessel
Newbie
Newbie
Posts: 8
Joined: Tue Jan 09, 2018 3:47 pm
Location: Teutônia/RS - Brasil
Station model: Davis Pro 2 6163
Software: Meteobridge
Contact:

Re: Plugin WLIP

Post by fredericowessel » Fri Sep 11, 2020 7:47 pm

I did the modifications and updated archives in two of my templates. One is updating perfectly. Whe I access the cronjob link, the result is "Authorized via admin passwordSuccess".
My other template, is not updating. Admin password, update password and WL password are correct and when I access the cron job link, the result is a blank page. If I try a wrong password, the result is "Unauthorized".
I can't figure out whats wrong.

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Plugin WLIP

Post by Jachym » Sun Sep 13, 2020 9:58 am

Hi,
I prepared a second version of this plugin that uses the API v2. The problem however is that rain does not work and when I did some research I found this is a bug in the WL API. The reported rain is always null.... it has been discussed by other developers on other forums, not much we can do... it is in this form unusable.

fredericowessel
Newbie
Newbie
Posts: 8
Joined: Tue Jan 09, 2018 3:47 pm
Location: Teutônia/RS - Brasil
Station model: Davis Pro 2 6163
Software: Meteobridge
Contact:

Re: Plugin WLIP

Post by fredericowessel » Mon Sep 14, 2020 12:11 pm

But with the changes suggested here, the plugin works perfectly, in my case, in the template that is updating, including rain.

The template that is not updating. Could have relation, that are two diffent accounts? The template that is updating is a Pro account and the other one, that's not working, isn't a pro.

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Plugin WLIP

Post by Jachym » Tue Sep 15, 2020 12:22 pm

Hi Frederico,

I cannot tell because I do not use WL...

psper
Newbie
Newbie
Posts: 7
Joined: Tue Oct 20, 2020 10:17 pm
Station model: Davis Vue
Software: Weather

Re: Plugin WLIP

Post by psper » Wed Oct 21, 2020 11:14 am

Hi,

With this WPPI plugin changes I can query Weatherlink now.
This is a new format, with apiToken parameter and user is not username but device ID DID.
Thanks for your help!!!!!

But now I receive this from WeartherLink :

https://api.weatherlink.com/v1/NoaaExt. ... XXXXXXXXXX

Only information about Wind, but all data with zeros?
My station is working because I can see updates on my page.

I need more than BASIC Subscription?

Thanks in advance!!!

#########################################################
<current_observation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:noNamespaceSchemaLocation="http://www.weather.gov/view/current_observation.xsd">
<credit>Davis Instruments Corp.</credit>
<credit_URL>http://www.davisnet.com</credit_URL>
<disclaimer_url>http://www.davisnet.com/about/terms.asp</disclaimer_url>
<copyright_url>http://www.davisnet.com/about/terms.asp</copyright_url>
<privacy_policy_url>http://www.davisnet.com/about/privacy.a ... policy_url>
<image>
<url>http://www.weatherlink.com/images/Logo_ ... u.jpg</url>
<title>Davis WeatherLink</title>
<link>http://www.weatherlink.com</link>
</image>
<suggested_pickup>15 minutes after the hour</suggested_pickup>
<suggested_pickup_period>60</suggested_pickup_period>
<location>São Gião, Coimbra, Portugal</location>
<latitude>40.34014</latitude>
<longitude>-7.80519</longitude>
<observation_time>Last Updated on Oct 21 2020, 11:09 am WEST</observation_time>
<observation_time_rfc822>Wed, 21 Oct 2020 11:09:07 +0100</observation_time_rfc822>
<station_id>psper</station_id>
<davis_current_observation>
<DID>001D0A712194</DID>
<station_name>São Gião</station_name>
<observation_age>0</observation_age>
<rain_day_in>0.0000</rain_day_in>
<rain_month_in>0.0000</rain_month_in>
<rain_rate_day_high_in_per_hr>0.0000</rain_rate_day_high_in_per_hr>
<rain_rate_hour_high_in_per_hr>0.0000</rain_rate_hour_high_in_per_hr>
<rain_rate_month_high_in_per_hr>0.0000</rain_rate_month_high_in_per_hr>
<rain_rate_year_high_in_per_hr>0.0000</rain_rate_year_high_in_per_hr>
<rain_storm_in>0.0000</rain_storm_in>
<rain_year_in>0.0000</rain_year_in>
</davis_current_observation>
<time_to_generate>0.364511 seconds</time_to_generate>
</current_observation>
########################################################

Post Reply