# Weather

### Installation

1. Navigate to the BuildingPro Suites App Store.
2. Search for "Weather App."
3. Click "Install" and confirm the installation.
4. Wait for the installation confirmation (usually 1-2 minutes).

### Configuration

#### OpenWeatherMap Registration

1. Visit [OpenWeatherMap](https://openweathermap.org/) and create an account.
2. Subscribe to the "One Call API 3.0" service (a free version is available).
3. Generate your API key in the Account Dashboard.
4. Note your API key for the BuildingPro Suites configuration.

#### App Configuration Parameters

| Parameter         | Description                                       | Required | Default Value |
| ----------------- | ------------------------------------------------- | -------- | ------------- |
| `apiKey`          | Your OpenWeatherMap API key                       | Yes      | -             |
| `enable`          | Enables/Disables the configuration                | Yes      | true          |
| `refreshInterval` | Data synchronization interval (seconds)           | Yes      | 300           |
| `requestTimeout`  | API request timeout (seconds)                     | No       | 120           |
| `tenantIDs`       | BuildingPro Suites tenant IDs for data collection | Yes      | -             |

#### Configuration Steps

1. Navigate to `Settings > Apps > Weather` in BuildingPro Suites.
2. Access the Generic Frontend interface.
3. Use the configuration endpoint with the PUT method.
4. Enter your configuration in JSON format:

```json
{
  "apiKey": "Your-API-Key",
  "enable": true,
  "refreshInterval": 300,
  "requestTimeout": 120,
  "tenantIDs": [
    "10"
  ]
}
```

### Asset Management

#### Asset Type

The app creates a `Weather` asset type that represents weather monitoring locations.

#### Creating Weather Assets

1. Navigate to Assets in BuildingPro Suites.
2. Click on "Create new asset."
3. Select "Weather" as the asset type.
4. Configure the basic asset properties.
5. Save the new asset.

#### Location Configuration

1. Open your Weather asset.
2. Click the edit button.
3. In the "Additional Information" section:
   * Enter the location name (e.g., "Zurich, Switzerland").
   * For best results, use the format: "City, Country" or "City, State, Country."
4. Save the configuration.
5. Refresh the page to check:
   * The location name appears with additional geographic details.
   * Weather data begins to populate the asset attributes.

#### Location Troubleshooting

If the location is not found:

1. Try more specific location names.
2. Add country or state information.
3. Check if the location exists in the OpenWeatherMap database.
4. Check for typos in the location name.

### Weather Data Attributes

The app provides these weather properties:

| Attribute   | Description                                          | Unit |
| ----------- | ---------------------------------------------------- | ---- |
| temperature | Current air temperature                              | °C   |
| feels\_like | Feels-like temperature considering wind and humidity | °C   |
| pressure    | Air pressure at the location                         | hPa  |
| humidity    | Relative humidity in percent                         | %    |
| dew\_point  | Temperature at which dew forms                       | °C   |
| uvi         | Ultraviolet index, indicating the risk of sunburn    | -    |
| clouds      | Percentage of cloud cover                            | %    |
| wind\_speed | Current wind speed                                   | m/s  |
| wind\_deg   | Wind direction in degrees (0-360)                    | °    |

In Google Sheets exportieren

### App Status Monitoring

The app creates a "Weather Root" asset that provides the following:

#### Status Indicators

* Asset Status: Shows the active/inactive state.
* Status Attribute: Current operational status with possible values:

| Status         | Description                         | Recommended Action                            |
| -------------- | ----------------------------------- | --------------------------------------------- |
| OK             | Normal operation                    | No action required                            |
| API\_ERROR     | Problem with the OpenWeatherMap API | Check API key and network connection          |
| CONFIG\_ERROR  | Configuration problem               | Check app configuration                       |
| RATE\_LIMIT    | API rate limit exceeded             | Increase refresh interval or upgrade API plan |
| NETWORK\_ERROR | Connection problem                  | Check network settings                        |

In Google Sheets exportieren

### Use Cases

#### Building Energy Optimization

* Adjusting HVAC systems based on outside temperature.
* Optimizing cooling systems using humidity data.
* Implementing natural ventilation strategies based on wind conditions.

#### Renewable Energy Management

* Forecasting solar power generation using cloud cover data.
* Adjusting wind turbine operation based on wind speed/direction.
* Implementing weather-dependent energy storage strategies.

#### Facility Management

* Planning maintenance activities considering weather conditions.
* Implementing weather-dependent cleaning schedules.
* Optimizing landscape irrigation based on precipitation forecasts.

#### Analytics and Reporting

* Correlating energy consumption with weather patterns.
* Creating reports on weather impact.
* Building predictive models for energy consumption.
