livisi 0.0.25__py3-none-any.whl → 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
livisi/aiolivisi.py DELETED
@@ -1,270 +0,0 @@
1
- """Code to handle the communication with Livisi Smart home controllers."""
2
- from __future__ import annotations
3
- from typing import Any
4
- import uuid
5
-
6
- from aiohttp.client import ClientSession
7
-
8
- from .errors import (
9
- IncorrectIpAddressException,
10
- ShcUnreachableException,
11
- WrongCredentialException,
12
- TokenExpiredException,
13
- )
14
-
15
- from .const import (
16
- AUTH_GRANT_TYPE,
17
- AUTH_PASSWORD,
18
- AUTH_USERNAME,
19
- AUTHENTICATION_HEADERS,
20
- CLASSIC_PORT,
21
- LOCATION,
22
- CAPABILITY_MAP,
23
- CAPABILITY_CONFIG,
24
- REQUEST_TIMEOUT,
25
- USERNAME,
26
- )
27
-
28
- ERRORS = {1: Exception}
29
-
30
-
31
- class AioLivisi:
32
- """Handles the communication with the Livisi Smart Home controller."""
33
-
34
- instance = None
35
-
36
- def __init__(
37
- self, web_session: ClientSession = None, auth_headers: dict[str, Any] = None
38
- ) -> None:
39
- self._web_session: ClientSession = web_session
40
- self._auth_headers: dict[str, Any] = auth_headers
41
- self._token: str = ""
42
- self._livisi_connection_data: dict[str, str] = None
43
-
44
- async def async_set_token(
45
- self, livisi_connection_data: dict[str, str] = None
46
- ) -> None:
47
- """Set the JWT from the LIVISI Smart Home Controller."""
48
- access_data: dict = {}
49
- try:
50
- if self._livisi_connection_data is not None:
51
- self._livisi_connection_data = livisi_connection_data
52
- access_data = await self.async_get_jwt_token(livisi_connection_data)
53
- self.token = access_data["access_token"]
54
- self._auth_headers = {
55
- "authorization": f"Bearer {self.token}",
56
- "Content-type": "application/json",
57
- "Accept": "*/*",
58
- }
59
- except Exception as error:
60
- if len(access_data) == 0:
61
- raise IncorrectIpAddressException from error
62
- elif access_data["errorcode"] == 2009:
63
- raise WrongCredentialException from error
64
- else:
65
- raise ShcUnreachableException from error
66
-
67
- async def async_send_authorized_request(
68
- self,
69
- method,
70
- url: str,
71
- payload=None,
72
- ) -> dict:
73
- """Make a request to the Livisi Smart Home controller."""
74
- ip_address = self._livisi_connection_data["ip_address"]
75
- path = f"http://{ip_address}:{CLASSIC_PORT}/{url}"
76
- return await self.async_send_request(method, path, payload, self._auth_headers)
77
-
78
- async def async_send_unauthorized_request(
79
- self,
80
- method,
81
- url: str,
82
- headers,
83
- payload=None,
84
- ) -> dict:
85
- """Send a request without JWT token."""
86
- return await self.async_send_request(method, url, payload, headers)
87
-
88
- async def async_get_jwt_token(self, livisi_connection_data: dict[str, str]):
89
- """Send a request for getting the JWT token."""
90
- login_credentials = {
91
- AUTH_USERNAME: USERNAME,
92
- AUTH_PASSWORD: livisi_connection_data["password"],
93
- AUTH_GRANT_TYPE: "password",
94
- }
95
- headers = AUTHENTICATION_HEADERS
96
- self._livisi_connection_data = livisi_connection_data
97
- ip_address = self._livisi_connection_data["ip_address"]
98
- return await self.async_send_request(
99
- "post",
100
- url=f"http://{ip_address}:{CLASSIC_PORT}/auth/token",
101
- payload=login_credentials,
102
- headers=headers,
103
- )
104
-
105
- async def async_send_request(
106
- self, method, url: str, payload=None, headers=None
107
- ) -> dict:
108
- """Send a request to the Livisi Smart Home controller."""
109
- try:
110
- response = await self.__async_send_request(method, url, payload, headers)
111
- except Exception:
112
- response = await self.__async_send_request(method, url, payload, headers)
113
- if "errorcode" in response:
114
- if response["errorcode"] == 2007:
115
- raise TokenExpiredException
116
- return response
117
-
118
- async def __async_send_request(
119
- self, method, url: str, payload=None, headers=None
120
- ) -> dict:
121
- async with self._web_session.request(
122
- method,
123
- url,
124
- json=payload,
125
- headers=headers,
126
- ssl=False,
127
- timeout=REQUEST_TIMEOUT,
128
- ) as res:
129
- data = await res.json()
130
- return data
131
-
132
- async def async_get_controller(self) -> dict[str, Any]:
133
- """Get Livisi Smart Home controller data."""
134
- return await self.async_get_controller_status()
135
-
136
- async def async_get_controller_status(self) -> dict[str, Any]:
137
- """Get Livisi Smart Home controller status."""
138
- shc_info = await self.async_send_authorized_request("get", url="status")
139
- return shc_info
140
-
141
- async def async_get_devices(
142
- self,
143
- ) -> list[dict[str, Any]]:
144
- """Send a request for getting the devices."""
145
- devices = await self.async_send_authorized_request("get", url="device")
146
- capabilities = await self.async_send_authorized_request("get", url="capability")
147
-
148
- capability_map = {}
149
- capability_config = {}
150
-
151
- for capability in capabilities:
152
- if "device" in capability:
153
- device_id = capability["device"].split("/")[-1]
154
- if device_id not in capability_map:
155
- capability_map[device_id] = {}
156
- capability_config[device_id] = {}
157
- capability_map[device_id][capability["type"]] = (
158
- "/capability/" + capability["id"]
159
- )
160
- if "config" in capability:
161
- capability_config[device_id][capability["type"]] = capability["config"]
162
-
163
- for device in devices:
164
- device_id = device["id"]
165
- device[CAPABILITY_MAP] = capability_map.get(device_id, {})
166
- device[CAPABILITY_CONFIG] = capability_config.get(device_id, {})
167
-
168
- for device in devices.copy():
169
- if LOCATION in device and device.get(LOCATION) is not None:
170
- device[LOCATION] = device[LOCATION].removeprefix("/location/")
171
- return devices
172
-
173
- async def async_get_device_state(self, capability) -> dict[str, Any] | None:
174
- """Get the state of the device."""
175
- url = f"{capability}/state"
176
- try:
177
- return await self.async_send_authorized_request("get", url)
178
- except Exception:
179
- return None
180
-
181
- async def async_pss_set_state(self, capability_id, is_on: bool) -> dict[str, Any]:
182
- """Set the PSS state."""
183
- set_state_payload: dict[str, Any] = {
184
- "id": uuid.uuid4().hex,
185
- "type": "SetState",
186
- "namespace": "core.RWE",
187
- "target": capability_id,
188
- "params": {"onState": {"type": "Constant", "value": is_on}},
189
- }
190
- return await self.async_send_authorized_request(
191
- "post", "action", payload=set_state_payload
192
- )
193
-
194
- async def async_set_onstate(self, capability_id, is_on: bool) -> dict[str, Any]:
195
- """Set the onState for devices that support it."""
196
- set_state_payload: dict[str, Any] = {
197
- "id": uuid.uuid4().hex,
198
- "type": "SetState",
199
- "namespace": "core.RWE",
200
- "target": capability_id,
201
- "params": {"onState": {"type": "Constant", "value": is_on}},
202
- }
203
- return await self.async_send_authorized_request(
204
- "post", "action", payload=set_state_payload
205
- )
206
-
207
- async def async_variable_set_value(
208
- self, capability_id, value: bool
209
- ) -> dict[str, Any]:
210
- """Set the boolean variable state."""
211
- set_value_payload: dict[str, Any] = {
212
- "id": uuid.uuid4().hex,
213
- "type": "SetState",
214
- "namespace": "core.RWE",
215
- "target": capability_id,
216
- "params": {"value": {"type": "Constant", "value": value}},
217
- }
218
- return await self.async_send_authorized_request(
219
- "post", "action", payload=set_value_payload
220
- )
221
-
222
- async def async_vrcc_set_temperature(
223
- self, capability_id, target_temperature: float, is_avatar: bool
224
- ) -> dict[str, Any]:
225
- """Set the Virtual Climate Control state."""
226
- if is_avatar:
227
- params = "setpointTemperature"
228
- else:
229
- params = "pointTemperature"
230
- set_state_payload: dict[str, Any] = {
231
- "id": uuid.uuid4().hex,
232
- "type": "SetState",
233
- "namespace": "core.RWE",
234
- "target": capability_id,
235
- "params": {params: {"type": "Constant", "value": target_temperature}},
236
- }
237
- return await self.async_send_authorized_request(
238
- "post", "action", payload=set_state_payload
239
- )
240
-
241
- async def async_get_all_rooms(self) -> dict[str, Any]:
242
- """Get all the rooms from LIVISI configuration."""
243
- return await self.async_send_authorized_request("get", "location")
244
-
245
- @property
246
- def livisi_connection_data(self):
247
- """Return the connection data."""
248
- return self._livisi_connection_data
249
-
250
- @livisi_connection_data.setter
251
- def livisi_connection_data(self, new_value):
252
- self._livisi_connection_data = new_value
253
-
254
- @property
255
- def token(self):
256
- """Return the token."""
257
- return self._token
258
-
259
- @token.setter
260
- def token(self, new_value):
261
- self._token = new_value
262
-
263
- @property
264
- def web_session(self):
265
- """Return the web session."""
266
- return self._web_session
267
-
268
- @web_session.setter
269
- def web_session(self, new_value):
270
- self._web_session = new_value
livisi/const.py DELETED
@@ -1,40 +0,0 @@
1
- from typing import Final
2
-
3
-
4
- CLASSIC_PORT: Final = 8080
5
- AVATAR_PORT: Final = 9090
6
- USERNAME: Final = "admin"
7
- AUTH_USERNAME: Final = "username"
8
- AUTH_PASSWORD: Final = "password"
9
- AUTH_GRANT_TYPE: Final = "grant_type"
10
- REQUEST_TIMEOUT: Final = 2000
11
-
12
- ON_STATE: Final = "onState"
13
- VALUE: Final = "value"
14
- POINT_TEMPERATURE: Final = "pointTemperature"
15
- SET_POINT_TEMPERATURE: Final = "setpointTemperature"
16
- TEMPERATURE: Final = "temperature"
17
- HUMIDITY: Final = "humidity"
18
- LUMINANCE: Final = "luminance"
19
- IS_REACHABLE: Final = "isReachable"
20
- IS_OPEN: Final = "isOpen"
21
- LOCATION: Final = "location"
22
-
23
- KEY_INDEX: Final = "index"
24
- KEY_PRESS_TYPE: Final = "type"
25
- KEY_PRESS_SHORT: Final = "ShortPress"
26
- KEY_PRESS_LONG: Final = "LongPress"
27
-
28
-
29
- CAPABILITY_MAP: Final = "capabilityMap"
30
- CAPABILITY_CONFIG: Final = "capabilityConfig"
31
-
32
- EVENT_STATE_CHANGED = "StateChanged"
33
- EVENT_BUTTON_PRESSED = "ButtonPressed"
34
- EVENT_MOTION_DETECTED = "MotionDetected"
35
-
36
- AUTHENTICATION_HEADERS: Final = {
37
- "Authorization": "Basic Y2xpZW50SWQ6Y2xpZW50UGFzcw==",
38
- "Content-type": "application/json",
39
- "Accept": "application/json",
40
- }
livisi/errors.py DELETED
@@ -1,20 +0,0 @@
1
- """Errors for the Livisi Smart Home component."""
2
-
3
- class LivisiException(Exception):
4
- """Base class for Livisi exceptions."""
5
-
6
-
7
- class ShcUnreachableException(LivisiException):
8
- """Unable to connect to the Smart Home Controller."""
9
-
10
-
11
- class WrongCredentialException(LivisiException):
12
- """The user credentials were wrong."""
13
-
14
-
15
- class IncorrectIpAddressException(LivisiException):
16
- """The IP address provided by the user is incorrect."""
17
-
18
-
19
- class TokenExpiredException(LivisiException):
20
- """The authentication token is expired."""
livisi/websocket.py DELETED
@@ -1,113 +0,0 @@
1
- """Code for communication with the Livisi application websocket."""
2
- from typing import Callable
3
- import urllib.parse
4
-
5
- import websockets
6
- import json
7
- from dataclasses import fields
8
-
9
- from livisi.livisi_event import LivisiEvent
10
-
11
- from livisi import AioLivisi
12
- from .const import (
13
- AVATAR_PORT,
14
- IS_REACHABLE,
15
- ON_STATE,
16
- VALUE,
17
- IS_OPEN,
18
- SET_POINT_TEMPERATURE,
19
- POINT_TEMPERATURE,
20
- HUMIDITY,
21
- TEMPERATURE,
22
- LUMINANCE,
23
- KEY_INDEX,
24
- KEY_PRESS_LONG,
25
- KEY_PRESS_TYPE,
26
- EVENT_BUTTON_PRESSED,
27
- EVENT_STATE_CHANGED,
28
- )
29
-
30
-
31
- class Websocket:
32
- """Represents the websocket class."""
33
-
34
- def __init__(self, livisi: AioLivisi) -> None:
35
- """Initialize the websocket."""
36
- self.livisi = livisi
37
- self.connection_url: str = None
38
-
39
- async def connect(self, on_data, on_close, port: int) -> None:
40
- """Connect to the socket."""
41
- if port == AVATAR_PORT:
42
- token = urllib.parse.quote(self.livisi.token)
43
- else:
44
- token = self.livisi.token
45
- ip_address = self.livisi.livisi_connection_data["ip_address"]
46
- self.connection_url = f"ws://{ip_address}:{port}/events?token={token}"
47
- try:
48
- async with websockets.connect(
49
- self.connection_url, ping_interval=10, ping_timeout=10
50
- ) as websocket:
51
- try:
52
- self._websocket = websocket
53
- await self.consumer_handler(websocket, on_data)
54
- except Exception:
55
- await on_close()
56
- return
57
- except Exception:
58
- await on_close()
59
- return
60
-
61
- async def disconnect(self) -> None:
62
- """Close the websocket."""
63
- await self._websocket.close(code=1000, reason="Handle disconnect request")
64
-
65
- async def consumer_handler(self, websocket, on_data: Callable):
66
- """Used when data is transmited using the websocket."""
67
- async for message in websocket:
68
- try:
69
- parsed_json = json.loads(message)
70
- # Only include keys that are fields in the LivisiEvent dataclass
71
- event_data_dict = {
72
- f.name: parsed_json.get(f.name)
73
- for f in fields(LivisiEvent)
74
- }
75
- event_data = LivisiEvent(**event_data_dict)
76
- except json.JSONDecodeError:
77
- continue
78
- if event_data.properties is None:
79
- continue
80
-
81
- if "device" in event_data.source:
82
- event_data.source = event_data.source.replace("/device/", "")
83
-
84
- if event_data.type == EVENT_STATE_CHANGED:
85
- if ON_STATE in event_data.properties.keys():
86
- event_data.onState = event_data.properties.get(ON_STATE)
87
- elif VALUE in event_data.properties.keys() and isinstance(
88
- event_data.properties.get(VALUE), bool
89
- ):
90
- event_data.onState = event_data.properties.get(VALUE)
91
- if SET_POINT_TEMPERATURE in event_data.properties.keys():
92
- event_data.vrccData = event_data.properties.get(
93
- SET_POINT_TEMPERATURE
94
- )
95
- elif POINT_TEMPERATURE in event_data.properties.keys():
96
- event_data.vrccData = event_data.properties.get(POINT_TEMPERATURE)
97
- elif TEMPERATURE in event_data.properties.keys():
98
- event_data.vrccData = event_data.properties.get(TEMPERATURE)
99
- elif HUMIDITY in event_data.properties.keys():
100
- event_data.vrccData = event_data.properties.get(HUMIDITY)
101
- if LUMINANCE in event_data.properties.keys():
102
- event_data.luminance = event_data.properties.get(LUMINANCE)
103
- if IS_REACHABLE in event_data.properties.keys():
104
- event_data.isReachable = event_data.properties.get(IS_REACHABLE)
105
- if IS_OPEN in event_data.properties.keys():
106
- event_data.isOpen = event_data.properties.get(IS_OPEN)
107
- elif event_data.type == EVENT_BUTTON_PRESSED:
108
- if KEY_INDEX in event_data.properties.keys():
109
- event_data.keyIndex = event_data.properties.get(KEY_INDEX)
110
- event_data.isLongKeyPress = (
111
- KEY_PRESS_LONG == event_data.properties.get(KEY_PRESS_TYPE)
112
- )
113
- on_data(event_data)
@@ -1,201 +0,0 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[]"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright [yyyy] [name of copyright owner]
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
@@ -1,24 +0,0 @@
1
- Metadata-Version: 2.2
2
- Name: livisi
3
- Version: 0.0.25
4
- Summary: Connection library for the abandoned Livisi Smart Home system
5
- Author-email: Stefan Iacob <stefan.iacob.extern@livisi.de>, Felix Rotthowe <felix@planbnet.org>
6
- License: Apache-2.0
7
- Project-URL: Source, https://github.com/planbnet/livisi
8
- Project-URL: Tracker, https://github.com/planbnet/livisi/issues
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: License :: OSI Approved :: Apache Software License
11
- Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.8
13
- Description-Content-Type: text/markdown
14
- License-File: LICENSE
15
- Requires-Dist: colorlog>=6.8.2
16
- Requires-Dist: aiohttp>=3.8.5
17
- Requires-Dist: websockets>=11.0.3
18
-
19
- # livisi
20
-
21
- # Asynchronous library to communicate with LIVISI Smart Home Controller
22
- Requires Python 3.8+ and uses asyncio and aiohttp.
23
-
24
- This library is a fork of the unmaintained aiolivisi lib.
@@ -1,11 +0,0 @@
1
- livisi/__init__.py,sha256=WfjrI1lKksaRhrL8vgN7rOWmmHvA1cxVcXrmdd3TSAc,220
2
- livisi/aiolivisi.py,sha256=kOqeNa-dg3d5lApd-_wzbw43dkD5UjPcf7m_QvQAHeg,9539
3
- livisi/const.py,sha256=1JaKhrRSwevc8mWwiTONEITVFJEOGjysDvUHTazF3T0,1088
4
- livisi/errors.py,sha256=ys6cS5yNGXPmJbU9BtUBuhlWqaKkcGSsnie8HMVnvDU,540
5
- livisi/livisi_event.py,sha256=Z3VN1nW737O1xMt1yj62lC0KTiiXFIlRPEog33IsJpw,456
6
- livisi/websocket.py,sha256=YTs-Eok303u01FFEWUeYLoa6i9QpXE0rK0f3eTwsekQ,4483
7
- livisi-0.0.25.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
8
- livisi-0.0.25.dist-info/METADATA,sha256=Kxt3hnQmzgbuQkzFl0hvr8-k7iVEN6uAjZ7O8FFIqd0,889
9
- livisi-0.0.25.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
10
- livisi-0.0.25.dist-info/top_level.txt,sha256=ctiU5MMpBSwoQR7mJWIuyB1ND1_g004Xa3vNmMsSiCs,7
11
- livisi-0.0.25.dist-info/RECORD,,