python-openevse-http 1.1.0__py3-none-any.whl → 1.3.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.
- openevsehttp/const.py +2 -0
- openevsehttp/sensors.py +38 -1
- openevsehttp/utils.py +1 -1
- {python_openevse_http-1.1.0.dist-info → python_openevse_http-1.3.0.dist-info}/METADATA +1 -1
- {python_openevse_http-1.1.0.dist-info → python_openevse_http-1.3.0.dist-info}/RECORD +8 -8
- {python_openevse_http-1.1.0.dist-info → python_openevse_http-1.3.0.dist-info}/WHEEL +0 -0
- {python_openevse_http-1.1.0.dist-info → python_openevse_http-1.3.0.dist-info}/licenses/LICENSE +0 -0
- {python_openevse_http-1.1.0.dist-info → python_openevse_http-1.3.0.dist-info}/top_level.txt +0 -0
openevsehttp/const.py
CHANGED
|
@@ -23,6 +23,8 @@ BAT_RANGE = "battery_range"
|
|
|
23
23
|
TTF = "time_to_full_charge"
|
|
24
24
|
VOLTAGE = "voltage"
|
|
25
25
|
SHAPER_LIVE = "shaper_live_pwr"
|
|
26
|
+
HOME_BATTERY_SOC = "home_battery_soc"
|
|
27
|
+
HOME_BATTERY_POWER = "home_battery_power"
|
|
26
28
|
TYPE = "type"
|
|
27
29
|
VALUE = "value"
|
|
28
30
|
RELEASE = "release"
|
openevsehttp/sensors.py
CHANGED
|
@@ -6,7 +6,16 @@ import logging
|
|
|
6
6
|
from collections.abc import Mapping
|
|
7
7
|
from typing import Any
|
|
8
8
|
|
|
9
|
-
from .const import
|
|
9
|
+
from .const import (
|
|
10
|
+
BAT_LVL,
|
|
11
|
+
BAT_RANGE,
|
|
12
|
+
GRID,
|
|
13
|
+
HOME_BATTERY_POWER,
|
|
14
|
+
HOME_BATTERY_SOC,
|
|
15
|
+
SOLAR,
|
|
16
|
+
TTF,
|
|
17
|
+
VOLTAGE,
|
|
18
|
+
)
|
|
10
19
|
from .exceptions import UnsupportedFeature
|
|
11
20
|
|
|
12
21
|
_LOGGER = logging.getLogger(__name__)
|
|
@@ -122,6 +131,34 @@ class SensorsMixin:
|
|
|
122
131
|
response = await self.process_request(url=url, method="post", data=data)
|
|
123
132
|
_LOGGER.debug("SOC response: %s", self._normalize_response(response))
|
|
124
133
|
|
|
134
|
+
# Home/powerwall battery HTTP Posting
|
|
135
|
+
async def home_battery(
|
|
136
|
+
self,
|
|
137
|
+
soc: int | None = None,
|
|
138
|
+
power: int | None = None,
|
|
139
|
+
) -> None:
|
|
140
|
+
"""Send pushed home/powerwall battery data to the charger."""
|
|
141
|
+
if not self._version_check("4.1.0"):
|
|
142
|
+
_LOGGER.debug("Feature not supported for older firmware.")
|
|
143
|
+
raise UnsupportedFeature
|
|
144
|
+
|
|
145
|
+
url = f"{self.url}status"
|
|
146
|
+
data = {}
|
|
147
|
+
|
|
148
|
+
if soc is not None:
|
|
149
|
+
data[HOME_BATTERY_SOC] = soc
|
|
150
|
+
if power is not None:
|
|
151
|
+
data[HOME_BATTERY_POWER] = power
|
|
152
|
+
|
|
153
|
+
if not data:
|
|
154
|
+
_LOGGER.info("No home battery data to send to device.")
|
|
155
|
+
else:
|
|
156
|
+
_LOGGER.debug("Posting home battery data: %s", data)
|
|
157
|
+
response = await self.process_request(url=url, method="post", data=data)
|
|
158
|
+
_LOGGER.debug(
|
|
159
|
+
"Home battery response: %s", self._normalize_response(response)
|
|
160
|
+
)
|
|
161
|
+
|
|
125
162
|
# Shaper HTTP Posting
|
|
126
163
|
async def set_shaper_live_pwr(self, power: int) -> None:
|
|
127
164
|
"""Send pushed sensor data to shaper."""
|
openevsehttp/utils.py
CHANGED
|
@@ -32,7 +32,7 @@ def get_awesome_version(version: str) -> AwesomeVersion:
|
|
|
32
32
|
# We use custom word boundary checks to avoid false positives like 'domain' matching 'main'
|
|
33
33
|
# or 'webmaster' matching 'master'.
|
|
34
34
|
is_dev = False
|
|
35
|
-
if re.search(r"
|
|
35
|
+
if re.search(r"_modified$", version, re.IGNORECASE):
|
|
36
36
|
is_dev = True
|
|
37
37
|
elif re.search(
|
|
38
38
|
r"(?:^|[^a-zA-Z0-9])(master|main)(?:[^a-zA-Z0-9]|$)", version, re.IGNORECASE
|
|
@@ -2,16 +2,16 @@ openevsehttp/__init__.py,sha256=I6a1mjOZHYiWb_qfCuDuFLOOncrkkB_7uwybtOIujfY,1165
|
|
|
2
2
|
openevsehttp/__main__.py,sha256=EHmSdT7GjAVvHQxvLBTjZXsj_V5SB6B2_kpgUAT7mPM,146
|
|
3
3
|
openevsehttp/client.py,sha256=dSvlotG7xxgnDxkI_o2KtIddVw58y6ZgIdJa9gu-WnU,19013
|
|
4
4
|
openevsehttp/commands.py,sha256=JGxjmGvE2-eUJ1gD76y_701Qk3Kzab-6XtGeaXXDSb0,27243
|
|
5
|
-
openevsehttp/const.py,sha256
|
|
5
|
+
openevsehttp/const.py,sha256=-frkFduu8hxEBab9FnwA3D65XHrsyH0W7P9miYsWh90,1726
|
|
6
6
|
openevsehttp/exceptions.py,sha256=bqz-tHTW1AYJMKcm0s5M6z5tA6XZgjnCiBLW1XrZ_70,672
|
|
7
7
|
openevsehttp/managers.py,sha256=EtQMQziwhoZeqKe2zWY-0yS7zedhuYjYtL5j9xBBCZ0,5380
|
|
8
8
|
openevsehttp/properties.py,sha256=xbQfx256FZwNPPn9ryWWOMKliyCChq4ZaTH9NDQVR_8,17968
|
|
9
9
|
openevsehttp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
-
openevsehttp/sensors.py,sha256=
|
|
11
|
-
openevsehttp/utils.py,sha256=
|
|
10
|
+
openevsehttp/sensors.py,sha256=zhQSToY_Zp2rOhPnUXT40xS5ZnUavqNGLm4zAFiUUrY,5717
|
|
11
|
+
openevsehttp/utils.py,sha256=fPUWL64gFTRw4TtV4WITDAFMJ75VjNhPBaU6diwVlv0,2019
|
|
12
12
|
openevsehttp/websocket.py,sha256=dOSemvm7CM5pFb9RaoJSTIM6Tf5xtWMLEBEccKlBUKI,10517
|
|
13
|
-
python_openevse_http-1.
|
|
14
|
-
python_openevse_http-1.
|
|
15
|
-
python_openevse_http-1.
|
|
16
|
-
python_openevse_http-1.
|
|
17
|
-
python_openevse_http-1.
|
|
13
|
+
python_openevse_http-1.3.0.dist-info/licenses/LICENSE,sha256=hSB6TOQ7rmwSGb6XzqRjDGMvmUj5_GlacqQin3tegtA,11341
|
|
14
|
+
python_openevse_http-1.3.0.dist-info/METADATA,sha256=wgNS8c8fRPdgKGP7odat0kkEWdiDXah7aUhB8b7ghLo,4417
|
|
15
|
+
python_openevse_http-1.3.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
16
|
+
python_openevse_http-1.3.0.dist-info/top_level.txt,sha256=u8RUkoEIE33Cjn6gmqiEoVpZ0VZ59WJ3FXBwwOg0CPE,13
|
|
17
|
+
python_openevse_http-1.3.0.dist-info/RECORD,,
|
|
File without changes
|
{python_openevse_http-1.1.0.dist-info → python_openevse_http-1.3.0.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|