Difference between revisions of "Component: BBC Weather Forecast (Comms: IoT/Cloud)"
(17 intermediate revisions by 2 users not shown) | |||
Line 13: | Line 13: | ||
==BBC Weather Forecast component== | ==BBC Weather Forecast component== | ||
− | Easily allows you to collect | + | Easily allows you to collect observed weather metrics for your area using the BBC Weather data service. Supports temperature and humidity etc. for your selected area. Also available are Wind Direction, Wind Speed and Air Pressure but please note these are not always available depending on your selected area. This component is used for data gathering from the internet. |
+ | |||
+ | ==Component Source Code== | ||
+ | |||
+ | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_BBCWeatherForecast.fcfx FC_Comp_Source_BBCWeatherForecast.fcfx] | ||
+ | |||
+ | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_BBCWeatherForecast.fcfx FC_Comp_Source_BBCWeatherForecast.fcfx] | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
''No detailed description exists yet for this component'' | ''No detailed description exists yet for this component'' | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 30: | Line 84: | ||
The location can be set by adjusting the BBC Weather location property, see the component property tooltips for more information on how to do this. | The location can be set by adjusting the BBC Weather location property, see the component property tooltips for more information on how to do this. | ||
− | + | Here is an example of a next-day weather predictor that also shows the current-day weather for a ESP32 embedded device | |
+ | |||
+ | {{Fcfile|ESP32_TTGO_Weather_Forecast_Predictor.fcfx|ESP32 weather predictor}} | ||
+ | |||
+ | |||
− | == | + | ==Macro reference== |
+ | ===GetDayName=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDayName''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Gets the name of the currently selected day as a string. |
|- | |- | ||
|- | |- | ||
− | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING | |
− | |||
− | |||
− | |||
− | |||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===GetDaySummary=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDaySummary''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Gets the summary of the currently selected day as a string. |
|- | |- | ||
|- | |- | ||
Line 65: | Line 120: | ||
+ | ===GetHumidity=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHumidity''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Reads the forecast humidity in Relative Humdity for the selected day. |
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===GetLocationName=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLocationName''' |
|- | |- | ||
− | | colspan="2" | Reads the | + | | colspan="2" | Reads the reported location name as a string. |
|- | |- | ||
|- | |- | ||
− | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING | |
− | |||
− | |||
− | |||
− | |||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===GetMaxTemperature=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetMaxTemperature''' |
+ | |- | ||
+ | | colspan="2" | Reads the forecast maximum temperature in the selected scale for the selected day. | ||
+ | |- | ||
|- | |- | ||
− | | | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
+ | | width="90%" | Scale | ||
|- | |- | ||
+ | | colspan="2" | 0 = Celcius, 1 = Farenheit | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===GetMinTemperature=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetMinTemperature''' |
+ | |- | ||
+ | | colspan="2" | Reads the forecast minimum temperature in the selected scale for the selected day. | ||
+ | |- | ||
|- | |- | ||
− | | | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
+ | | width="90%" | Scale | ||
|- | |- | ||
+ | | colspan="2" | 0 = Celcius, 1 = Farenheit | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===GetPollution=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 135: | Line 200: | ||
+ | ===GetPressure=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetPressure''' |
|- | |- | ||
− | | colspan="2" | Reads the forecast | + | | colspan="2" | Reads the forecast air pressure in milli bar (mb) for the selected day. |
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===GetSunrise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetSunrise''' |
|- | |- | ||
− | | colspan="2" | Reads the forecast | + | | colspan="2" | Reads the forecast sunrise time as a string for the selected day. |
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===GetSunset=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetSunset''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Reads the forecast sunset time as a string for the selected day. |
|- | |- | ||
|- | |- | ||
Line 174: | Line 242: | ||
+ | ===GetUVRisk=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetUVRisk''' |
|- | |- | ||
− | | colspan="2" | Reads the | + | | colspan="2" | Reads the forecast UV Risk for the selected day. |
|- | |- | ||
|- | |- | ||
Line 187: | Line 256: | ||
+ | ===GetVisibility=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetVisibility''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Reads the forecast visibility for the selected day. |
|- | |- | ||
|- | |- | ||
− | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING | |
− | |||
− | |||
− | |||
− | |||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===GetWindDirection=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetWindDirection''' |
|- | |- | ||
− | | colspan="2" | Reads the forecast | + | | colspan="2" | Reads the forecast wind direction as a string for the selected day. |
|- | |- | ||
|- | |- | ||
Line 218: | Line 284: | ||
+ | ===GetWindSpeed=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetWindSpeed''' |
|- | |- | ||
− | | colspan="2" | Reads the | + | | colspan="2" | Reads the reported wind speed in MPH for the selected day. |
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===Initialise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Sets up the component ready to collect weather data. |
|- | |- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
Line 249: | Line 312: | ||
+ | ===RequestData=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RequestData''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Requests data about your selected location from the BBC weather service. Returns true if the request was successful. Must be called before trying to call any of the GetXXX macros. |
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===SetForecastDay=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetForecastDay''' |
+ | |- | ||
+ | | colspan="2" | Chooses which day of the three day forecast to look at. | ||
+ | |- | ||
|- | |- | ||
− | | | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
+ | | width="90%" | Day | ||
|- | |- | ||
+ | | colspan="2" | 0 = Today, 1 = Tomorrow, 2 = Day After Tomorrow | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===SetLocationCode=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLocationCode''' |
+ | |- | ||
+ | | colspan="2" | Allows the location code to be altered from the default location code set in the component properties. After changing the location the RequestData macro must be called to refresh the forecast variables. | ||
+ | |- | ||
|- | |- | ||
− | | | + | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING |
+ | | width="90%" | NewLocation | ||
|- | |- | ||
+ | | colspan="2" | New location string, see Location property tooltip for more info. | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
− | |||
− | |||
Line 298: | Line 372: | ||
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:Fc9-type- | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] |
− | | width="90%" | | + | | width="90%" | LinkTo |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | |
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]] | ||
Line 317: | Line 391: | ||
|- | |- | ||
| colspan="2" | Maximum time to wait for valid incoming data. | | colspan="2" | Maximum time to wait for valid incoming data. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} |
Latest revision as of 11:57, 3 November 2023
Author | MatrixTSL |
Version | 1.0 |
Category | Comms: IoT/Cloud |
Contents
- 1 BBC Weather Forecast component
- 2 Component Source Code
- 3 Detailed description
- 4 Examples
- 5 Macro reference
- 5.1 GetDayName
- 5.2 GetDaySummary
- 5.3 GetHumidity
- 5.4 GetLocationName
- 5.5 GetMaxTemperature
- 5.6 GetMinTemperature
- 5.7 GetPollution
- 5.8 GetPressure
- 5.9 GetSunrise
- 5.10 GetSunset
- 5.11 GetUVRisk
- 5.12 GetVisibility
- 5.13 GetWindDirection
- 5.14 GetWindSpeed
- 5.15 Initialise
- 5.16 RequestData
- 5.17 SetForecastDay
- 5.18 SetLocationCode
- 6 Property reference
BBC Weather Forecast component
Easily allows you to collect observed weather metrics for your area using the BBC Weather data service. Supports temperature and humidity etc. for your selected area. Also available are Wind Direction, Wind Speed and Air Pressure but please note these are not always available depending on your selected area. This component is used for data gathering from the internet.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_BBCWeatherForecast.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_BBCWeatherForecast.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Here is a basic example to read the three day forecast data and report the information on a graphical display.
The location can be set by adjusting the BBC Weather location property, see the component property tooltips for more information on how to do this.
Here is an example of a next-day weather predictor that also shows the current-day weather for a ESP32 embedded device
Macro reference
GetDayName
![]() |
GetDayName |
Gets the name of the currently selected day as a string. | |
![]() |
Return |
GetDaySummary
![]() |
GetDaySummary |
Gets the summary of the currently selected day as a string. | |
![]() |
Return |
GetHumidity
![]() |
GetHumidity |
Reads the forecast humidity in Relative Humdity for the selected day. | |
![]() |
Return |
GetLocationName
![]() |
GetLocationName |
Reads the reported location name as a string. | |
![]() |
Return |
GetMaxTemperature
![]() |
GetMaxTemperature |
Reads the forecast maximum temperature in the selected scale for the selected day. | |
![]() |
Scale |
0 = Celcius, 1 = Farenheit | |
![]() |
Return |
GetMinTemperature
![]() |
GetMinTemperature |
Reads the forecast minimum temperature in the selected scale for the selected day. | |
![]() |
Scale |
0 = Celcius, 1 = Farenheit | |
![]() |
Return |
GetPollution
![]() |
GetPollution |
Reads the forecast pollution as a string for the selected day. | |
![]() |
Return |
GetPressure
![]() |
GetPressure |
Reads the forecast air pressure in milli bar (mb) for the selected day. | |
![]() |
Return |
GetSunrise
![]() |
GetSunrise |
Reads the forecast sunrise time as a string for the selected day. | |
![]() |
Return |
GetSunset
![]() |
GetSunset |
Reads the forecast sunset time as a string for the selected day. | |
![]() |
Return |
GetUVRisk
![]() |
GetUVRisk |
Reads the forecast UV Risk for the selected day. | |
![]() |
Return |
GetVisibility
![]() |
GetVisibility |
Reads the forecast visibility for the selected day. | |
![]() |
Return |
GetWindDirection
![]() |
GetWindDirection |
Reads the forecast wind direction as a string for the selected day. | |
![]() |
Return |
GetWindSpeed
![]() |
GetWindSpeed |
Reads the reported wind speed in MPH for the selected day. | |
![]() |
Return |
Initialise
![]() |
Initialise |
Sets up the component ready to collect weather data. | |
![]() |
Return |
RequestData
SetForecastDay
![]() |
SetForecastDay |
Chooses which day of the three day forecast to look at. | |
![]() |
Day |
0 = Today, 1 = Tomorrow, 2 = Day After Tomorrow | |
![]() |
Return |
SetLocationCode