Jump to content

WeatherBit day polling


Recommended Posts

Hi all.

I have a Polisy running IoX 5.6.2, and PG3x v3.1.31.  The same behavior I will describe has also happened on earlier PG3x v3.1.28.

I have an irrigation system that runs before sunrise, and I have programs that uses climate data from the Weatherbit Node as conditions to run the irrigation system.  I have a free Weatherbit subscription, so my polling is set to 1800 and 43200 per the guidance.  The Nodeserver returns the day of the week very infrequently, sometimes once per day, and frequently late in the morning after my irrigation program runs, so the day is frequently wrong when it runs.  Other data coming in from the Weatherbit updates every 30min as expected.

I determined the above using the log feature of the IoX, because the PG3x logging does not appear to be operating correctly for me.  There is no log data in the log window, if I set the logging to "error" and download the log package, I get the attached.  One file has not updated since yesterday, possibly when I set the log from info to error, but I can't be sure because I did not note the specific time yesterday when I changed the logging to error.

I've rebooted Polisy and PG3x a few times.

Any insight would be appreciated to learn if the day polling frequency is as expected?  And if the PG3x logging behavior is as expected?

... and any other advice that might help me...

Thanks,

Russ

pg3-current.lodebug.logg

Link to comment

Hi Russ,

The WeatherBit node server collects and displays two types of data

1) current conditions.  You are polling the service every 30 minutes for the current conditions.

2) daily forecasts.  You are polling twice a day (every 12 hours) for the daily forecasts.

The polling starts when the node server starts.  So if the node server was started at 10am it would be updating the daily forecasts data (which day of the week is part of) at 10am and at 10pm.  So yes, it wouldn't update until 10am.   Also, I believe it may be using UTC time and not local time for the data reports, thus WeatheBit will change the day of week at midnight UTC time which will likely be offset from your local midnight.

If day of week is important to your programming, you may need to adjust the polling intervals to poll for forecasts more often and current conditions less often.  If I recall correctly, WeatherBit limits the number of calls to 50 per day for the free plan.

 

As for logging, there are two different types of logs available to you.  

1) the PG3x log (from the UI main menu -> log).  When set to it's default of info, it provides quite a bit of info on what PG3x is doing.  If you don't see updates, try refreshing the browser window/tab.   Setting it to error will result in no log information as it should not be logging any errors under normal operation.

2) each node server has it's own log that you get to by clicking the log button on the specific node server details page. Depending on the node server, this log may only update infrequently at whatever the default log level is for the node server, so you might not see any log entries appear for a long time.  Setting this log to debug should start showing log entries fairly quick and it is at this level that node server authors would prefer you use when asking for help on the node server.

 

Link to comment

Hi Bill,

Thank you for the detailed reply and for the explanation of short and long poll. To get the day updated prior to sunrise, I changed the short poll to 2400 (40min), and the long poll to 14400 (4 hours).  That keeps me below the 50 call max, and I believe should ensure a daily forecast poll prior to sunrise.  This configuration worked today.

Also for @DennisC (thanks also): I am using the WeatherBit day as a method of confirming if the WeatherBit nodes were updating as I've had instances in the past where it's been disconnected or not updating, and I only realized when the lawn started to brown, so I created a notification that runs at sunrise which compares the IoX day to the WeatherBit day and notifies me if they are out or sync.  Thinking back on the behavior I was experiencing, knowing now what the long poll is polling for, it makes sense because there were days when I would have a notification on my mobile phone that the days were out of sync, but I would check later in the day and they were in sync.  Thank you.

The PG3x logging still seems off.  Debug returns information immediately, but not Info.

So, using the ISY Log again, there was a single day update that occurred just after midnight local time which met the conditions for my alert not to fire, but is that to be expected, just the single entry?  I thought I might see the Day updated every 4 hours?

Thanks again,

Russ

Link to comment

The node server will only send updates to the ISY (IoX) if the value is different from the previous value.  So if the day changed just after midnight, it likely won't send another day update until just after midnight tomorrow when it changes again.

The node server log doesn't show historical entries, it's only displaying new entries that occur after you open it.  Under normal conditions, that should be very infrequently unless debug level is selected.

Link to comment
Guest
This topic is now closed to further replies.

×
×
  • Create New...