diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 7564fa8..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,3 +0,0 @@ -# These are supported funding model platforms - -github: pvizeli diff --git a/aiocloudweather/conversion.py b/aiocloudweather/conversion.py index 37e6704..6b44c11 100644 --- a/aiocloudweather/conversion.py +++ b/aiocloudweather/conversion.py @@ -35,7 +35,7 @@ def lux_to_wm2(lux: float) -> float: @unit(UnitOfSpeed.METERS_PER_SECOND) def mph_to_ms(speed: float) -> float: - return speed * 2.23694 + return speed * 0.44704 @unit(UnitOfPressure.INHG) @@ -56,4 +56,4 @@ def wm2_to_lux(lux: float) -> float: @unit(UnitOfSpeed.MILES_PER_HOUR) def ms_to_mph(speed: float) -> float: - return speed * 0.44704 \ No newline at end of file + return speed * 2.23694 \ No newline at end of file diff --git a/aiocloudweather/sensor.py b/aiocloudweather/sensor.py index 8875b61..230ad9d 100644 --- a/aiocloudweather/sensor.py +++ b/aiocloudweather/sensor.py @@ -170,7 +170,7 @@ class WeathercloudRawSensor: @dataclass class Sensor: - """ """ + """Represents a weather sensor.""" metric: float metric_unit: str @@ -181,7 +181,7 @@ class Sensor: @dataclass class WeatherStation: """ - Weather data. + Represents a weather station with various sensor readings. """ station_id: str @@ -206,6 +206,19 @@ class WeatherStation: @staticmethod def from_wunderground(data: WundergroundRawSensor) -> "WeatherStation": + """ + Converts raw sensor data from the Wunderground API into a WeatherStation object. + + Args: + data (WundergroundRawSensor): The raw sensor data from the Wunderground API. + + Returns: + WeatherStation: The converted WeatherStation object. + + Raises: + TypeError: If there is an error converting the sensor data. + + """ sensor_data = {} for field in fields(data): if field.name == "station_id" or field.name == "station_key": @@ -248,6 +261,19 @@ def from_wunderground(data: WundergroundRawSensor) -> "WeatherStation": @staticmethod def from_weathercloud(data: WeathercloudRawSensor) -> "WeatherStation": + """ + Converts raw sensor data from the Weathercloud.net API into a WeatherStation object. + + Args: + data (WeathercloudRawSensor): The raw sensor data from the Weathercloud.net API. + + Returns: + WeatherStation: The converted WeatherStation object. + + Raises: + TypeError: If there is an error converting the sensor data. + + """ sensor_data = {} for field in fields(data): if field.name == "station_id" or field.name == "station_key": @@ -257,11 +283,11 @@ def from_weathercloud(data: WeathercloudRawSensor) -> "WeatherStation": continue value = field.type(value) # No idea why this is needed - value = float(value) / 10 # All values are multiplied by 10 unit = field.metadata.get("unit") conversion_func = metric_to_imperial.get(unit) if conversion_func: + value = float(value) / 10 # All values are shifted by 10 try: converted_value = conversion_func(float(value)) except TypeError as e: diff --git a/setup.py b/setup.py index 92b8f53..6b8a387 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ description="Python wrapper for Cloud Weather protocols", long_description=README_FILE.read_text(encoding="utf-8"), long_description_content_type="text/markdown", - packages=find_packages(exclude=["tests.*", "tests", "misc"]), + packages=find_packages(exclude=["tests.*", "tests"]), package_data={"aiocoudweather": ["py.typed"]}, python_requires=">=3.12", install_requires=["aiohttp>3"], diff --git a/tests/data/weathercloud b/tests/data/weathercloud new file mode 100644 index 0000000..86dcdb1 --- /dev/null +++ b/tests/data/weathercloud @@ -0,0 +1,100 @@ +/v01/set/wid/12345/key/12345/bar/10101/temp/149/hum/95/wdir/265/wspd/3/dew/140/heat/149/rainrate/0/rain/6/uvi/0/solarrad/224 +/v01/set/wid/12345/key/12345/bar/10168/temp/168/hum/85/wdir/277/wspd/0/dew/142/heat/168/rainrate/0/rain/0/uvi/20/solarrad/2546 +/v01/set/wid/12345/key/12345/bar/10101/temp/151/hum/95/wdir/279/wspd/0/dew/142/heat/151/rainrate/0/rain/6/uvi/10/solarrad/552 +/v01/set/wid/12345/key/12345/bar/10166/temp/145/hum/93/wdir/292/wspd/0/dew/133/heat/145/rainrate/0/rain/45/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10136/temp/138/hum/87/wdir/284/wspd/0/dew/116/heat/138/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10123/temp/141/hum/98/wdir/91/wspd/6/dew/137/heat/141/rainrate/41/rain/148/uvi/0/solarrad/135 +/v01/set/wid/12345/key/12345/bar/10168/temp/129/hum/96/wdir/271/wspd/1/dew/122/heat/129/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10112/temp/182/hum/87/wdir/77/wspd/3/dew/159/heat/182/rainrate/0/rain/6/uvi/20/solarrad/1169 +/v01/set/wid/12345/key/12345/bar/10152/temp/182/hum/85/wdir/273/wspd/0/dew/156/heat/182/rainrate/0/rain/38/uvi/20/solarrad/2268 +/v01/set/wid/12345/key/12345/bar/10110/temp/203/hum/77/wdir/26/wspd/1/dew/161/heat/203/rainrate/0/rain/6/uvi/10/solarrad/977 +/v01/set/wid/12345/key/12345/bar/10157/temp/194/hum/70/wdir/267/wspd/3/dew/137/heat/194/rainrate/0/rain/0/uvi/30/solarrad/3196 +/v01/set/wid/12345/key/12345/bar/10152/temp/191/hum/84/wdir/299/wspd/0/dew/163/heat/191/rainrate/0/rain/38/uvi/20/solarrad/2426 +/v01/set/wid/12345/key/12345/bar/10166/temp/146/hum/92/wdir/295/wspd/0/dew/133/heat/146/rainrate/0/rain/45/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10168/temp/142/hum/95/wdir/286/wspd/0/dew/133/heat/142/rainrate/0/rain/45/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10168/temp/127/hum/97/wdir/279/wspd/0/dew/122/heat/127/rainrate/0/rain/0/uvi/0/solarrad/3 +/v01/set/wid/12345/key/12345/bar/10166/temp/132/hum/96/wdir/265/wspd/2/dew/125/heat/132/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10141/temp/140/hum/99/wdir/100/wspd/10/dew/138/heat/140/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10157/temp/195/hum/70/wdir/267/wspd/0/dew/138/heat/195/rainrate/0/rain/0/uvi/20/solarrad/1391 +/v01/set/wid/12345/key/12345/bar/10166/temp/175/hum/82/wdir/254/wspd/8/dew/143/heat/175/rainrate/0/rain/0/uvi/30/solarrad/5263 +/v01/set/wid/12345/key/12345/bar/10156/temp/226/hum/60/wdir/252/wspd/3/dew/144/heat/226/rainrate/0/rain/0/uvi/20/solarrad/1445 +/v01/set/wid/12345/key/12345/bar/10106/temp/141/hum/90/wdir/301/wspd/0/dew/124/heat/141/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10141/temp/120/hum/95/wdir/272/wspd/0/dew/112/heat/120/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10157/temp/193/hum/71/wdir/324/wspd/0/dew/138/heat/193/rainrate/0/rain/0/uvi/20/solarrad/1760 +/v01/set/wid/12345/key/12345/bar/10129/temp/185/hum/77/wdir/255/wspd/1/dew/143/heat/185/rainrate/0/rain/0/uvi/10/solarrad/404 +/v01/set/wid/12345/key/12345/bar/10168/temp/149/hum/92/wdir/270/wspd/0/dew/136/heat/149/rainrate/0/rain/0/uvi/10/solarrad/718 +/v01/set/wid/12345/key/12345/bar/10161/temp/225/hum/69/wdir/280/wspd/1/dew/165/heat/225/rainrate/0/rain/0/uvi/50/solarrad/6744 +/v01/set/wid/12345/key/12345/bar/10170/temp/168/hum/86/wdir/266/wspd/1/dew/144/heat/168/rainrate/0/rain/0/uvi/20/solarrad/1656 +/v01/set/wid/12345/key/12345/bar/10168/temp/126/hum/97/wdir/302/wspd/0/dew/121/heat/126/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10169/temp/202/hum/64/wdir/82/wspd/3/dew/131/heat/202/rainrate/0/rain/2/uvi/30/solarrad/2369 +/v01/set/wid/12345/key/12345/bar/10160/temp/152/hum/91/wdir/274/wspd/0/dew/137/heat/152/rainrate/0/rain/45/uvi/0/solarrad/12 +/v01/set/wid/12345/key/12345/bar/10097/temp/145/hum/90/wdir/257/wspd/5/dew/128/heat/145/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10101/temp/149/hum/95/wdir/242/wspd/5/dew/140/heat/149/rainrate/0/rain/6/uvi/0/solarrad/245 +/v01/set/wid/12345/key/12345/bar/10157/temp/223/hum/65/wdir/252/wspd/0/dew/153/heat/223/rainrate/0/rain/0/uvi/30/solarrad/3688 +/v01/set/wid/12345/key/12345/bar/10139/temp/142/hum/99/wdir/102/wspd/1/dew/140/heat/142/rainrate/0/rain/229/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10104/temp/142/hum/90/wdir/267/wspd/2/dew/125/heat/142/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10144/temp/140/hum/99/wdir/107/wspd/0/dew/138/heat/140/rainrate/0/rain/2/uvi/0/solarrad/11 +/v01/set/wid/12345/key/12345/bar/10135/temp/146/hum/87/wdir/286/wspd/0/dew/124/heat/146/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10133/temp/203/hum/70/wdir/270/wspd/5/dew/146/heat/203/rainrate/0/rain/0/uvi/10/solarrad/1361 +/v01/set/wid/12345/key/12345/bar/10143/temp/118/hum/97/wdir/273/wspd/0/dew/113/heat/118/rainrate/0/rain/0/uvi/0/solarrad/1 +/v01/set/wid/12345/key/12345/bar/10148/temp/133/hum/96/wdir/281/wspd/0/dew/126/heat/133/rainrate/0/rain/0/uvi/10/solarrad/823 +/v01/set/wid/12345/key/12345/bar/10144/temp/118/hum/97/wdir/273/wspd/0/dew/113/heat/118/rainrate/0/rain/0/uvi/0/solarrad/8 +/v01/set/wid/12345/key/12345/bar/10153/temp/224/hum/60/wdir/270/wspd/1/dew/142/heat/224/rainrate/0/rain/0/uvi/20/solarrad/1579 +/v01/set/wid/12345/key/12345/bar/10128/temp/193/hum/75/wdir/267/wspd/3/dew/147/heat/193/rainrate/0/rain/0/uvi/10/solarrad/738 +/v01/set/wid/12345/key/12345/bar/10123/temp/142/hum/98/wdir/99/wspd/7/dew/138/heat/142/rainrate/0/rain/148/uvi/0/solarrad/133 +/v01/set/wid/12345/key/12345/bar/10122/temp/154/hum/87/wdir/270/wspd/3/dew/132/heat/154/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10156/temp/169/hum/94/wdir/94/wspd/0/dew/159/heat/169/rainrate/0/rain/2/uvi/20/solarrad/1497 +/v01/set/wid/12345/key/12345/bar/10136/temp/140/hum/89/wdir/270/wspd/0/dew/122/heat/140/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10156/temp/169/hum/93/wdir/85/wspd/2/dew/157/heat/169/rainrate/0/rain/2/uvi/30/solarrad/4475 +/v01/set/wid/12345/key/12345/bar/10168/temp/141/hum/94/wdir/275/wspd/0/dew/131/heat/141/rainrate/0/rain/45/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10181/temp/201/hum/64/wdir/112/wspd/4/dew/130/heat/201/rainrate/0/rain/2/uvi/20/solarrad/1878 +/v01/set/wid/12345/key/12345/bar/10156/temp/162/hum/89/wdir/313/wspd/1/dew/143/heat/162/rainrate/109/rain/25/uvi/0/solarrad/117 +/v01/set/wid/12345/key/12345/bar/10156/temp/184/hum/77/wdir/290/wspd/0/dew/142/heat/184/rainrate/0/rain/38/uvi/10/solarrad/336 +/v01/set/wid/12345/key/12345/bar/10104/temp/166/hum/92/wdir/277/wspd/0/dew/152/heat/166/rainrate/0/rain/6/uvi/10/solarrad/643 +/v01/set/wid/12345/key/12345/bar/10153/temp/194/hum/81/wdir/270/wspd/0/dew/160/heat/194/rainrate/0/rain/38/uvi/10/solarrad/787 +/v01/set/wid/12345/key/12345/bar/10130/temp/163/hum/81/wdir/287/wspd/0/dew/130/heat/163/rainrate/0/rain/0/uvi/0/solarrad/40 +/v01/set/wid/12345/key/12345/bar/10139/temp/139/hum/90/wdir/273/wspd/0/dew/122/heat/139/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10153/temp/197/hum/82/wdir/310/wspd/0/dew/165/heat/197/rainrate/0/rain/38/uvi/10/solarrad/2163 +/v01/set/wid/12345/key/12345/bar/10154/temp/205/hum/68/wdir/292/wspd/0/dew/143/heat/205/rainrate/0/rain/0/uvi/30/solarrad/4002 +/v01/set/wid/12345/key/12345/bar/10136/temp/132/hum/89/wdir/284/wspd/0/dew/114/heat/132/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10152/temp/157/hum/91/wdir/274/wspd/0/dew/142/heat/157/rainrate/0/rain/38/uvi/10/solarrad/721 +/v01/set/wid/12345/key/12345/bar/10169/temp/173/hum/82/wdir/257/wspd/3/dew/141/heat/173/rainrate/0/rain/0/uvi/20/solarrad/2149 +/v01/set/wid/12345/key/12345/bar/10123/temp/143/hum/97/wdir/106/wspd/3/dew/138/heat/143/rainrate/68/rain/128/uvi/0/solarrad/91 +/v01/set/wid/12345/key/12345/bar/10163/temp/185/hum/72/wdir/82/wspd/6/dew/133/heat/185/rainrate/0/rain/2/uvi/30/solarrad/3419 +/v01/set/wid/12345/key/12345/bar/10128/temp/159/hum/85/wdir/263/wspd/4/dew/133/heat/159/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10169/temp/172/hum/82/wdir/189/wspd/5/dew/140/heat/172/rainrate/0/rain/0/uvi/20/solarrad/1298 +/v01/set/wid/12345/key/12345/bar/10114/temp/144/hum/88/wdir/263/wspd/5/dew/124/heat/144/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10166/temp/128/hum/96/wdir/270/wspd/0/dew/121/heat/128/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10156/temp/168/hum/91/wdir/117/wspd/4/dew/153/heat/168/rainrate/0/rain/2/uvi/20/solarrad/2510 +/v01/set/wid/12345/key/12345/bar/10149/temp/142/hum/99/wdir/107/wspd/0/dew/140/heat/142/rainrate/0/rain/2/uvi/0/solarrad/132 +/v01/set/wid/12345/key/12345/bar/10160/temp/152/hum/91/wdir/297/wspd/1/dew/137/heat/152/rainrate/0/rain/45/uvi/0/solarrad/13 +/v01/set/wid/12345/key/12345/bar/10138/temp/140/hum/99/wdir/111/wspd/5/dew/138/heat/140/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10172/temp/205/hum/62/wdir/91/wspd/0/dew/129/heat/205/rainrate/0/rain/2/uvi/20/solarrad/1302 +/v01/set/wid/12345/key/12345/bar/10178/temp/198/hum/68/wdir/104/wspd/0/dew/137/heat/198/rainrate/0/rain/2/uvi/10/solarrad/652 +/v01/set/wid/12345/key/12345/bar/10143/temp/118/hum/96/wdir/273/wspd/0/dew/111/heat/118/rainrate/0/rain/0/uvi/0/solarrad/39 +/v01/set/wid/12345/key/12345/bar/10147/temp/140/hum/99/wdir/107/wspd/0/dew/138/heat/140/rainrate/0/rain/2/uvi/0/solarrad/29 +/v01/set/wid/12345/key/12345/bar/10166/temp/139/hum/94/wdir/265/wspd/2/dew/129/heat/139/rainrate/0/rain/0/uvi/20/solarrad/429 +/v01/set/wid/12345/key/12345/bar/10120/temp/147/hum/97/wdir/114/wspd/3/dew/142/heat/147/rainrate/54/rain/100/uvi/0/solarrad/73 +/v01/set/wid/12345/key/12345/bar/10144/temp/140/hum/99/wdir/107/wspd/0/dew/138/heat/140/rainrate/0/rain/2/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10111/temp/180/hum/87/wdir/110/wspd/1/dew/157/heat/180/rainrate/0/rain/6/uvi/20/solarrad/1434 +/v01/set/wid/12345/key/12345/bar/10169/temp/132/hum/96/wdir/282/wspd/1/dew/125/heat/132/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10167/temp/138/hum/96/wdir/278/wspd/0/dew/131/heat/138/rainrate/0/rain/45/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10170/temp/159/hum/89/wdir/263/wspd/0/dew/140/heat/159/rainrate/0/rain/0/uvi/20/solarrad/1431 +/v01/set/wid/12345/key/12345/bar/10131/temp/202/hum/71/wdir/246/wspd/4/dew/147/heat/202/rainrate/0/rain/0/uvi/10/solarrad/1248 +/v01/set/wid/12345/key/12345/bar/10166/temp/188/hum/68/wdir/134/wspd/15/dew/127/heat/188/rainrate/0/rain/2/uvi/70/solarrad/7089 +/v01/set/wid/12345/key/12345/bar/10099/temp/150/hum/94/wdir/247/wspd/4/dew/140/heat/150/rainrate/13/rain/4/uvi/0/solarrad/138 +/v01/set/wid/12345/key/12345/bar/10168/temp/169/hum/84/wdir/250/wspd/3/dew/141/heat/169/rainrate/0/rain/0/uvi/20/solarrad/2960 +/v01/set/wid/12345/key/12345/bar/10155/temp/198/hum/78/wdir/283/wspd/1/dew/158/heat/198/rainrate/0/rain/38/uvi/10/solarrad/1082 +/v01/set/wid/12345/key/12345/bar/10130/temp/167/hum/79/wdir/282/wspd/0/dew/130/heat/167/rainrate/0/rain/0/uvi/0/solarrad/75 +/v01/set/wid/12345/key/12345/bar/10128/temp/159/hum/85/wdir/249/wspd/3/dew/133/heat/159/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10102/temp/166/hum/92/wdir/287/wspd/0/dew/152/heat/166/rainrate/0/rain/6/uvi/20/solarrad/1259 +/v01/set/wid/12345/key/12345/bar/10111/temp/171/hum/87/wdir/94/wspd/3/dew/149/heat/171/rainrate/0/rain/6/uvi/0/solarrad/145 +/v01/set/wid/12345/key/12345/bar/10114/temp/181/hum/88/wdir/164/wspd/0/dew/160/heat/181/rainrate/0/rain/6/uvi/10/solarrad/654 +/v01/set/wid/12345/key/12345/bar/10168/temp/126/hum/97/wdir/286/wspd/0/dew/121/heat/126/rainrate/0/rain/0/uvi/0/solarrad/0 +/v01/set/wid/12345/key/12345/bar/10166/temp/223/hum/60/wdir/65/wspd/5/dew/141/heat/223/rainrate/0/rain/2/uvi/30/solarrad/2506 +/v01/set/wid/12345/key/12345/bar/10166/temp/130/hum/97/wdir/259/wspd/0/dew/125/heat/130/rainrate/0/rain/0/uvi/0/solarrad/139 +/v01/set/wid/12345/key/12345/bar/10147/temp/140/hum/99/wdir/107/wspd/0/dew/138/heat/140/rainrate/0/rain/2/uvi/0/solarrad/5 +/v01/set/wid/12345/key/12345/bar/10167/temp/200/hum/74/wdir/268/wspd/4/dew/152/heat/200/rainrate/0/rain/0/uvi/50/solarrad/6324 +/v01/set/wid/12345/key/12345/bar/10147/temp/140/hum/99/wdir/107/wspd/0/dew/138/heat/140/rainrate/0/rain/2/uvi/0/solarrad/73 +/v01/set/wid/12345/key/12345/bar/10133/temp/203/hum/70/wdir/236/wspd/17/dew/146/heat/203/rainrate/0/rain/0/uvi/20/solarrad/1514 +/v01/set/wid/12345/key/12345/bar/10157/temp/223/hum/63/wdir/248/wspd/0/dew/149/heat/223/rainrate/0/rain/0/uvi/30/solarrad/3714 \ No newline at end of file diff --git a/tests/data/wunderground b/tests/data/wunderground new file mode 100644 index 0000000..17a18b4 --- /dev/null +++ b/tests/data/wunderground @@ -0,0 +1,100 @@ +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+3%3A55%3A56&baromin=29.95&tempf=53.2&humidity=97&dewptf=52.2&rainin=0&dailyrainin=0&winddir=272&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0.5 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-23+15%3A18%3A47&baromin=30.05&tempf=68.3&humidity=68&dewptf=57.2&rainin=0&dailyrainin=0&winddir=181&windspeedmph=0.5&windgustmph=1.1&UV=2&solarRadiation=123.5 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-23+5%3A18%3A24&baromin=29.96&tempf=57.5&humidity=99&dewptf=57.2&rainin=0&dailyrainin=0&winddir=107&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=12.3 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+19%3A16%3A17&baromin=29.98&tempf=63.5&humidity=80&dewptf=57.2&rainin=0&dailyrainin=0.15&winddir=282&windspeedmph=0&windgustmph=0&UV=1&solarRadiation=13.5 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+10%3A55%3A57&baromin=30.00&tempf=71.5&humidity=64&dewptf=58.5&rainin=0&dailyrainin=0&winddir=256&windspeedmph=0.3&windgustmph=0.3&UV=4&solarRadiation=419.2 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+8%3A27%3A18&baromin=30.03&tempf=63.2&humidity=83&dewptf=57.9&rainin=0&dailyrainin=0&winddir=287&windspeedmph=0.4&windgustmph=0.8&UV=2&solarRadiation=245.1 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+0%3A25%3A23&baromin=29.92&tempf=57.2&humidity=81&dewptf=51.4&rainin=0&dailyrainin=0&winddir=282&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+14%3A14%3A47&baromin=29.95&tempf=71.4&humidity=70&dewptf=60.9&rainin=0&dailyrainin=0&winddir=171&windspeedmph=0&windgustmph=0.8&UV=2&solarRadiation=79.9 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+1%3A53%3A11&baromin=29.92&tempf=55.0&humidity=86&dewptf=50.9&rainin=0&dailyrainin=0&winddir=280&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+10%3A21%3A44&baromin=30.02&tempf=68.0&humidity=74&dewptf=59.2&rainin=0&dailyrainin=0&winddir=275&windspeedmph=1.5&windgustmph=2.7&UV=5&solarRadiation=623.5 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+23%3A52%3A39&baromin=29.95&tempf=57.2&humidity=99&dewptf=56.7&rainin=0&dailyrainin=0&winddir=112&windspeedmph=0.8&windgustmph=1.1&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+10%3A27%3A9&baromin=30.00&tempf=68.9&humidity=67&dewptf=57.2&rainin=0&dailyrainin=0&winddir=306&windspeedmph=0.5&windgustmph=1.1&UV=2&solarRadiation=216.0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+19%3A17%3A42&baromin=29.88&tempf=63.0&humidity=76&dewptf=55.4&rainin=0&dailyrainin=0&winddir=285&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=12.5 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+12%3A0%3A36&baromin=29.90&tempf=71.9&humidity=56&dewptf=55.2&rainin=0&dailyrainin=0&winddir=239&windspeedmph=0.7&windgustmph=1.6&UV=8&solarRadiation=764.4 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+3%3A57%3A8&baromin=29.81&tempf=58.4&humidity=90&dewptf=55.4&rainin=0&dailyrainin=0&winddir=263&windspeedmph=1.1&windgustmph=1.6&UV=0&solarRadiation=0.4 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+18%3A29%3A58&baromin=29.98&tempf=67.5&humidity=78&dewptf=60.4&rainin=0&dailyrainin=0.15&winddir=304&windspeedmph=0.7&windgustmph=0.8&UV=1&solarRadiation=108.0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+21%3A6%3A18&baromin=29.93&tempf=58.0&humidity=87&dewptf=54.0&rainin=0&dailyrainin=0&winddir=286&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+4%3A3%3A40&baromin=29.89&tempf=53.5&humidity=89&dewptf=50.2&rainin=0&dailyrainin=0&winddir=278&windspeedmph=0.3&windgustmph=0.8&UV=0&solarRadiation=0.8 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+6%3A43%3A30&baromin=30.02&tempf=58.2&humidity=93&dewptf=56.0&rainin=0&dailyrainin=0&winddir=263&windspeedmph=0&windgustmph=0.8&UV=1&solarRadiation=77.5 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+9%3A44%3A40&baromin=29.98&tempf=66.1&humidity=71&dewptf=56.4&rainin=0&dailyrainin=0&winddir=311&windspeedmph=0&windgustmph=0.3&UV=2&solarRadiation=164.8 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-23+2%3A55%3A13&baromin=29.95&tempf=57.2&humidity=99&dewptf=57.0&rainin=0&dailyrainin=0&winddir=107&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+20%3A6%3A41&baromin=29.98&tempf=59.7&humidity=92&dewptf=57.2&rainin=0&dailyrainin=0.18&winddir=284&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=1.7 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+13%3A38%3A46&baromin=29.89&tempf=68.3&humidity=66&dewptf=56.4&rainin=0&dailyrainin=0&winddir=261&windspeedmph=0.3&windgustmph=0.3&UV=2&solarRadiation=83.1 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+18%3A9%3A21&baromin=29.90&tempf=66.3&humidity=75&dewptf=58.0&rainin=0&dailyrainin=0&winddir=261&windspeedmph=0.8&windgustmph=1.1&UV=1&solarRadiation=72.6 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+20%3A50%3A28&baromin=29.93&tempf=57.2&humidity=99&dewptf=57.0&rainin=0&dailyrainin=0.88&winddir=91&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+10%3A13%3A34&baromin=30.02&tempf=66.9&humidity=76&dewptf=59.0&rainin=0&dailyrainin=0&winddir=241&windspeedmph=0.6&windgustmph=0.8&UV=5&solarRadiation=659.4 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+11%3A12%3A8&baromin=30.00&tempf=71.4&humidity=68&dewptf=60.2&rainin=0&dailyrainin=0&winddir=276&windspeedmph=0.9&windgustmph=4.0&UV=7&solarRadiation=697.7 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+23%3A19%3A52&baromin=29.95&tempf=57.2&humidity=99&dewptf=57.0&rainin=0&dailyrainin=0&winddir=110&windspeedmph=0&windgustmph=0.8&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+11%3A0%3A17&baromin=29.85&tempf=70.5&humidity=75&dewptf=62.0&rainin=0&dailyrainin=0.01&winddir=345&windspeedmph=0&windgustmph=0&UV=2&solarRadiation=152.8 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+7%3A44%3A0&baromin=29.82&tempf=59.0&humidity=95&dewptf=57.5&rainin=0&dailyrainin=0.01&winddir=278&windspeedmph=0.4&windgustmph=0.8&UV=1&solarRadiation=67.6 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-23+11%3A57%3A36&baromin=30.03&tempf=68.5&humidity=63&dewptf=55.4&rainin=0&dailyrainin=0&winddir=130&windspeedmph=0.4&windgustmph=0.8&UV=2&solarRadiation=171.5 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+4%3A58%3A48&baromin=29.81&tempf=59.0&humidity=90&dewptf=55.9&rainin=0&dailyrainin=0&winddir=272&windspeedmph=0.3&windgustmph=1.1&UV=0&solarRadiation=8.8 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+10%3A35%3A21&baromin=30.02&tempf=70.3&humidity=70&dewptf=59.9&rainin=0&dailyrainin=0&winddir=257&windspeedmph=0.6&windgustmph=0.8&UV=6&solarRadiation=653.0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+17%3A18%3A54&baromin=29.92&tempf=68.6&humidity=70&dewptf=58.4&rainin=0&dailyrainin=0&winddir=230&windspeedmph=0.7&windgustmph=1.1&UV=1&solarRadiation=125.5 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-23+5%3A52%3A31&baromin=29.97&tempf=57.9&humidity=99&dewptf=57.5&rainin=0&dailyrainin=0&winddir=109&windspeedmph=0&windgustmph=0&UV=1&solarRadiation=40.5 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+13%3A6%3A37&baromin=29.97&tempf=71.5&humidity=69&dewptf=60.7&rainin=0&dailyrainin=0&winddir=287&windspeedmph=1.1&windgustmph=1.1&UV=2&solarRadiation=91.0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+16%3A59%3A19&baromin=29.88&tempf=58.2&humidity=97&dewptf=57.2&rainin=0.31&dailyrainin=0.43&winddir=246&windspeedmph=1.3&windgustmph=2.4&UV=0&solarRadiation=7.6 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+5%3A26%3A7&baromin=29.96&tempf=54.0&humidity=97&dewptf=53.2&rainin=0&dailyrainin=0&winddir=289&windspeedmph=0&windgustmph=0.3&UV=0&solarRadiation=14.3 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+15%3A54%3A39&baromin=29.98&tempf=59.7&humidity=91&dewptf=57.0&rainin=0&dailyrainin=0.15&winddir=274&windspeedmph=0&windgustmph=0&UV=1&solarRadiation=38.2 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+22%3A18%3A11&baromin=29.94&tempf=57.2&humidity=99&dewptf=57.0&rainin=0&dailyrainin=0.91&winddir=104&windspeedmph=0.5&windgustmph=1.6&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+0%3A57%3A18&baromin=30.03&tempf=55.7&humidity=96&dewptf=54.5&rainin=0&dailyrainin=0&winddir=272&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+23%3A29%3A56&baromin=30.03&tempf=56.2&humidity=96&dewptf=55.0&rainin=0&dailyrainin=0&winddir=270&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+14%3A18%3A45&baromin=29.98&tempf=64.5&humidity=79&dewptf=57.7&rainin=0&dailyrainin=0&winddir=0&windspeedmph=0&windgustmph=0&UV=1&solarRadiation=39.5 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+13%3A45%3A18&baromin=29.87&tempf=64.5&humidity=89&dewptf=61.0&rainin=0&dailyrainin=0.01&winddir=98&windspeedmph=0.4&windgustmph=0.8&UV=1&solarRadiation=82.0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+5%3A47%3A18&baromin=30.01&tempf=56.0&humidity=96&dewptf=54.7&rainin=0&dailyrainin=0&winddir=290&windspeedmph=0&windgustmph=0.3&UV=1&solarRadiation=34.7 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+15%3A14%3A47&baromin=29.94&tempf=71.1&humidity=68&dewptf=60.0&rainin=0&dailyrainin=0&winddir=269&windspeedmph=0.7&windgustmph=1.6&UV=2&solarRadiation=104.0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+23%3A9%3A41&baromin=29.93&tempf=56.7&humidity=89&dewptf=53.5&rainin=0&dailyrainin=0&winddir=284&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-23+1%3A26%3A39&baromin=29.94&tempf=57.2&humidity=99&dewptf=57.0&rainin=0&dailyrainin=0&winddir=116&windspeedmph=0.9&windgustmph=0.9&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+1%3A2%3A45&baromin=29.94&tempf=56.0&humidity=92&dewptf=53.7&rainin=0&dailyrainin=0&winddir=273&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-23+8%3A20%3A7&baromin=29.98&tempf=62.4&humidity=92&dewptf=59.9&rainin=0&dailyrainin=0&winddir=83&windspeedmph=0&windgustmph=0.3&UV=2&solarRadiation=208.6 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+18%3A13%3A6&baromin=29.89&tempf=57.5&humidity=98&dewptf=56.7&rainin=0&dailyrainin=0.57&winddir=128&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=3.5 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+11%3A49%3A22&baromin=29.86&tempf=68.9&humidity=79&dewptf=62.0&rainin=0&dailyrainin=0.01&winddir=15&windspeedmph=0&windgustmph=0&UV=2&solarRadiation=99.5 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-23+1%3A2%3A8&baromin=29.94&tempf=57.2&humidity=99&dewptf=56.7&rainin=0&dailyrainin=0&winddir=114&windspeedmph=0.3&windgustmph=0.8&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+3%3A24%3A54&baromin=29.90&tempf=52.7&humidity=89&dewptf=49.5&rainin=0&dailyrainin=0&winddir=279&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+16%3A35%3A32&baromin=29.97&tempf=61.5&humidity=90&dewptf=58.4&rainin=0&dailyrainin=0.15&winddir=273&windspeedmph=0&windgustmph=0&UV=2&solarRadiation=65.9 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+23%3A9%3A28&baromin=30.03&tempf=56.5&humidity=96&dewptf=55.4&rainin=0&dailyrainin=0&winddir=264&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+15%3A46%3A46&baromin=29.88&tempf=67.8&humidity=59&dewptf=52.7&rainin=0&dailyrainin=0&winddir=202&windspeedmph=0&windgustmph=0&UV=2&solarRadiation=90.1 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+0%3A40%3A2&baromin=29.86&tempf=57.5&humidity=89&dewptf=54.2&rainin=0&dailyrainin=0&winddir=278&windspeedmph=1.3&windgustmph=1.6&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+13%3A17%3A31&baromin=29.97&tempf=72.0&humidity=68&dewptf=60.7&rainin=0&dailyrainin=0&winddir=249&windspeedmph=2.4&windgustmph=2.4&UV=2&solarRadiation=116.6 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+2%3A25%3A29&baromin=29.92&tempf=54.0&humidity=87&dewptf=50.0&rainin=0&dailyrainin=0&winddir=280&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+23%3A21%3A44&baromin=30.03&tempf=56.4&humidity=96&dewptf=55.2&rainin=0&dailyrainin=0&winddir=268&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+2%3A42%3A17&baromin=29.90&tempf=53.5&humidity=88&dewptf=50.0&rainin=0&dailyrainin=0&winddir=279&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+10%3A23%3A43&baromin=29.92&tempf=70.0&humidity=62&dewptf=56.4&rainin=0&dailyrainin=0&winddir=319&windspeedmph=0.3&windgustmph=1.1&UV=2&solarRadiation=192.8 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+5%3A8%3A21&baromin=29.95&tempf=53.9&humidity=97&dewptf=53.0&rainin=0&dailyrainin=0&winddir=269&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=16.2 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+17%3A39%3A21&baromin=29.87&tempf=64.6&humidity=68&dewptf=53.7&rainin=0&dailyrainin=0&winddir=282&windspeedmph=0&windgustmph=0&UV=1&solarRadiation=55.0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-23+6%3A34%3A54&baromin=29.97&tempf=59.0&humidity=99&dewptf=58.7&rainin=0&dailyrainin=0&winddir=109&windspeedmph=0&windgustmph=0&UV=1&solarRadiation=52.5 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+19%3A32%3A32&baromin=29.89&tempf=63.2&humidity=80&dewptf=57.0&rainin=0&dailyrainin=0&winddir=166&windspeedmph=0.4&windgustmph=3.2&UV=0&solarRadiation=17.3 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+6%3A48%3A58&baromin=30.02&tempf=58.2&humidity=92&dewptf=55.9&rainin=0&dailyrainin=0&winddir=247&windspeedmph=1.7&windgustmph=2.4&UV=2&solarRadiation=55.9 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+8%3A38%3A54&baromin=29.98&tempf=65.0&humidity=76&dewptf=57.2&rainin=0&dailyrainin=0&winddir=17&windspeedmph=0&windgustmph=0.3&UV=3&solarRadiation=435.3 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-23+0%3A14%3A27&baromin=29.94&tempf=57.2&humidity=99&dewptf=56.7&rainin=0&dailyrainin=0&winddir=108&windspeedmph=1.1&windgustmph=1.6&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+8%3A31%3A21&baromin=29.93&tempf=64.0&humidity=78&dewptf=57.0&rainin=0&dailyrainin=0&winddir=257&windspeedmph=0.4&windgustmph=0.8&UV=2&solarRadiation=225.6 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+5%3A38%3A15&baromin=29.92&tempf=54.0&humidity=90&dewptf=51.0&rainin=0&dailyrainin=0&winddir=276&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=8.1 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-23+11%3A39%3A47&baromin=30.02&tempf=70.8&humidity=60&dewptf=56.0&rainin=0&dailyrainin=0&winddir=141&windspeedmph=1.6&windgustmph=2.4&UV=7&solarRadiation=792.7 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+7%3A51%3A18&baromin=29.92&tempf=60.5&humidity=85&dewptf=55.9&rainin=0&dailyrainin=0&winddir=207&windspeedmph=0&windgustmph=0.3&UV=1&solarRadiation=131.1 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+19%3A13%3A33&baromin=29.98&tempf=63.7&humidity=79&dewptf=57.0&rainin=0&dailyrainin=0.15&winddir=309&windspeedmph=0&windgustmph=0&UV=1&solarRadiation=17.2 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+5%3A56%3A54&baromin=30.01&tempf=56.4&humidity=96&dewptf=55.2&rainin=0&dailyrainin=0&winddir=258&windspeedmph=0&windgustmph=0&UV=1&solarRadiation=33.9 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+5%3A4%3A18&baromin=29.81&tempf=59.0&humidity=90&dewptf=55.9&rainin=0&dailyrainin=0&winddir=275&windspeedmph=0.7&windgustmph=0.7&UV=0&solarRadiation=11.3 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+20%3A11%3A29&baromin=29.92&tempf=61.0&humidity=81&dewptf=55.2&rainin=0&dailyrainin=0&winddir=288&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=3.7 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-23+14%3A9%3A10&baromin=30.04&tempf=68.9&humidity=62&dewptf=55.2&rainin=0&dailyrainin=0&winddir=101&windspeedmph=0.3&windgustmph=1.1&UV=2&solarRadiation=176.6 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+22%3A25%3A48&baromin=29.93&tempf=55.7&humidity=89&dewptf=52.5&rainin=0&dailyrainin=0&winddir=284&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+7%3A24%3A56&baromin=29.82&tempf=58.7&humidity=96&dewptf=57.5&rainin=0&dailyrainin=0.01&winddir=270&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=21.7 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+8%3A18%3A26&baromin=29.93&tempf=63.5&humidity=78&dewptf=56.4&rainin=0&dailyrainin=0&winddir=153&windspeedmph=0&windgustmph=0&UV=2&solarRadiation=190.6 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-23+14%3A11%3A55&baromin=30.04&tempf=69.0&humidity=61&dewptf=55.0&rainin=0&dailyrainin=0&winddir=109&windspeedmph=0.8&windgustmph=1.1&UV=2&solarRadiation=158.0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+18%3A54%3A21&baromin=29.90&tempf=64.9&humidity=78&dewptf=57.7&rainin=0&dailyrainin=0&winddir=263&windspeedmph=1.6&windgustmph=2.0&UV=1&solarRadiation=33.7 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-23+1%3A29%3A22&baromin=29.94&tempf=57.2&humidity=99&dewptf=57.0&rainin=0&dailyrainin=0&winddir=116&windspeedmph=0&windgustmph=1.1&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-23+1%3A38%3A55&baromin=29.94&tempf=57.2&humidity=99&dewptf=57.0&rainin=0&dailyrainin=0&winddir=116&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+10%3A4%3A22&baromin=29.85&tempf=65.0&humidity=85&dewptf=60.4&rainin=0&dailyrainin=0.01&winddir=281&windspeedmph=1.1&windgustmph=2.4&UV=3&solarRadiation=363.3 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-23+10%3A29%3A57&baromin=30.01&tempf=68.0&humidity=71&dewptf=58.0&rainin=0&dailyrainin=0&winddir=100&windspeedmph=0&windgustmph=1.1&UV=7&solarRadiation=782.0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+6%3A16%3A48&baromin=29.82&tempf=59.0&humidity=92&dewptf=56.5&rainin=0&dailyrainin=0&winddir=271&windspeedmph=0&windgustmph=0.3&UV=0&solarRadiation=7.4 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+16%3A16%3A9&baromin=29.93&tempf=70.3&humidity=69&dewptf=59.5&rainin=0&dailyrainin=0&winddir=270&windspeedmph=0.5&windgustmph=0.8&UV=2&solarRadiation=124.0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+4%3A57%3A26&baromin=29.81&tempf=59.0&humidity=90&dewptf=55.9&rainin=0&dailyrainin=0&winddir=253&windspeedmph=0.6&windgustmph=0.6&UV=0&solarRadiation=8.3 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+10%3A54%3A34&baromin=30.00&tempf=71.0&humidity=64&dewptf=58.0&rainin=0&dailyrainin=0&winddir=264&windspeedmph=1.1&windgustmph=1.1&UV=5&solarRadiation=478.0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+13%3A1%3A9&baromin=29.97&tempf=71.9&humidity=71&dewptf=61.7&rainin=0&dailyrainin=0&winddir=251&windspeedmph=0.8&windgustmph=1.6&UV=2&solarRadiation=118.1 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+16%3A59%3A13&baromin=29.87&tempf=68.3&humidity=59&dewptf=53.4&rainin=0&dailyrainin=0&winddir=22&windspeedmph=0&windgustmph=2.4&UV=1&solarRadiation=135.8 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-20+1%3A6%3A51&baromin=29.94&tempf=55.9&humidity=92&dewptf=53.5&rainin=0&dailyrainin=0&winddir=273&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+20%3A18%3A20&baromin=29.92&tempf=60.9&humidity=83&dewptf=55.7&rainin=0&dailyrainin=0&winddir=286&windspeedmph=0&windgustmph=0&UV=0&solarRadiation=2.7 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+1%3A26%3A0&baromin=30.03&tempf=55.7&humidity=96&dewptf=54.5&rainin=0&dailyrainin=0&winddir=286&windspeedmph=0&windgustmph=0.3&UV=0&solarRadiation=0 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-19+18%3A15%3A35&baromin=29.87&tempf=64.4&humidity=73&dewptf=55.4&rainin=0&dailyrainin=0&winddir=287&windspeedmph=0&windgustmph=0&UV=1&solarRadiation=35.7 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-22+10%3A26%3A11&baromin=29.85&tempf=70.6&humidity=76&dewptf=62.5&rainin=0&dailyrainin=0.01&winddir=316&windspeedmph=0.3&windgustmph=0.3&UV=6&solarRadiation=561.4 +/weatherstation/updateweatherstation.php?ID=12345&PASSWORD=12345&dateutc=2024-5-21+18%3A3%3A54&baromin=29.90&tempf=66.6&humidity=75&dewptf=58.4&rainin=0&dailyrainin=0&winddir=200&windspeedmph=0.4&windgustmph=0.8&UV=1&solarRadiation=73.6 \ No newline at end of file diff --git a/tests/test_conversion.py b/tests/test_conversion.py new file mode 100644 index 0000000..460bf27 --- /dev/null +++ b/tests/test_conversion.py @@ -0,0 +1,72 @@ +from aiocloudweather.conversion import ( + celsius_to_fahrenheit, + fahrenheit_to_celsius, + hpa_to_inhg, + in_to_mm, + inhg_to_hpa, + lux_to_wm2, + mm_to_in, + mph_to_ms, + ms_to_mph, + wm2_to_lux, +) + + +def test_fahrenheit_to_celsius(): + assert round(fahrenheit_to_celsius(32)) == 0 + assert round(fahrenheit_to_celsius(212)) == 100 + assert round(fahrenheit_to_celsius(50)) == 10 + + +def test_inhg_to_hpa(): + assert round(inhg_to_hpa(29.92), 2) == 1013.21 + assert round(inhg_to_hpa(30), 2) == 1015.92 + assert round(inhg_to_hpa(28), 2) == 948.19 + + +def test_in_to_mm(): + assert round(in_to_mm(1), 2) == 25.4 + assert round(in_to_mm(2.5), 2) == 63.5 + assert round(in_to_mm(0.5), 2) == 12.7 + + +def test_lux_to_wm2(): + assert round(lux_to_wm2(100), 2) == 0.79 + assert round(lux_to_wm2(500), 2) == 3.95 + assert round(lux_to_wm2(1000), 2) == 7.9 + + +def test_mph_to_ms(): + assert round(mph_to_ms(10), 4) == 4.4704 + assert round(mph_to_ms(30), 4) == 13.4112 + assert round(mph_to_ms(5), 4) == 2.2352 + + +def test_hpa_to_inhg(): + assert round(hpa_to_inhg(1013.25), 2) == 29.92 + assert round(hpa_to_inhg(1000), 2) == 29.53 + assert round(hpa_to_inhg(950), 2) == 28.05 + + +def test_celsius_to_fahrenheit(): + assert round(celsius_to_fahrenheit(0)) == 32 + assert round(celsius_to_fahrenheit(100)) == 212 + assert round(celsius_to_fahrenheit(10)) == 50 + + +def test_mm_to_in(): + assert round(mm_to_in(25.4), 2) == 1 + assert round(mm_to_in(63.5), 2) == 2.5 + assert round(mm_to_in(12.7), 2) == 0.5 + + +def test_wm2_to_lux(): + assert round(wm2_to_lux(1)) == 127 + assert round(wm2_to_lux(5)) == 635 + assert round(wm2_to_lux(10)) == 1270 + + +def test_ms_to_mph(): + assert round(ms_to_mph(4.4704), 4) == 10 + assert round(ms_to_mph(13.4112), 4) == 30 + assert round(ms_to_mph(2.2352), 4) == 5 diff --git a/tests/test_sensor.py b/tests/test_sensor.py new file mode 100644 index 0000000..3ca776a --- /dev/null +++ b/tests/test_sensor.py @@ -0,0 +1,67 @@ +from aiocloudweather.sensor import WeatherStation, WundergroundRawSensor, WeathercloudRawSensor + +def test_weather_station_from_wunderground(): + raw_sensor_data = WundergroundRawSensor( + station_id="12345", + station_key="12345", + barometer=29.92, + temperature=72.5, + humidity=44, + dewpoint=49.2, + rain=0, + daily_rain=0, + wind_direction=249, + wind_speed=2.0, + wind_gust_speed=2.7, + uv=2, + solar_radiation=289.2 + ) + weather_station = WeatherStation.from_wunderground(raw_sensor_data) + + assert weather_station.station_id == "12345" + assert weather_station.station_key == "12345" + assert round(weather_station.barometer.metric, 2) == 1013.21 + assert weather_station.barometer.metric_unit == "hPa" + assert weather_station.barometer.imperial == 29.92 + assert weather_station.barometer.imperial_unit == "inHg" + assert weather_station.temperature.metric == 22.5 + assert weather_station.temperature.metric_unit == "°C" + assert weather_station.temperature.imperial == 72.5 + assert weather_station.temperature.imperial_unit == "°F" + assert weather_station.humidity.metric == 44 + assert weather_station.humidity.metric_unit == "%" + assert weather_station.humidity.imperial == 44 + assert weather_station.humidity.imperial_unit == "%" + +def test_weather_station_from_weathercloud(): + raw_sensor_data = WeathercloudRawSensor( + station_id="12345", + station_key="12345", + barometer=10130, + temperature=160, + humidity=80, + dewpoint=129, + rain=0, + daily_rain=0, + wind_direction=288, + wind_speed=0, + wind_gust_speed=0, + uv=0, + solar_radiation=470 + ) + weather_station = WeatherStation.from_weathercloud(raw_sensor_data) + + assert weather_station.station_id == "12345" + assert weather_station.station_key == "12345" + assert weather_station.barometer.metric == 1013 + assert weather_station.barometer.metric_unit == "hPa" + assert round(weather_station.barometer.imperial, 2) == 29.91 + assert weather_station.barometer.imperial_unit == "inHg" + assert weather_station.temperature.metric == 16 + assert weather_station.temperature.metric_unit == "°C" + assert weather_station.temperature.imperial == 60.8 + assert weather_station.temperature.imperial_unit == "°F" + assert weather_station.humidity.metric == 80 + assert weather_station.humidity.metric_unit == "%" + assert weather_station.humidity.imperial == 80 + assert weather_station.humidity.imperial_unit == "%" \ No newline at end of file diff --git a/tests/test_server.py b/tests/test_server.py new file mode 100644 index 0000000..773b653 --- /dev/null +++ b/tests/test_server.py @@ -0,0 +1,34 @@ +import asyncio +import pytest +from aiohttp import web +from aiocloudweather.server import CloudWeatherListener + +@pytest.fixture +async def client(aiohttp_client): + app = web.Application() + listener = CloudWeatherListener() + app.router.add_get('/weatherstation/updateweatherstation.php', listener.handler) + app.router.add_get('/v01/set/{path:.*}', listener.handler) + await listener.start() + client = await aiohttp_client(app) + try: + yield client + finally: + await listener.stop() + await client.close() + +@pytest.mark.asyncio +async def test_handler(client): + data_files = ['tests/data/weathercloud', 'tests/data/wunderground'] + + async def test_request(client, request_url): + response = await client.get(request_url) + assert response.status == 200 + assert await response.text() == 'OK' + + async for c in client: + for file_path in data_files: + with open(file_path, 'r') as file: + for line in file: + request_url = line.strip() + await test_request(c, request_url) \ No newline at end of file