Skip to content

Fix: Direct MQTT publish for fw request #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tb_device_mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,8 +792,9 @@ def __process_firmware(self):
def __get_firmware(self):
payload = '' if not self.__chunk_size or self.__chunk_size > self.firmware_info.get(FW_SIZE_ATTR, 0) \
else str(self.__chunk_size).encode()
self._publish_data(payload, f"v2/fw/request/{self.__firmware_request_id}/chunk/{self.__current_chunk}",
1)
self._client.publish(
f"v2/fw/request/{self.__firmware_request_id}/chunk/{self.__current_chunk}",
payload=payload, qos=1)

def __on_firmware_received(self, version_to):
with open(self.firmware_info.get(FW_TITLE_ATTR), "wb") as firmware_file:
Expand Down
Loading