HWA_CustomUpload

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

Post Reply
User avatar
Tln7559
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: Tue Jun 28, 2022 6:57 am

HWA_CustomUpload

Post by Tln7559 »

Meteobridge has already a long time been applied for a data-upload towards HetWeerActueel.nl using a template,
feeding data through an (S)FTP-interface towards webspace.

Recently Meteobridge got another interface towards HetweerActueel.nl in WU-style using HTTPS GET.
This interface is called HWA_CustomUpload. Easier for the user than the 'traditional' (S)FTP-interface.

Now operational for some time and then experience raises questions.

In the WU-protocol Rainrate is called rainin, and RainToday is called dailyrainin.
Both available in the present realisation of Meteobridge.
HetWeerActueel also requests input for MonthlyRain, which field in WU-interface terminology would be called monthlyrainin.
Not yet present in the Meteobridge-realisation mentioned above.
How to get that field called monthlyrainin into the interface?

Looking for input data better than 'standard', the WU-protocol als mentions

Code: Select all

windspdmph_avg2m  - [mph 2 minute average wind speed mph]
winddir_avg2m - [0-360 2 minute average wind direction]
windgustmph_10m - [mph past 10 minutes wind gust mph ]
windgustdir_10m - [0-360 past 10 minutes wind gust direction]
The first 2 fields seen appearing for some configurations of Meteobridge, but not yet the latter 2 fields.
Which is the dependency that controls whether/how these fields appear in the outputstring?

Thinking ahead: would it be possible to get windspeed/winddir averaged over 10 minutes?

Code: Select all

windspdmph_avg10m  - [mph 10 minute average wind speed mph]
winddir_avg10m - [0-360 10 minute average wind direction]
Meteobridge for reading TFA_Nexus, WF_Tempest & GW1000
+ datadistribution to various organisations
Domoticz for all other jobs
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 8042
Joined: Mon Oct 01, 2007 10:51 pm

Re: HWA_CustomUpload

Post by admin »

HWA support in Meteobridge does send most of the requested data and it is computed as follows:

Code: Select all

  if ((val = get_special_byname_map ("wind0dir", TD_AVE, t - 120)) != P_INVALID)
    p += sprintf (p, "&winddir_avg2m=%.1f", val / 1000.0);
 
  if ((ts = get_special_byname_map ("wind0wind", TD_MAXT, t - 600)) != P_INVALID)
    if ((val = get_special_byname_map ("wind0dir", TD_VAL, ts)) != P_INVALID)
      p += sprintf (p, "&windgustdir_10m=%.1f", val / 1000.0);

  if ((val = get_special_byname_map ("wind0wind", TD_MAX, t - 120)) != P_INVALID)
    if ((mbtype[0] == VANTAGERF_MODE) || (mbtype[0] == VANTAGE_MODE))
      p += sprintf (p, "&windgustmph=%d", lround (val * 0.002237));
    else
      p += sprintf (p, "&windgustmph=%.1f", val * 0.002237);
      
  if ((val = get_special_byname_map ("wind0wind", TD_MAX, t - 600)) != P_INVALID)
    p += sprintf (p, "&windgustmph_10m=%.1f", val * 0.002237);
Regarding "windspdmph_avg10m" and "winddir_avg10m" there are only the 2m variants available of this. Those fields plus "monthlyrain" can be added, but can you please point me to the HWA data upload documentation first as I am reluctant to implement parameters not officially supported.

Thanks.
Post Reply