Skip to content

Commit 22a8850

Browse files
committed
always send auth as JSON (support for 57.x/59.x versions) 2'nd try
1 parent 900e21a commit 22a8850

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

custom_components/goecharger_api2/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
"iot_class": "local_push",
1313
"issue_tracker": "https://github.com/marq24/ha-goecharger-api2/issues",
1414
"requirements": ["packaging>=21.0", "msgpack>=1.1.2"],
15-
"version": "2026.3.1"
15+
"version": "2026.3.2"
1616
}

custom_components/goecharger_api2/pygoecharger_ha/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,10 +553,12 @@ async def _ws_send_command(self, key: str, value):
553553
}
554554

555555
# Pack as msgpack with 0x00 prefix
556-
msg_packed = b'\x00' + msgpack.packb(secure_message)
556+
# _LOGGER.debug(f"_ws_send_command(): Sending {key}={value} as SECURED BYTES")
557+
# msg_packed = b'\x00' + msgpack.packb(secure_message)
558+
# await self._ws_connection.send_bytes(msg_packed)
557559

558-
_LOGGER.debug(f"_ws_send_command(): Sending {key}={value} as BYTES")
559-
await self._ws_connection.send_bytes(msg_packed)
560+
_LOGGER.debug(f"_ws_send_command(): Sending {key}={value} as SECURED JSON")
561+
await self._ws_connection.send_json(secure_message)
560562
else:
561563
# the cloud API can receive real JSON data...
562564
_LOGGER.debug(f"_ws_send_command(): Sending {key}={value} as JSON")
@@ -591,7 +593,7 @@ async def ws_connect(self):
591593

592594
serial = normalized_hello.get('serial')
593595
if not serial:
594-
_LOGGER.warning("ws_connect(): No serial in hello message")
596+
_LOGGER.warning(f"ws_connect(): No serial in hello message - {normalized_hello}")
595597
return None
596598

597599
version_info = normalized_hello.get('version')

0 commit comments

Comments
 (0)