python-openevse-http 0.1.73__tar.gz → 0.1.75__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.
- {python_openevse_http-0.1.73 → python_openevse_http-0.1.75}/PKG-INFO +1 -1
- {python_openevse_http-0.1.73 → python_openevse_http-0.1.75}/openevsehttp/__main__.py +8 -8
- {python_openevse_http-0.1.73 → python_openevse_http-0.1.75}/openevsehttp/websocket.py +2 -2
- {python_openevse_http-0.1.73 → python_openevse_http-0.1.75}/python_openevse_http.egg-info/PKG-INFO +1 -1
- {python_openevse_http-0.1.73 → python_openevse_http-0.1.75}/setup.py +1 -1
- {python_openevse_http-0.1.73 → python_openevse_http-0.1.75}/README.md +0 -0
- {python_openevse_http-0.1.73 → python_openevse_http-0.1.75}/openevsehttp/__init__.py +0 -0
- {python_openevse_http-0.1.73 → python_openevse_http-0.1.75}/openevsehttp/const.py +0 -0
- {python_openevse_http-0.1.73 → python_openevse_http-0.1.75}/openevsehttp/exceptions.py +0 -0
- {python_openevse_http-0.1.73 → python_openevse_http-0.1.75}/python_openevse_http.egg-info/SOURCES.txt +0 -0
- {python_openevse_http-0.1.73 → python_openevse_http-0.1.75}/python_openevse_http.egg-info/dependency_links.txt +0 -0
- {python_openevse_http-0.1.73 → python_openevse_http-0.1.75}/python_openevse_http.egg-info/not-zip-safe +0 -0
- {python_openevse_http-0.1.73 → python_openevse_http-0.1.75}/python_openevse_http.egg-info/requires.txt +0 -0
- {python_openevse_http-0.1.73 → python_openevse_http-0.1.75}/python_openevse_http.egg-info/top_level.txt +0 -0
- {python_openevse_http-0.1.73 → python_openevse_http-0.1.75}/setup.cfg +0 -0
|
@@ -153,12 +153,12 @@ class OpenEVSE:
|
|
|
153
153
|
await self.update()
|
|
154
154
|
return message
|
|
155
155
|
|
|
156
|
-
except (TimeoutError, ServerTimeoutError):
|
|
156
|
+
except (TimeoutError, ServerTimeoutError) as err:
|
|
157
157
|
_LOGGER.error("%s: %s", ERROR_TIMEOUT, url)
|
|
158
|
-
|
|
158
|
+
raise err
|
|
159
159
|
except ContentTypeError as err:
|
|
160
|
-
_LOGGER.error("%s", err)
|
|
161
|
-
|
|
160
|
+
_LOGGER.error("Content error: %s", err.message)
|
|
161
|
+
raise err
|
|
162
162
|
|
|
163
163
|
await session.close()
|
|
164
164
|
return message
|
|
@@ -263,7 +263,7 @@ class OpenEVSE:
|
|
|
263
263
|
)
|
|
264
264
|
_LOGGER.debug("Disconnect message: %s", error)
|
|
265
265
|
self._ws_listening = False
|
|
266
|
-
|
|
266
|
+
|
|
267
267
|
# Stopped websockets without errors are expected during shutdown
|
|
268
268
|
# and ignored
|
|
269
269
|
elif data == STATE_STOPPED and error:
|
|
@@ -273,7 +273,6 @@ class OpenEVSE:
|
|
|
273
273
|
error,
|
|
274
274
|
)
|
|
275
275
|
self._ws_listening = False
|
|
276
|
-
await self.ws_disconnect()
|
|
277
276
|
|
|
278
277
|
elif msgtype == "data":
|
|
279
278
|
_LOGGER.debug("Websocket data: %s", data)
|
|
@@ -428,6 +427,7 @@ class OpenEVSE:
|
|
|
428
427
|
# 3.x: use RAPI commands $FE (enable) and $FS (sleep)
|
|
429
428
|
# 4.x: use HTTP API call
|
|
430
429
|
lower = "4.0.0"
|
|
430
|
+
msg = ""
|
|
431
431
|
if self._version_check(lower):
|
|
432
432
|
url = f"{self.url}override"
|
|
433
433
|
|
|
@@ -1288,8 +1288,8 @@ class OpenEVSE:
|
|
|
1288
1288
|
return None
|
|
1289
1289
|
|
|
1290
1290
|
@property
|
|
1291
|
-
def
|
|
1292
|
-
"""Return shaper
|
|
1291
|
+
def shaper_available_current(self) -> float | None:
|
|
1292
|
+
"""Return shaper available current."""
|
|
1293
1293
|
if self._status is not None and "shaper_cur" in self._status:
|
|
1294
1294
|
if self._status["shaper_cur"] == 255:
|
|
1295
1295
|
return self._status["pilot"]
|
|
@@ -110,7 +110,7 @@ class OpenEVSEWebsocket:
|
|
|
110
110
|
self._error_reason = error
|
|
111
111
|
await OpenEVSEWebsocket.state.fset(self, STATE_STOPPED)
|
|
112
112
|
except (aiohttp.ClientConnectionError, asyncio.TimeoutError) as error:
|
|
113
|
-
if self.failed_attempts
|
|
113
|
+
if self.failed_attempts > MAX_FAILED_ATTEMPTS:
|
|
114
114
|
self._error_reason = ERROR_TOO_MANY_RETRIES
|
|
115
115
|
await OpenEVSEWebsocket.state.fset(self, STATE_STOPPED)
|
|
116
116
|
elif self.state != STATE_STOPPED:
|
|
@@ -150,8 +150,8 @@ class OpenEVSEWebsocket:
|
|
|
150
150
|
if time_delta < 0:
|
|
151
151
|
# Negitive time should indicate no pong reply so consider the
|
|
152
152
|
# websocket disconnected.
|
|
153
|
-
await OpenEVSEWebsocket.state.fset(self, STATE_DISCONNECTED)
|
|
154
153
|
self._error_reason = ERROR_PING_TIMEOUT
|
|
154
|
+
await OpenEVSEWebsocket.state.fset(self, STATE_DISCONNECTED)
|
|
155
155
|
|
|
156
156
|
data = json.dumps({"ping": 1})
|
|
157
157
|
_LOGGER.debug("Sending message: %s to websocket.", data)
|
|
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
|
|
File without changes
|