Package: panoptes-aag
PANOPTES AAG weather readerWeather service for the Lunatico AAG CloudWatcher.This is a simple weather service for the Lunatico AAG CloudWatcher. It is
intended to be used with theaag-cloudwatcher.There are two main components to this project:Theaag-weathercommand line tool.FastAPIweb service.Theaag-weathercommand line tool is used to read the weather data from the
CloudWatcher and store it in a file.The web service is used to serve the weather data to a web browser as json, which can be read by various tools. If
usingPOCSyou can use thepocs sensor monitorcommand to read the weather data continuously.InstallationInstall withpip:pipinstallpanoptes-aagOr from a local repository:gitclonehttps://github.com/panoptes/aag-weathercdaag-weather
pipinstall-e.UsageYou can use either theaag-weathercommand line tool or the web service to
read the weather data.Web serviceStartingThe web service can be run with theaag-weathercommand line tool:aag-weatherserveThehostandportcan be specified with the--hostand--portoptions.ReadingPOCSIf you are usingPOCSyou can use the remote sensor utilities:pocssensormonitorweather--endpointhttp://localhost:8080:information_source: If you installed POCS via the install script then this is all managed for you.Command lineThe web service will serve the weather data as json. The data can be accessed
by going to the/weatherendpoint. For example, if the web service is
running onlocalhoston port8080then the weather data can be accessed athttp://localhost:8080/weather.Thehttpieis installed with this package and can be
used to read the weather data from the command line:http:8080/weatherCommand lineStartingTheaag-weathercommand line tool can be used to read the weather data from
the CloudWatcher and store it in a csv file. Theaag-weathercommand line tool
can be run with:aag-weathercaptureSeeaag-weather capture --helpfor more options.ReadingWhen theaag-weathercommand line tool is running it will write the weather
data to a file. The default file isweather.csvin the current directory. You
can change the format by specifying a different output file when capturing, for
example:aag-weathercapture--output-fileweather.jsonConfigurationTheaag-weathercommand line tool and web service
arepydantic settingsand can be configured with
environment variables or aconfig.envfile in the directory from which the command is run.The environment variables are prepended withAAG_. The main configuration options are:Environment variableDefaultDescriptionAAG_SERIAL_PORT/dev/ttyUSB0The serial port to use to connect to the CloudWatcher.AAG_SAFETY_DELAY15Minutes after an unsafe reading before the system is safe again.AAG_CAPTURE_DELAY30Seconds between readings.AAG_NUM_READINGS10Number of readings to use for averaging.AAG_IGNORE_UNSAFENoneNone, otherwise can be a list, e.g. 'rain','cloud','gust','wind'Additionally, you can set thethresholdsoptions as well as options to control theheater. These options
are "nested" and so use a double underscore (e.g.__) to separate the levels.Environment variableDefaultDescriptionAAG_THRESHOLDS__CLOUDY-25Difference between sky and ambient temperatures in Celsius.AAG_THRESHOLDS__VERY_CLOUDY-15Difference between sky and ambient temperatures in Celsius.AAG_THRESHOLDS__WINDY50Wind speed in km/h.AAG_THRESHOLDS__VERY_WINDY75Wind speed in km/h.AAG_THRESHOLDS__GUSTY100Wind gust speed in km/h.AAG_THRESHOLDS__VERY_GUSTY125Wind gust speed in km/h.AAG_THRESHOLDS__WET2200Wetness in Ohms.AAG_THRESHOLDS__RAINY1800Rain in Ohms.AAG_HEATER__MIN_POWER0Minimum power to use for the heater.AAG_HEATER__LOW_TEMP0Temperature in Celsius.AAG_HEATER__LOW_DELTA6Difference between sky and ambient temperatures in Celsius.AAG_HEATER__HIGH_TEMP20Temperature in Celsius.AAG_HEATER__HIGH_DELTA4Difference between sky and ambient temperatures in Celsius.AAG_HEATER__IMPULSE_TEMP10Temperature in Celsius.AAG_HEATER__IMPULSE_DURATION60Duration in seconds.AAG_HEATER__IMPULSE_CYCLE600Cycle in seconds.MiscThis project has been set up using PyScaffold 4.4.1. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.