Homevolt 0.2.0__tar.gz → 0.2.1__tar.gz
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.
- {homevolt-0.2.0 → homevolt-0.2.1}/Homevolt.egg-info/PKG-INFO +2 -2
- {homevolt-0.2.0 → homevolt-0.2.1}/PKG-INFO +2 -2
- {homevolt-0.2.0 → homevolt-0.2.1}/README.md +1 -1
- {homevolt-0.2.0 → homevolt-0.2.1}/homevolt/device.py +6 -6
- {homevolt-0.2.0 → homevolt-0.2.1}/homevolt/homevolt.py +2 -2
- {homevolt-0.2.0 → homevolt-0.2.1}/pyproject.toml +1 -1
- {homevolt-0.2.0 → homevolt-0.2.1}/Homevolt.egg-info/SOURCES.txt +0 -0
- {homevolt-0.2.0 → homevolt-0.2.1}/Homevolt.egg-info/dependency_links.txt +0 -0
- {homevolt-0.2.0 → homevolt-0.2.1}/Homevolt.egg-info/requires.txt +0 -0
- {homevolt-0.2.0 → homevolt-0.2.1}/Homevolt.egg-info/top_level.txt +0 -0
- {homevolt-0.2.0 → homevolt-0.2.1}/homevolt/__init__.py +0 -0
- {homevolt-0.2.0 → homevolt-0.2.1}/homevolt/const.py +0 -0
- {homevolt-0.2.0 → homevolt-0.2.1}/homevolt/exceptions.py +0 -0
- {homevolt-0.2.0 → homevolt-0.2.1}/homevolt/models.py +0 -0
- {homevolt-0.2.0 → homevolt-0.2.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Homevolt
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Python library for Homevolt EMS devices
|
|
5
5
|
Author-email: Your Name <your.email@example.com>
|
|
6
6
|
License: GPL-3.0
|
|
@@ -33,7 +33,7 @@ Control your battery with:
|
|
|
33
33
|
## Install
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
pip install
|
|
36
|
+
pip install homevolt
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
## Example
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Homevolt
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Python library for Homevolt EMS devices
|
|
5
5
|
Author-email: Your Name <your.email@example.com>
|
|
6
6
|
License: GPL-3.0
|
|
@@ -33,7 +33,7 @@ Control your battery with:
|
|
|
33
33
|
## Install
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
pip install
|
|
36
|
+
pip install homevolt
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
## Example
|
|
@@ -41,7 +41,7 @@ class Device:
|
|
|
41
41
|
password: Optional password for authentication
|
|
42
42
|
websession: aiohttp ClientSession for making requests
|
|
43
43
|
"""
|
|
44
|
-
self.
|
|
44
|
+
self.ip_address = ip_address
|
|
45
45
|
self._password = password
|
|
46
46
|
self._websession = websession
|
|
47
47
|
self._auth = aiohttp.BasicAuth("admin", password) if password else None
|
|
@@ -59,7 +59,7 @@ class Device:
|
|
|
59
59
|
async def fetch_ems_data(self) -> None:
|
|
60
60
|
"""Fetch EMS data from the device."""
|
|
61
61
|
try:
|
|
62
|
-
url = f"http://{self.
|
|
62
|
+
url = f"http://{self.ip_address}{ENDPOINT_EMS}"
|
|
63
63
|
async with self._websession.get(url, auth=self._auth) as response:
|
|
64
64
|
if response.status == 401:
|
|
65
65
|
raise HomevoltAuthenticationError("Authentication failed")
|
|
@@ -75,7 +75,7 @@ class Device:
|
|
|
75
75
|
async def fetch_schedule_data(self) -> None:
|
|
76
76
|
"""Fetch schedule data from the device."""
|
|
77
77
|
try:
|
|
78
|
-
url = f"http://{self.
|
|
78
|
+
url = f"http://{self.ip_address}{ENDPOINT_SCHEDULE}"
|
|
79
79
|
async with self._websession.get(url, auth=self._auth) as response:
|
|
80
80
|
if response.status == 401:
|
|
81
81
|
raise HomevoltAuthenticationError("Authentication failed")
|
|
@@ -381,7 +381,7 @@ class Device:
|
|
|
381
381
|
HomevoltDataError: If response parsing fails
|
|
382
382
|
"""
|
|
383
383
|
try:
|
|
384
|
-
url = f"http://{self.
|
|
384
|
+
url = f"http://{self.ip_address}{ENDPOINT_CONSOLE}"
|
|
385
385
|
async with self._websession.post(
|
|
386
386
|
url,
|
|
387
387
|
auth=self._auth,
|
|
@@ -589,7 +589,7 @@ class Device:
|
|
|
589
589
|
HomevoltDataError: If parameter setting fails
|
|
590
590
|
"""
|
|
591
591
|
try:
|
|
592
|
-
url = f"http://{self.
|
|
592
|
+
url = f"http://{self.ip_address}{ENDPOINT_PARAMS}"
|
|
593
593
|
async with self._websession.post(
|
|
594
594
|
url,
|
|
595
595
|
auth=self._auth,
|
|
@@ -619,7 +619,7 @@ class Device:
|
|
|
619
619
|
HomevoltDataError: If parameter retrieval fails
|
|
620
620
|
"""
|
|
621
621
|
try:
|
|
622
|
-
url = f"http://{self.
|
|
622
|
+
url = f"http://{self.ip_address}{ENDPOINT_PARAMS}"
|
|
623
623
|
async with self._websession.get(url, auth=self._auth) as response:
|
|
624
624
|
if response.status == 401:
|
|
625
625
|
raise HomevoltAuthenticationError("Authentication failed")
|
|
@@ -27,7 +27,7 @@ class Homevolt:
|
|
|
27
27
|
password: Optional password for authentication
|
|
28
28
|
websession: Optional aiohttp ClientSession. If not provided, one will be created.
|
|
29
29
|
"""
|
|
30
|
-
self.
|
|
30
|
+
self.ip_address = ip_address
|
|
31
31
|
self._password = password
|
|
32
32
|
self._websession = websession
|
|
33
33
|
self._own_session = websession is None
|
|
@@ -40,7 +40,7 @@ class Homevolt:
|
|
|
40
40
|
await self._ensure_session()
|
|
41
41
|
assert self._websession is not None
|
|
42
42
|
self._device = Device(
|
|
43
|
-
ip_address=self.
|
|
43
|
+
ip_address=self.ip_address,
|
|
44
44
|
password=self._password,
|
|
45
45
|
websession=self._websession,
|
|
46
46
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|