Community Support

[This post is marked as unsolved] How to get up-to-date weather data?  

  RSS
Erwin Fiten
(@erwin)
Eminent Member

Hi,

How can I make the system more consistent, and make sure the log is written every 5mins.

Now it looks like the logging is only done when there is a user active, so, when the system is accessed.

As this is a new system, I don't get a lot visitors, so it sometimes takes hours before en new point is logged.

You can see this over here :  https://weerstationbree.be/
in the 'Neerslag' graphic, you can see the points when it measures.

 

Erwin

 

 

 

 

This topic was modified 2 months ago by Pierre Lannoy
Quote
Posted : 11/01/2019 1:27 pm
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Hello Erwin.

Unfortunately, that's the way WordPress functions...

Fortunately, there are some methods to have a fully operational WordPress cron (what you call "log").

Have a nice day.

If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...

ReplyQuote
Posted : 11/01/2019 1:36 pm
Erwin Fiten
(@erwin)
Eminent Member

IK Thanks, didn't know that.

For those who use PLESK as backend, you can set the cron-job on plesk , as you can see in the attached screenshot.

Login to Plesk
Go to Tools and Settings > Scheduled Task > Add Task > Run section.

ReplyQuote
Posted : 12/01/2019 9:15 am
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Hello Erwin!

Nice to see your charts are now better 😉

Note that my advice is to put cron every 2 minutes if you're in standard collect mode : 

*/2 * * * *

or every 1 minute if you're in fast collect mode:

*/1 * * * *

A best practice is to have a cron job with a lower interval than Weather Station... 

Note: setting a high frequency for cron will not modify the Weather Station cycle of collect. It will just render it very precise a robust...

This post was modified 2 months ago 2 times by Pierre Lannoy

If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...

ReplyQuote
Posted : 12/01/2019 12:11 pm
Erwin Fiten
(@erwin)
Eminent Member

I'ts running every 2mins now, but stil sometimes the refresh rate is 10mins or more(see my graphics)

And the system generates an error message every +- 20mins : 

 

PHP Warning:  Division by zero in /var/www/vhosts/weerstationbree.be/httpdocs/wp-content/plugins/live-weather-station/includes/traits/CommonUtilities.php on line 160

As far as I can see, the division by zero has something to do with the pressure ?

    protected function compute_potential_temperature($t, $p) {
return round( $t * pow((100000 / $p), 0.286), 1);
This post was modified 2 months ago 2 times by Erwin Fiten
ReplyQuote
Posted : 13/01/2019 5:35 pm
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Hello !

It's normal. You must set you cron more frequently than Weather Station collects data. So your settings are perfect!

For the division by zero, I will get an eye... But that's strange, you're the first to have this... Could you just tell me what's your station brand/model?

If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...

ReplyQuote
Posted : 13/01/2019 5:54 pm
Erwin Fiten
(@erwin)
Eminent Member

I have a WMR300, but the data is sent with Meteohub (this is running on an Rpi with an RFXcom receiver)

Link to the clientraw  :  https://weerstationbree.be/weather/clientraw.txt

 

Erwin

 

ReplyQuote
Posted : 13/01/2019 6:10 pm
Pierre Lannoy
(@pierre-lannoy)
Member Admin

OK, I see: your file doesn't contain pressure data (barometric, position 6). You must fix it for Weather Station can make psychrometric computations 😉

If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...

ReplyQuote
Posted : 13/01/2019 9:33 pm
Erwin Fiten
(@erwin)
Eminent Member

Strange, i See 1013.0

 

maybe it's 0 sometimes ?

maybe buildin a catch, to prevent this error in case of no barometric pressure ? 😉

 

Erwin

ReplyQuote
Posted : 13/01/2019 10:35 pm
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Yes, it's possible (although all subsequent computations will be inaccurate), but it is really strange. I think you should verify your station...  😋 

Fix for this will be in 3.7.5 (release planed in less than 4 days)

If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...

ReplyQuote
Posted : 13/01/2019 10:41 pm
Pierre Lannoy
(@pierre-lannoy)
Member Admin

Hello!

Weather Station 3.7.5 released. Could you tell me if all is ok?

Thanks.

If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...

ReplyQuote
Posted : 14/01/2019 8:29 am
Erwin Fiten
(@erwin)
Eminent Member

I Had the error until 10mins ago, now I updated to 3.7.5, so we'll see.

i know about the inaccurate computations, but better some data then none. with that error, that complete readout is ignored, also the good values inside the file.

With that catch, barometer calculation will be wrong, but all other parameters will be up-to-date.
I'll keep you informed.

 

Erwin

 

ReplyQuote
Posted : 14/01/2019 8:59 am
Erwin Fiten
(@erwin)
Eminent Member

I examined the database, and saw the indoor sensor sometimes didn't give any response, so indoor temp & pressure weren't available, that probably caused the problem with the missing pressure. I changed the batteries, but even before that, i didn't receive the message anymore, so that's good, thanks a lot for the fast fix !

 

Erwin

 

ReplyQuote
Posted : 14/01/2019 1:13 pm

  
Working

To participate, please connect first!