Difference between revisions of "Component: BBC Weather Forecast (Comms: IoT/Cloud)"
Line 85: | Line 85: | ||
On an embedded device you would need a TCP/IP component to allow the communications to the BBC server. This then links to the Network Comms component. | On an embedded device you would need a TCP/IP component to allow the communications to the BBC server. This then links to the Network Comms component. | ||
+ | |||
+ | |||
Line 90: | Line 92: | ||
==Macro reference== | ==Macro reference== | ||
+ | ===GetMaxTemperature=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 108: | Line 111: | ||
+ | ===GetVisibility=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 121: | Line 125: | ||
+ | ===GetDaySummary=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 134: | Line 139: | ||
+ | ===GetMinTemperature=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 152: | Line 158: | ||
+ | ===GetWindDirection=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 165: | Line 172: | ||
+ | ===RequestData=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 178: | Line 186: | ||
+ | ===GetPollution=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 191: | Line 200: | ||
+ | ===GetSunset=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 204: | Line 214: | ||
+ | ===GetHumidity=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 217: | Line 228: | ||
+ | ===GetDayName=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 230: | Line 242: | ||
+ | ===GetWindSpeed=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 243: | Line 256: | ||
+ | ===SetLocationCode=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 261: | Line 275: | ||
+ | ===GetSunrise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 274: | Line 289: | ||
+ | ===GetPressure=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 287: | Line 303: | ||
+ | ===SetForecastDay=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 305: | Line 322: | ||
+ | ===GetUVRisk=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 318: | Line 336: | ||
+ | ===GetLocationName=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 331: | Line 350: | ||
+ | ===Initialise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- |
Revision as of 11:48, 3 February 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 GetMaxTemperature
- 5.2 GetVisibility
- 5.3 GetDaySummary
- 5.4 GetMinTemperature
- 5.5 GetWindDirection
- 5.6 RequestData
- 5.7 GetPollution
- 5.8 GetSunset
- 5.9 GetHumidity
- 5.10 GetDayName
- 5.11 GetWindSpeed
- 5.12 SetLocationCode
- 5.13 GetSunrise
- 5.14 GetPressure
- 5.15 SetForecastDay
- 5.16 GetUVRisk
- 5.17 GetLocationName
- 5.18 Initialise
- 6 Property reference
BBC Weather Forecast component
Easily allows you to collect three day forecasted weather metrics for your area using the BBC Weather data service. Supports Min/Max temperature, Wind Direction, Wind Speed, Visibility, Pressure, Humidty, UV Risk, Pollution and Sun Rise/Set times for your selected area.
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.
On an embedded device you would need a TCP/IP component to allow the communications to the BBC server. This then links to the Network Comms component.
Macro reference
GetMaxTemperature
![]() |
GetMaxTemperature |
Reads the forecast maximum temperature in the selected scale for the selected day. | |
![]() |
Scale |
0 = Celcius, 1 = Farenheit | |
![]() |
Return |
GetVisibility
![]() |
GetVisibility |
Reads the forecast visibility for the selected day. | |
![]() |
Return |
GetDaySummary
![]() |
GetDaySummary |
Gets the summary of the currently selected day as a string. | |
![]() |
Return |
GetMinTemperature
![]() |
GetMinTemperature |
Reads the forecast minimum temperature in the selected scale for the selected day. | |
![]() |
Scale |
0 = Celcius, 1 = Farenheit | |
![]() |
Return |
GetWindDirection
![]() |
GetWindDirection |
Reads the forecast wind direction as a string for the selected day. | |
![]() |
Return |
RequestData
GetPollution
![]() |
GetPollution |
Reads the forecast pollution as a string for the selected day. | |
![]() |
Return |
GetSunset
![]() |
GetSunset |
Reads the forecast sunset time as a string for the selected day. | |
![]() |
Return |
GetHumidity
![]() |
GetHumidity |
Reads the forecast humidity in Relative Humdity for the selected day. | |
![]() |
Return |
GetDayName
![]() |
GetDayName |
Gets the name of the currently selected day as a string. | |
![]() |
Return |
GetWindSpeed
![]() |
GetWindSpeed |
Reads the reported wind speed in MPH for the selected day. | |
![]() |
Return |
SetLocationCode
GetSunrise
![]() |
GetSunrise |
Reads the forecast sunrise time as a string for the selected day. | |
![]() |
Return |
GetPressure
![]() |
GetPressure |
Reads the forecast air pressure in milli bar (mb) for the selected day. | |
![]() |
Return |
SetForecastDay
![]() |
SetForecastDay |
Chooses which day of the three day forecast to look at. | |
![]() |
Day |
0 = Today, 1 = Tomorrow, 2 = Day After Tomorrow | |
![]() |
Return |
GetUVRisk
![]() |
GetUVRisk |
Reads the forecast UV Risk for the selected day. | |
![]() |
Return |
GetLocationName
![]() |
GetLocationName |
Reads the reported location name as a string. | |
![]() |
Return |
Initialise
![]() |
Initialise |
Sets up the component ready to collect weather data. | |
![]() |
Return |