Skip to content

Commit 48dfaf4

Browse files
Fix: Direct MQTT publish for fw request (payload is empty or chunk size and not a json)
1 parent 275e4d8 commit 48dfaf4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tb_device_mqtt.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,8 +792,9 @@ def __process_firmware(self):
792792
def __get_firmware(self):
793793
payload = '' if not self.__chunk_size or self.__chunk_size > self.firmware_info.get(FW_SIZE_ATTR, 0) \
794794
else str(self.__chunk_size).encode()
795-
self._publish_data(payload, f"v2/fw/request/{self.__firmware_request_id}/chunk/{self.__current_chunk}",
796-
1)
795+
self._client.publish(
796+
f"v2/fw/request/{self.__firmware_request_id}/chunk/{self.__current_chunk}",
797+
payload=payload, qos=1)
797798

798799
def __on_firmware_received(self, version_to):
799800
with open(self.firmware_info.get(FW_TITLE_ATTR), "wb") as firmware_file:

0 commit comments

Comments
 (0)