juham-visualcrossing 0.1.1__py3-none-any.whl → 0.1.7__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- juham_visualcrossing/__init__.py +16 -13
- juham_visualcrossing/visualcrossing.py +194 -194
- juham_visualcrossing/visualcrossing_plugin.py +18 -0
- juham_visualcrossing-0.1.7.dist-info/LICENSE.rst +22 -0
- juham_visualcrossing-0.1.7.dist-info/METADATA +24 -0
- juham_visualcrossing-0.1.7.dist-info/RECORD +10 -0
- {juham_visualcrossing-0.1.1.dist-info → juham_visualcrossing-0.1.7.dist-info}/WHEEL +1 -1
- juham_visualcrossing-0.1.7.dist-info/entry_points.txt +2 -0
- juham_visualcrossing-0.1.1.dist-info/METADATA +0 -88
- juham_visualcrossing-0.1.1.dist-info/RECORD +0 -8
- juham_visualcrossing-0.1.1.dist-info/entry_points.txt +0 -2
- {juham_visualcrossing-0.1.1.dist-info → juham_visualcrossing-0.1.7.dist-info}/top_level.txt +0 -0
juham_visualcrossing/__init__.py
CHANGED
@@ -1,13 +1,16 @@
|
|
1
|
-
"""
|
2
|
-
Description
|
3
|
-
===========
|
4
|
-
|
5
|
-
VisualCrossing weather forecast.
|
6
|
-
|
7
|
-
"""
|
8
|
-
|
9
|
-
from .visualcrossing import VisualCrossing
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
1
|
+
"""
|
2
|
+
Description
|
3
|
+
===========
|
4
|
+
|
5
|
+
VisualCrossing weather forecast.
|
6
|
+
|
7
|
+
"""
|
8
|
+
|
9
|
+
from .visualcrossing import VisualCrossing, VisualCrossingThread
|
10
|
+
from .visualcrossing_plugin import VisualCrossingPlugin
|
11
|
+
|
12
|
+
__all__ = [
|
13
|
+
"VisualCrossing",
|
14
|
+
"VisualCrossingThread",
|
15
|
+
"VisualCrossingPlugin",
|
16
|
+
]
|
@@ -1,194 +1,194 @@
|
|
1
|
-
from datetime import datetime, timedelta, timezone
|
2
|
-
import json
|
3
|
-
from
|
4
|
-
from
|
5
|
-
from masterpiece.mqtt import MqttMsg, Mqtt
|
6
|
-
from
|
7
|
-
|
8
|
-
|
9
|
-
class VisualCrossingThread(
|
10
|
-
"""Asynchronous thread for acquiring forecast from the VisualCrossing
|
11
|
-
site."""
|
12
|
-
|
13
|
-
# class attributes
|
14
|
-
_forecast_topic: str = ""
|
15
|
-
_base_url: str = ""
|
16
|
-
_api_key: str = ""
|
17
|
-
_location: str = ""
|
18
|
-
_interval: float = 12 * 3600
|
19
|
-
|
20
|
-
def __init__(self, client: Optional[Mqtt] = None):
|
21
|
-
"""Construct with the given mqtt client. Acquires data from the visual
|
22
|
-
crossing web service and publishes the forecast data to
|
23
|
-
forecast_topic.
|
24
|
-
|
25
|
-
Args:
|
26
|
-
client (object, optional): MQTT client. Defaults to None.
|
27
|
-
"""
|
28
|
-
super().__init__(client)
|
29
|
-
self.mqtt_client: Optional[Mqtt] = client
|
30
|
-
|
31
|
-
@override
|
32
|
-
def update_interval(self) -> float:
|
33
|
-
return self._interval
|
34
|
-
|
35
|
-
@override
|
36
|
-
def make_weburl(self) -> str:
|
37
|
-
if not self._api_key:
|
38
|
-
self.error("Uninitialized api_key {self.get_class_id()}: {self._api_key}")
|
39
|
-
return ""
|
40
|
-
else:
|
41
|
-
now = datetime.now()
|
42
|
-
end = now + timedelta(days=1)
|
43
|
-
start = now.strftime("%Y-%m-%d")
|
44
|
-
stop = end.strftime("%Y-%m-%d")
|
45
|
-
url = f"{self._base_url}{self._location}/{start}/{stop}?unitGroup=metric&contentType=json&include=hours&key={self._api_key}"
|
46
|
-
self.debug(url)
|
47
|
-
return url
|
48
|
-
|
49
|
-
def init(
|
50
|
-
self, topic: str, base_url: str, interval: float, api_key: str, location: str
|
51
|
-
) -> None:
|
52
|
-
"""Initialize the data acquisition thread
|
53
|
-
|
54
|
-
Args:
|
55
|
-
topic (str): mqtt topic to publish the acquired data
|
56
|
-
base_url (str): url of the web service
|
57
|
-
interval (float): update interval in seconds
|
58
|
-
api_key (str): api_key, as required by the web service
|
59
|
-
location (str): geographic location
|
60
|
-
"""
|
61
|
-
self._forecast_topic = topic
|
62
|
-
self._base_url = base_url
|
63
|
-
self._interval = interval
|
64
|
-
self._api_key = api_key
|
65
|
-
self._location = location
|
66
|
-
|
67
|
-
@override
|
68
|
-
def process_data(self, data: Any) -> None:
|
69
|
-
self.info("VisualCrossing process_data()")
|
70
|
-
data = data.json()
|
71
|
-
forecast = []
|
72
|
-
self.info(f"VisualCrossing {data}")
|
73
|
-
for day in data["days"]:
|
74
|
-
for hour in day["hours"]:
|
75
|
-
ts = int(hour["datetimeEpoch"])
|
76
|
-
forecast.append(
|
77
|
-
{
|
78
|
-
"id": "visualcrossing",
|
79
|
-
"ts": ts,
|
80
|
-
"hour": datetime.fromtimestamp(ts, tz=timezone.utc).strftime(
|
81
|
-
"%H"
|
82
|
-
),
|
83
|
-
"day": datetime.fromtimestamp(ts, tz=timezone.utc).strftime(
|
84
|
-
"%Y%m%d%H"
|
85
|
-
),
|
86
|
-
"uvindex": hour["uvindex"],
|
87
|
-
"solarradiation": hour["solarradiation"],
|
88
|
-
"solarenergy": hour["solarenergy"],
|
89
|
-
"cloudcover": hour["cloudcover"],
|
90
|
-
"snow": hour["snow"],
|
91
|
-
"snowdepth": hour["snowdepth"],
|
92
|
-
"pressure": hour["pressure"],
|
93
|
-
"temp": hour["temp"],
|
94
|
-
"humidity": hour["humidity"],
|
95
|
-
"windspeed": hour["windspeed"],
|
96
|
-
"winddir": hour["winddir"],
|
97
|
-
"dew": hour["dew"],
|
98
|
-
}
|
99
|
-
)
|
100
|
-
msg = json.dumps(forecast)
|
101
|
-
self.publish(self._forecast_topic, msg, qos=1, retain=
|
102
|
-
self.info(f"VisualCrossing forecast published to {self._forecast_topic}")
|
103
|
-
|
104
|
-
|
105
|
-
class VisualCrossing(
|
106
|
-
"""Constructs a data acquisition object for reading weather
|
107
|
-
forecasts from the VisualCrossing web service. Subscribes to the
|
108
|
-
forecast topic and writes hourly data such as solar energy, temperature,
|
109
|
-
and other attributes relevant to home automation into a time series
|
110
|
-
database.
|
111
|
-
|
112
|
-
Spawns an asynchronous thread to run queries at the specified
|
113
|
-
update_interval.
|
114
|
-
"""
|
115
|
-
|
116
|
-
workerThreadId: str = VisualCrossingThread.get_class_id()
|
117
|
-
base_url: str = (
|
118
|
-
"https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/"
|
119
|
-
)
|
120
|
-
update_interval: float = 12 * 3600
|
121
|
-
api_key: str = "SE9W7EHP775N7NDNW8ANM2MZN"
|
122
|
-
location: str = "lahti,finland"
|
123
|
-
|
124
|
-
def __init__(self, name="visualcrossing") -> None:
|
125
|
-
"""Constructs VisualCrossing automation object for acquiring and publishing
|
126
|
-
forecast data.
|
127
|
-
|
128
|
-
Args:
|
129
|
-
name (str, optional): name of the object. Defaults to "visualcrossing".
|
130
|
-
"""
|
131
|
-
super().__init__(name)
|
132
|
-
self.worker: Optional[VisualCrossingThread] = None
|
133
|
-
self.forecast_topic: str = self.make_topic_name("forecast")
|
134
|
-
self.debug(f"VisualCrossing with name {name} created")
|
135
|
-
|
136
|
-
@override
|
137
|
-
def on_connect(self, client: object, userdata: Any, flags: int, rc: int) -> None:
|
138
|
-
super().on_connect(client, userdata, flags, rc)
|
139
|
-
if rc == 0:
|
140
|
-
self.subscribe(self.forecast_topic)
|
141
|
-
self.debug(f"VisualCrossing subscribed to topic {self.forecast_topic}")
|
142
|
-
|
143
|
-
@override
|
144
|
-
def on_message(self, client: object, userdata: Any, msg: MqttMsg) -> None:
|
145
|
-
if msg.topic == self.forecast_topic:
|
146
|
-
em = json.loads(msg.payload.decode())
|
147
|
-
self.on_forecast(em)
|
148
|
-
else:
|
149
|
-
super().on_message(client, userdata, msg)
|
150
|
-
|
151
|
-
def on_forecast(self, em: dict) -> None:
|
152
|
-
"""Handle weather forecast data.
|
153
|
-
|
154
|
-
Args:
|
155
|
-
em (dict): forecast
|
156
|
-
"""
|
157
|
-
self.debug(f"VisualCrossing: got mqtt message {em}")
|
158
|
-
|
159
|
-
@override
|
160
|
-
def run(self) -> None:
|
161
|
-
# create, initialize and start the asynchronous thread for acquiring forecast
|
162
|
-
|
163
|
-
self.worker = cast(
|
164
|
-
VisualCrossingThread, self.instantiate(VisualCrossing.workerThreadId)
|
165
|
-
)
|
166
|
-
self.worker.init(
|
167
|
-
self.forecast_topic,
|
168
|
-
self.base_url,
|
169
|
-
self.update_interval,
|
170
|
-
self.api_key,
|
171
|
-
self.location,
|
172
|
-
)
|
173
|
-
self.debug(
|
174
|
-
f"VisualCrossing run: {self.base_url}, {self.update_interval}s, location is {self.location}"
|
175
|
-
)
|
176
|
-
super().run()
|
177
|
-
|
178
|
-
@override
|
179
|
-
def to_dict(self) -> dict:
|
180
|
-
data = super().to_dict()
|
181
|
-
data["_visualcrossing"] = {
|
182
|
-
"topic": self.forecast_topic,
|
183
|
-
"url": self.base_url,
|
184
|
-
"api_key": self.api_key,
|
185
|
-
"interval": self.update_interval,
|
186
|
-
}
|
187
|
-
return data
|
188
|
-
|
189
|
-
@override
|
190
|
-
def from_dict(self, data) -> None:
|
191
|
-
super().from_dict(data)
|
192
|
-
if "_visualcrossing" in data:
|
193
|
-
for key, value in data["_visualcrossing"].items():
|
194
|
-
setattr(self, key, value)
|
1
|
+
from datetime import datetime, timedelta, timezone
|
2
|
+
import json
|
3
|
+
from typing_extensions import override
|
4
|
+
from typing import Any, Optional, cast
|
5
|
+
from masterpiece.mqtt import MqttMsg, Mqtt
|
6
|
+
from juham_core import JuhamThread, JuhamCloudThread
|
7
|
+
|
8
|
+
|
9
|
+
class VisualCrossingThread(JuhamCloudThread):
|
10
|
+
"""Asynchronous thread for acquiring forecast from the VisualCrossing
|
11
|
+
site."""
|
12
|
+
|
13
|
+
# class attributes
|
14
|
+
_forecast_topic: str = ""
|
15
|
+
_base_url: str = ""
|
16
|
+
_api_key: str = ""
|
17
|
+
_location: str = ""
|
18
|
+
_interval: float = 12 * 3600
|
19
|
+
|
20
|
+
def __init__(self, client: Optional[Mqtt] = None):
|
21
|
+
"""Construct with the given mqtt client. Acquires data from the visual
|
22
|
+
crossing web service and publishes the forecast data to
|
23
|
+
forecast_topic.
|
24
|
+
|
25
|
+
Args:
|
26
|
+
client (object, optional): MQTT client. Defaults to None.
|
27
|
+
"""
|
28
|
+
super().__init__(client)
|
29
|
+
self.mqtt_client: Optional[Mqtt] = client
|
30
|
+
|
31
|
+
@override
|
32
|
+
def update_interval(self) -> float:
|
33
|
+
return self._interval
|
34
|
+
|
35
|
+
@override
|
36
|
+
def make_weburl(self) -> str:
|
37
|
+
if not self._api_key:
|
38
|
+
self.error("Uninitialized api_key {self.get_class_id()}: {self._api_key}")
|
39
|
+
return ""
|
40
|
+
else:
|
41
|
+
now = datetime.now()
|
42
|
+
end = now + timedelta(days=1)
|
43
|
+
start = now.strftime("%Y-%m-%d")
|
44
|
+
stop = end.strftime("%Y-%m-%d")
|
45
|
+
url = f"{self._base_url}{self._location}/{start}/{stop}?unitGroup=metric&contentType=json&include=hours&key={self._api_key}"
|
46
|
+
# self.debug(url)
|
47
|
+
return url
|
48
|
+
|
49
|
+
def init(
|
50
|
+
self, topic: str, base_url: str, interval: float, api_key: str, location: str
|
51
|
+
) -> None:
|
52
|
+
"""Initialize the data acquisition thread
|
53
|
+
|
54
|
+
Args:
|
55
|
+
topic (str): mqtt topic to publish the acquired data
|
56
|
+
base_url (str): url of the web service
|
57
|
+
interval (float): update interval in seconds
|
58
|
+
api_key (str): api_key, as required by the web service
|
59
|
+
location (str): geographic location
|
60
|
+
"""
|
61
|
+
self._forecast_topic = topic
|
62
|
+
self._base_url = base_url
|
63
|
+
self._interval = interval
|
64
|
+
self._api_key = api_key
|
65
|
+
self._location = location
|
66
|
+
|
67
|
+
@override
|
68
|
+
def process_data(self, data: Any) -> None:
|
69
|
+
self.info("VisualCrossing process_data()")
|
70
|
+
data = data.json()
|
71
|
+
forecast = []
|
72
|
+
self.info(f"VisualCrossing {data}")
|
73
|
+
for day in data["days"]:
|
74
|
+
for hour in day["hours"]:
|
75
|
+
ts = int(hour["datetimeEpoch"])
|
76
|
+
forecast.append(
|
77
|
+
{
|
78
|
+
"id": "visualcrossing",
|
79
|
+
"ts": ts,
|
80
|
+
"hour": datetime.fromtimestamp(ts, tz=timezone.utc).strftime(
|
81
|
+
"%H"
|
82
|
+
),
|
83
|
+
"day": datetime.fromtimestamp(ts, tz=timezone.utc).strftime(
|
84
|
+
"%Y%m%d%H"
|
85
|
+
),
|
86
|
+
"uvindex": hour["uvindex"],
|
87
|
+
"solarradiation": hour["solarradiation"],
|
88
|
+
"solarenergy": hour["solarenergy"],
|
89
|
+
"cloudcover": hour["cloudcover"],
|
90
|
+
"snow": hour["snow"],
|
91
|
+
"snowdepth": hour["snowdepth"],
|
92
|
+
"pressure": hour["pressure"],
|
93
|
+
"temp": hour["temp"],
|
94
|
+
"humidity": hour["humidity"],
|
95
|
+
"windspeed": hour["windspeed"],
|
96
|
+
"winddir": hour["winddir"],
|
97
|
+
"dew": hour["dew"],
|
98
|
+
}
|
99
|
+
)
|
100
|
+
msg = json.dumps(forecast)
|
101
|
+
self.publish(self._forecast_topic, msg, qos=1, retain=True)
|
102
|
+
self.info(f"VisualCrossing forecast published to {self._forecast_topic}")
|
103
|
+
|
104
|
+
|
105
|
+
class VisualCrossing(JuhamThread):
|
106
|
+
"""Constructs a data acquisition object for reading weather
|
107
|
+
forecasts from the VisualCrossing web service. Subscribes to the
|
108
|
+
forecast topic and writes hourly data such as solar energy, temperature,
|
109
|
+
and other attributes relevant to home automation into a time series
|
110
|
+
database.
|
111
|
+
|
112
|
+
Spawns an asynchronous thread to run queries at the specified
|
113
|
+
update_interval.
|
114
|
+
"""
|
115
|
+
|
116
|
+
workerThreadId: str = VisualCrossingThread.get_class_id()
|
117
|
+
base_url: str = (
|
118
|
+
"https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/"
|
119
|
+
)
|
120
|
+
update_interval: float = 12 * 3600
|
121
|
+
api_key: str = "SE9W7EHP775N7NDNW8ANM2MZN"
|
122
|
+
location: str = "lahti,finland"
|
123
|
+
|
124
|
+
def __init__(self, name="visualcrossing") -> None:
|
125
|
+
"""Constructs VisualCrossing automation object for acquiring and publishing
|
126
|
+
forecast data.
|
127
|
+
|
128
|
+
Args:
|
129
|
+
name (str, optional): name of the object. Defaults to "visualcrossing".
|
130
|
+
"""
|
131
|
+
super().__init__(name)
|
132
|
+
self.worker: Optional[VisualCrossingThread] = None
|
133
|
+
self.forecast_topic: str = self.make_topic_name("forecast")
|
134
|
+
self.debug(f"VisualCrossing with name {name} created")
|
135
|
+
|
136
|
+
@override
|
137
|
+
def on_connect(self, client: object, userdata: Any, flags: int, rc: int) -> None:
|
138
|
+
super().on_connect(client, userdata, flags, rc)
|
139
|
+
if rc == 0:
|
140
|
+
self.subscribe(self.forecast_topic)
|
141
|
+
self.debug(f"VisualCrossing subscribed to topic {self.forecast_topic}")
|
142
|
+
|
143
|
+
@override
|
144
|
+
def on_message(self, client: object, userdata: Any, msg: MqttMsg) -> None:
|
145
|
+
if msg.topic == self.forecast_topic:
|
146
|
+
em = json.loads(msg.payload.decode())
|
147
|
+
self.on_forecast(em)
|
148
|
+
else:
|
149
|
+
super().on_message(client, userdata, msg)
|
150
|
+
|
151
|
+
def on_forecast(self, em: dict) -> None:
|
152
|
+
"""Handle weather forecast data.
|
153
|
+
|
154
|
+
Args:
|
155
|
+
em (dict): forecast
|
156
|
+
"""
|
157
|
+
# self.debug(f"VisualCrossing: got mqtt message {em}")
|
158
|
+
|
159
|
+
@override
|
160
|
+
def run(self) -> None:
|
161
|
+
# create, initialize and start the asynchronous thread for acquiring forecast
|
162
|
+
|
163
|
+
self.worker = cast(
|
164
|
+
VisualCrossingThread, self.instantiate(VisualCrossing.workerThreadId)
|
165
|
+
)
|
166
|
+
self.worker.init(
|
167
|
+
self.forecast_topic,
|
168
|
+
self.base_url,
|
169
|
+
self.update_interval,
|
170
|
+
self.api_key,
|
171
|
+
self.location,
|
172
|
+
)
|
173
|
+
self.debug(
|
174
|
+
f"VisualCrossing run: {self.base_url}, {self.update_interval}s, location is {self.location}"
|
175
|
+
)
|
176
|
+
super().run()
|
177
|
+
|
178
|
+
@override
|
179
|
+
def to_dict(self) -> dict:
|
180
|
+
data = super().to_dict()
|
181
|
+
data["_visualcrossing"] = {
|
182
|
+
"topic": self.forecast_topic,
|
183
|
+
"url": self.base_url,
|
184
|
+
"api_key": self.api_key,
|
185
|
+
"interval": self.update_interval,
|
186
|
+
}
|
187
|
+
return data
|
188
|
+
|
189
|
+
@override
|
190
|
+
def from_dict(self, data) -> None:
|
191
|
+
super().from_dict(data)
|
192
|
+
if "_visualcrossing" in data:
|
193
|
+
for key, value in data["_visualcrossing"].items():
|
194
|
+
setattr(self, key, value)
|
@@ -0,0 +1,18 @@
|
|
1
|
+
from ast import Str
|
2
|
+
from typing_extensions import override
|
3
|
+
from masterpiece import Plugin, Composite
|
4
|
+
from .visualcrossing import VisualCrossing
|
5
|
+
|
6
|
+
|
7
|
+
class VisualCrossingPlugin(Plugin):
|
8
|
+
"""Plugin class, for installing a visualcrossing specific features into the host application."""
|
9
|
+
|
10
|
+
def __init__(self, name: str = "visual_crossing") -> None:
|
11
|
+
"""Create visualcrossing weather service."""
|
12
|
+
super().__init__(name)
|
13
|
+
|
14
|
+
@override
|
15
|
+
def install(self, app: Composite) -> None:
|
16
|
+
# Create and insert a VisualCrossing classes into the host application.
|
17
|
+
obj = VisualCrossing()
|
18
|
+
app.add(obj)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
MIT License
|
2
|
+
===========
|
3
|
+
|
4
|
+
Copyright (c) 2024, Juha Meskanen
|
5
|
+
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
8
|
+
in the Software without restriction, including without limitation the rights
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
11
|
+
furnished to do so, subject to the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
14
|
+
copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Metadata-Version: 2.2
|
2
|
+
Name: juham-visualcrossing
|
3
|
+
Version: 0.1.7
|
4
|
+
Summary: A Weather forecast plugin extending `Juham` applications
|
5
|
+
Author-email: J Meskanen <juham.api@gmail.com>
|
6
|
+
Maintainer-email: "J. Meskanen" <juham.api@gmail.com>
|
7
|
+
Project-URL: Homepage, https://meskanen.com
|
8
|
+
Project-URL: Bug Reports, https://meskanen.com
|
9
|
+
Project-URL: Funding, https://meskanen.com
|
10
|
+
Project-URL: Say Thanks!, http://meskanen.com
|
11
|
+
Project-URL: Source, https://meskanen.com
|
12
|
+
Keywords: object-oriented,plugin,framework
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
14
|
+
Classifier: Intended Audience :: Developers
|
15
|
+
Classifier: Topic :: Software Development
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
18
|
+
Requires-Python: >=3.8
|
19
|
+
Description-Content-Type: text/x-rst
|
20
|
+
License-File: LICENSE.rst
|
21
|
+
Requires-Dist: juham-automation>=0.0.7
|
22
|
+
Requires-Dist: pytz>=2024.1
|
23
|
+
Provides-Extra: dev
|
24
|
+
Requires-Dist: check-manifest; extra == "dev"
|
@@ -0,0 +1,10 @@
|
|
1
|
+
juham_visualcrossing/__init__.py,sha256=7Xv5LN6-LEd9cpYZBrQqQshEScEkoMyWrTcZE9IkE8o,282
|
2
|
+
juham_visualcrossing/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
3
|
+
juham_visualcrossing/visualcrossing.py,sha256=N0z3UZAlelHXXg0z9OFMvkWQO6pgZBGPmS7AU_ZTxrc,7017
|
4
|
+
juham_visualcrossing/visualcrossing_plugin.py,sha256=Qj9On-gcobpErjBJ4jEvSnAAaQor7sbPCUFq-XxIalA,625
|
5
|
+
juham_visualcrossing-0.1.7.dist-info/LICENSE.rst,sha256=xCUTZIYDotncT_ibKn8nNVkUGiK05hJyOWypG8G7Evk,1074
|
6
|
+
juham_visualcrossing-0.1.7.dist-info/METADATA,sha256=KkKLoCM8Qoa2TbKE011uOmrr_ixFXKgOaej3hpMo10c,947
|
7
|
+
juham_visualcrossing-0.1.7.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
8
|
+
juham_visualcrossing-0.1.7.dist-info/entry_points.txt,sha256=BMRgZy0x03nSQfh37apI68H1nlgU0bGsvkV6LrnF1eI,82
|
9
|
+
juham_visualcrossing-0.1.7.dist-info/top_level.txt,sha256=7yWaUHZo-Ng96VJBzUFhaFCBamL71PUjIxZISxMBjSM,21
|
10
|
+
juham_visualcrossing-0.1.7.dist-info/RECORD,,
|
@@ -1,88 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: juham_visualcrossing
|
3
|
-
Version: 0.1.1
|
4
|
-
Summary: A Weather forecast plugin extending `Juham` applications
|
5
|
-
Author-email: J Meskanen <juham.api@gmail.com>
|
6
|
-
Maintainer-email: "J. Meskanen" <juham.api@gmail.com>
|
7
|
-
License: MIT License
|
8
|
-
===========
|
9
|
-
|
10
|
-
Copyright (c) 2024, Juha Meskanen
|
11
|
-
|
12
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
13
|
-
of this software and associated documentation files (the "Software"), to deal
|
14
|
-
in the Software without restriction, including without limitation the rights
|
15
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
16
|
-
copies of the Software, and to permit persons to whom the Software is
|
17
|
-
furnished to do so, subject to the following conditions:
|
18
|
-
|
19
|
-
The above copyright notice and this permission notice shall be included in all
|
20
|
-
copies or substantial portions of the Software.
|
21
|
-
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
23
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
24
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
25
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
26
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
27
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
28
|
-
|
29
|
-
|
30
|
-
Project-URL: Homepage, https://meskanen.com
|
31
|
-
Project-URL: Bug Reports, https://meskanen.com
|
32
|
-
Project-URL: Funding, https://meskanen.com
|
33
|
-
Project-URL: Say Thanks!, http://meskanen.com
|
34
|
-
Project-URL: Source, https://meskanen.com
|
35
|
-
Keywords: object-oriented,plugin,framework
|
36
|
-
Classifier: Development Status :: 2 - Pre-Alpha
|
37
|
-
Classifier: Intended Audience :: Developers
|
38
|
-
Classifier: Topic :: Software Development
|
39
|
-
Classifier: License :: OSI Approved :: MIT License
|
40
|
-
Classifier: Programming Language :: Python :: 3.8
|
41
|
-
Requires-Python: >=3.8
|
42
|
-
Description-Content-Type: text/markdown
|
43
|
-
Requires-Dist: juham>=0.0.17
|
44
|
-
Requires-Dist: pytz>=2024.1
|
45
|
-
Requires-Dist: importlib-metadata
|
46
|
-
Provides-Extra: dev
|
47
|
-
Requires-Dist: check-manifest; extra == "dev"
|
48
|
-
|
49
|
-
juham_visualcrossing
|
50
|
-
====================
|
51
|
-
|
52
|
-
`juham_visualcrossing` plugs VisualCrossing weather forecast service to Juham - Juha's Ultimate
|
53
|
-
Home Automation Masterpiece application.
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
Features
|
58
|
-
--------
|
59
|
-
|
60
|
-
The main purpose is to acquire solar energy forecast, for optimizing energy management in
|
61
|
-
homes with solar panels.
|
62
|
-
|
63
|
-
|
64
|
-
Installation
|
65
|
-
------------
|
66
|
-
|
67
|
-
The installation is two stage process
|
68
|
-
|
69
|
-
1. To install:
|
70
|
-
|
71
|
-
.. code-block:: python
|
72
|
-
|
73
|
-
pip install juham_visualcrossing
|
74
|
-
|
75
|
-
|
76
|
-
2. Configure
|
77
|
-
|
78
|
-
VisualCrossing requires you to register and obtain web key, through which you can
|
79
|
-
access their forecast services. So sign in to visualcrossing.com to obtain the key,
|
80
|
-
and then add the web key to the '~/.[app]/config/VisualCrossing.json' configuration
|
81
|
-
file.
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
License
|
86
|
-
-------
|
87
|
-
|
88
|
-
This project is licensed under the MIT License - see the `LICENSE` file for details.
|
@@ -1,8 +0,0 @@
|
|
1
|
-
juham_visualcrossing/__init__.py,sha256=qsVRSTeJW8jgBtLviUjq5JiJ8Z6eYkBQn6zMWgS0okY,161
|
2
|
-
juham_visualcrossing/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
3
|
-
juham_visualcrossing/visualcrossing.py,sha256=yv0SlqAliI97Y10J720KAZpGnE6I8vkdGjzna1pgVg4,7190
|
4
|
-
juham_visualcrossing-0.1.1.dist-info/METADATA,sha256=d7r85HPtikXDKnixH2PsTJE6kFCv1XLrMdTZ2u8mRDQ,3153
|
5
|
-
juham_visualcrossing-0.1.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
6
|
-
juham_visualcrossing-0.1.1.dist-info/entry_points.txt,sha256=A-NSi2RN5KSKwpbKG592v5qnWnGHmIjPktubd5PQ80M,76
|
7
|
-
juham_visualcrossing-0.1.1.dist-info/top_level.txt,sha256=7yWaUHZo-Ng96VJBzUFhaFCBamL71PUjIxZISxMBjSM,21
|
8
|
-
juham_visualcrossing-0.1.1.dist-info/RECORD,,
|
File without changes
|