MassiveLoop
> Data
> MLWeatherData
MLWeatherData Component
MLWeatherData component can be used to fetch weather data from supported weather data vendors. The component will catch the current weather data in specified intervals. When combined with MLSynchronizer, component will synchronize the fetched weather data between all clients.
Note that to use this component, the user must obtain the API key from the selected weather data vendors. Some vendors also support geo coding which can be used to determine the geo coordinates of the city or region. When supported, the editor enables the geo search feature.
Note: Misconfiguring this component may result in excessive weather data venter API usage.
To keep the API usage minimal, make sure to keep the interval to at least once every 20 minutes, and make sure the synchronization is set to Master Only Synchronized.
Synchronization Options:
- Individual: Each client fetches the weather data individually in specified interval. This method can cause a high API usage.
- Master Only: Only the master client fetches the weather data. You may use the Lua scripting to synchronize your desired values.
- Master Only Synchronize: Only the master client fetches the weather data, then it shares it with other client. It requires a MLSynchronizer component within the hierarchy (this or one of parents).
The weather data contains the following fields:
-
Temperature: the current temperature in Celsius.
-
FeelsLike: The feels like temperature in Celsius.
-
MaxTemperature: Maximum recorded current temperature in Celcius. The temperature in some areas are reported by multiple weather stations. This value represents the maximum temperature recorded. The value may be equal with Temperature and Min Temperature if the weather reported by a single weather station.
-
MinTemperature: Minimum recorded current temperature in Celcius. The temperature in some areas are reported by multiple weather stations. This value represents the minimum temperature recorded. The value may be equal with Temperature and Max Temperature if the weather reported by a single weather station.
-
Pressure: The current pressure in Hectopascal (hPa).
-
Humidity: The humidity percentage.
-
WindSpeed: The current wind speed in m/s.
-
WindBearing: The current meteorological wind angle in degrees.
-
WindGust: The current wind gust.
-
CloudCoverage: The current cloud coverage percentage. 0 means no could in the sky and 100 mean sky fully covered by the clouds.
-
Visibility: The current visibility in meters. The maximum value is 10000.
-
RainVolumeInLastHour: The rainfall depth in last hour in mm.
-
SnowVolumeInLastHour: The snow fall depth in last hour in mm.
Requires
Parameters
Name | Description |
---|---|
Weather Source | The weather data vendor. |
Api Key | Your API key from the weather data vendor. |
Location Longitude | The longitude of location to query weather about. |
Location Latitude | The latitude of the location to query weather about. |
Search Location | Find the longitude and latitude by searching the city or area name. Only if geo coding supported. |
Data Fetching Unit | Data Fetching Unit |
Data Fetching Interval | Data fetching interval. The component try to fetch weather data once every (interval) (unit). |
Synchronization | How or if the component should fetch or synchronize the weather data fetched. |