mschlenstedt / LoxBerry-Plugin-Weather4Lox

A LoxBerry Plugin: http://plugins.loxberry.de/plugin/weather4lox/
Apache License 2.0
10 stars 10 forks source link

Data in Weather4Lox DATATOLOXONE is outdated when fetched from weather service #105

Closed cmonty14 closed 10 months ago

cmonty14 commented 1 year ago

Hi, I have checked the logfile "Weather4Lox DATATOLOXONE" for execution on 06.08.2023 10:40h and it includes this data:

06.08.2023 10:40:11 TASK STARTED
 Weather4Lox DATATOLOXONE process started
 INFO: LoxBerry Version 2.2.2.2 ( is_raspberry.cfg )
 INFO: Weather 4 Loxone Version 4.10.0.2
 INFO: Loglevel: 7
This is /opt/loxberry/bin/plugins/weather4lox/datatoloxone.pl Version 4.10.0.2
 INFO: Adding value to weatherdata.html. Value:cur_date@460548840
 INFO: Adding value to UDP send queue. Value:cur_date@460548840
 INFO: Adding value to weatherdata.html. Value:cur_day@6
 INFO: Adding value to UDP send queue. Value:cur_day@6
 INFO: Adding value to weatherdata.html. Value:cur_month@8
 INFO: Adding value to UDP send queue. Value:cur_month@8
 INFO: Adding value to weatherdata.html. Value:cur_year@2023
 INFO: Adding value to UDP send queue. Value:cur_year@2023
 INFO: Adding value to weatherdata.html. Value:cur_hour@10
 INFO: Adding value to UDP send queue. Value:cur_hour@10
 INFO: Adding value to weatherdata.html. Value:cur_min@14
 INFO: Adding value to UDP send queue. Value:cur_min@14
 INFO: Adding value to weatherdata.html. Value:cur_tt@15.5
 INFO: Adding value to UDP send queue. Value:cur_tt@15.5
 INFO: Adding value to weatherdata.html. Value:cur_tt_fl@15.5
 INFO: Adding value to UDP send queue. Value:cur_tt_fl@15.5
 INFO: Adding value to weatherdata.html. Value:cur_hu@91
[...]

Evaluating data sets

INFO: Adding value to UDP send queue. Value:cur_hour@10
INFO: Adding value to UDP send queue. Value:cur_min@14

confirms that this data is outdated.

Is this outdated data set expected and correct?

THX

mschlenstedt commented 1 year ago

Look at the grabber logfile. This includes the timestamps from the weather service. data2loxone is only the script which sends the data from weather4lox' internal database to Loxone.

cmonty14 commented 1 year ago

I see.

Currently, only 2 APIs are working for me: Visual Crossing and Wunderground. I assume this data is provided by Visual Crossing:

06.08.2023 10:40:02 TASK STARTED
 Weather4Lox GRABBER_VISUALCROSSING process started
 INFO: LoxBerry Version 2.2.2.2 ( is_raspberry.cfg )
 INFO: Weather 4 Loxone Version 4.10.0.2
 INFO: Loglevel: 7
This is /opt/loxberry/bin/plugins/weather4lox/grabber_visualcrossing.pl Version 4.10.0.2
 INFO: Fetching Current Data for Location 
URL: https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/?unitGroup=metric&lang=de&iconSet=icons2&include=days,hours,current&key=&contentType=json
Status: 200 OK
 OK: Data fetched successfully for 
 INFO: Saving new Data for Timestamp Sun Aug  6 10:14:00 2023 to database.
 OK: Saving current data to /opt/loxberry/log/plugins/weather4lox/current.dat.tmp successfully.
Database content:
1691309640|Sun, 06 Aug 2023 10:14:00 +0200|CEST|Europe/Berlin|+0200|Waghäusel|Deutschland|-9999|||-9999|15.2|15.2|99.4|Süd-Westen|219|9.0|17.5|15.2|1007|15.1|10.0|127.0|-9999|1.00|-9999|0.00|rain|13|Regen, Bedeckt|68|-9999|66|-9999|06|04|20|58|-9999|100|100|0.00|
 OK: Saving daily forecast data to /opt/loxberry/log/plugins/weather4lox/dailyforecast.dat.tmp successfully.

My understanding is that all fetched data is send to Loxone. The data set of Visual Crossing is outdated, but other data sets (from Wunderground) should be accurate; and there's no issue if I don't use values _curhour and _curtime in time-critical automation. Is this understanding correct?

On the other hand neither Visual Crossing nor Wunderground are providing data like _cur_wecode. But this value is sent to Loxone. Can you explain where this data is provided?

THX

mschlenstedt commented 1 year ago

Its calculated from Visual Crossing data. Deactivate Wunderground Grabber, fectch data manually and attach both logfiles here (grabber visual crossing and data4loxone). Remove your API key and Geo coordinates before uploading here.

cmonty14 commented 1 year ago

Oh... it's calculated. (I didn't know this.) But that means the calculation is based on outdated data, correct?

The requested logfiles are uploaded. 20230806_115245_485_datatoloxone.log 20230806_115241_809_grabber_visualcrossing.log

mschlenstedt commented 10 months ago

No further input. Closed.