# Weather Station

## AAG CloudSensor

The AAG CloudSensor requires power and a serial-to-usb connection to the control box.

### Configuration

The weather sensor has two types of configuration, there first is by changing the internal parameters of the AAG itself and the second is to change what is considered "safe" by the system.&#x20;

#### Internal&#x20;

Ideally you shouldn't need to change the internal parameters. If you are having any issues, see the website and user manual for your specific product.

{% embed url="<https://lunaticoastro.com/>" %}

#### Thresholds

The thresholds for the system are how POCS determines whether or not the system is "safe".  You can view the current settings for these values with:

```
pocs weather config
```

These values are set in the configuration file (i.e. `~/conf_files/pocs_local.yaml`):

```yaml
  weather:
    auto_detect: True
    safety_delay: 15    # minutes from bad reading until safe again
    capture_delay: 60   # seconds between taking measurements
    num_readings: 5     # number of readings to average for each measurement
    thresholds:
      cloudy: -25       # Cloudy threshold in delta degrees C
      very_cloudy: -15  # Very cloudy threshold in delta degrees C
      windy: 50         # Windy threshold in km/h
      very_windy: 75    # Very windy threshold in km/h
      gusty: 100        # Gusty threshold in km/h
      very_gusty: 125   # Very gusty threshold in km/h
      wet: 2200         # Ohms of resistance in rain sensor (lower is wetter)
      rainy: 1800       # Ohms of resistance in rain sensor (lower is wetter)
```

### Readings

You can get the current weather readings by using:

```
pocs weather status
```

The readings for the weather station are stored in the database, which by default is just a json file in the `~/json_store/panoptes` folder.  You should be able to find a `current_weather.json` file if the service is working correctly.  You can watch this file change by entering the following in a terminal, which should show the same thing as the above command:

```bash
tail -F ~/json_store/panotpes/current_weather.json | jq
```

### Log files

Log files for the weather service are located in `~/logs/weather-reader.log`.
