pymammotion 0.4.0b6__tar.gz → 0.4.0b8__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.
Files changed (133) hide show
  1. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/PKG-INFO +2 -3
  2. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/state_manager.py +9 -7
  3. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/devices/mammotion.py +6 -0
  4. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/devices/mammotion_cloud.py +4 -1
  5. pymammotion-0.4.0b8/pymammotion/mqtt/linkkit/__init__.py +5 -0
  6. pymammotion-0.4.0b8/pymammotion/mqtt/linkkit/h2client.py +585 -0
  7. pymammotion-0.4.0b8/pymammotion/mqtt/linkkit/linkkit.py +3020 -0
  8. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mqtt/mammotion_mqtt.py +1 -1
  9. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pyproject.toml +3 -4
  10. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/LICENSE +0 -0
  11. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/README.md +0 -0
  12. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/__init__.py +0 -0
  13. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/aliyun/__init__.py +0 -0
  14. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/aliyun/cloud_gateway.py +0 -0
  15. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/aliyun/model/aep_response.py +0 -0
  16. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/aliyun/model/connect_response.py +0 -0
  17. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/aliyun/model/dev_by_account_response.py +0 -0
  18. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/aliyun/model/login_by_oauth_response.py +0 -0
  19. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/aliyun/model/regions_response.py +0 -0
  20. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/aliyun/model/session_by_authcode_response.py +0 -0
  21. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/aliyun/model/stream_subscription_response.py +0 -0
  22. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/aliyun/tmp_constant.py +0 -0
  23. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/bluetooth/__init__.py +0 -0
  24. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/bluetooth/ble.py +0 -0
  25. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/bluetooth/ble_message.py +0 -0
  26. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/bluetooth/const.py +0 -0
  27. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/bluetooth/data/__init__.py +0 -0
  28. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/bluetooth/data/convert.py +0 -0
  29. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/bluetooth/data/framectrldata.py +0 -0
  30. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/bluetooth/data/notifydata.py +0 -0
  31. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/bluetooth/model/__init__.py +0 -0
  32. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/bluetooth/model/atomic_integer.py +0 -0
  33. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/const.py +0 -0
  34. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/__init__.py +0 -0
  35. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/__init__.py +0 -0
  36. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/account.py +0 -0
  37. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/device.py +0 -0
  38. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/device_config.py +0 -0
  39. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/device_info.py +0 -0
  40. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/device_limits.py +0 -0
  41. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/enums.py +0 -0
  42. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/excute_boarder_params.py +0 -0
  43. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/execute_boarder.py +0 -0
  44. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/generate_route_information.py +0 -0
  45. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/hash_list.py +0 -0
  46. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/location.py +0 -0
  47. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/mowing_modes.py +0 -0
  48. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/plan.py +0 -0
  49. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/rapid_state.py +0 -0
  50. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/raw_data.py +0 -0
  51. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/region_data.py +0 -0
  52. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/model/report_info.py +0 -0
  53. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/mqtt/__init__.py +0 -0
  54. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/mqtt/event.py +0 -0
  55. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/mqtt/properties.py +0 -0
  56. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/data/mqtt/status.py +0 -0
  57. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/event/__init__.py +0 -0
  58. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/event/event.py +0 -0
  59. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/http/_init_.py +0 -0
  60. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/http/encryption.py +0 -0
  61. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/http/http.py +0 -0
  62. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/http/model/http.py +0 -0
  63. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/__init__.py +0 -0
  64. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/commands/__init__.py +0 -0
  65. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/commands/abstract_message.py +0 -0
  66. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/commands/mammotion_command.py +0 -0
  67. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/commands/messages/__init__.py +0 -0
  68. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/commands/messages/driver.py +0 -0
  69. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/commands/messages/media.py +0 -0
  70. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/commands/messages/navigation.py +0 -0
  71. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/commands/messages/network.py +0 -0
  72. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/commands/messages/ota.py +0 -0
  73. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/commands/messages/system.py +0 -0
  74. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/commands/messages/video.py +0 -0
  75. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/control/__init__.py +0 -0
  76. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/control/joystick.py +0 -0
  77. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/devices/__init__.py +0 -0
  78. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/devices/base.py +0 -0
  79. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mammotion/devices/mammotion_bluetooth.py +1 -1
  80. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mqtt/__init__.py +0 -0
  81. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/mqtt/mammotion_future.py +0 -0
  82. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/__init__.py +0 -0
  83. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/basestation.proto +0 -0
  84. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/basestation.py +0 -0
  85. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/basestation_pb2.py +0 -0
  86. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/basestation_pb2.pyi +0 -0
  87. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/common.proto +0 -0
  88. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/common.py +0 -0
  89. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/common_pb2.py +0 -0
  90. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/common_pb2.pyi +0 -0
  91. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/dev_net.proto +0 -0
  92. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/dev_net.py +0 -0
  93. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/dev_net_pb2.py +0 -0
  94. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/dev_net_pb2.pyi +0 -0
  95. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/luba_msg.proto +0 -0
  96. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/luba_msg.py +0 -0
  97. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/luba_msg_pb2.py +0 -0
  98. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/luba_msg_pb2.pyi +0 -0
  99. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/luba_mul.proto +0 -0
  100. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/luba_mul.py +0 -0
  101. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/luba_mul_pb2.py +0 -0
  102. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/luba_mul_pb2.pyi +0 -0
  103. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_driver.proto +0 -0
  104. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_driver.py +0 -0
  105. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_driver_pb2.py +0 -0
  106. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_driver_pb2.pyi +0 -0
  107. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_nav.proto +0 -0
  108. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_nav.py +0 -0
  109. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_nav_pb2.py +0 -0
  110. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_nav_pb2.pyi +0 -0
  111. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_ota.proto +0 -0
  112. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_ota.py +0 -0
  113. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_ota_pb2.py +0 -0
  114. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_ota_pb2.pyi +0 -0
  115. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_pept.proto +0 -0
  116. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_pept.py +0 -0
  117. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_pept_pb2.py +0 -0
  118. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_pept_pb2.pyi +0 -0
  119. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_sys.proto +0 -0
  120. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_sys.py +0 -0
  121. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_sys_pb2.py +0 -0
  122. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/proto/mctrl_sys_pb2.pyi +0 -0
  123. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/py.typed +0 -0
  124. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/utility/constant/__init__.py +0 -0
  125. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/utility/constant/device_constant.py +0 -0
  126. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/utility/conversions.py +0 -0
  127. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/utility/datatype_converter.py +0 -0
  128. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/utility/device_config.py +0 -0
  129. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/utility/device_type.py +0 -0
  130. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/utility/map.py +0 -0
  131. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/utility/movement.py +0 -0
  132. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/utility/periodic.py +0 -0
  133. {pymammotion-0.4.0b6 → pymammotion-0.4.0b8}/pymammotion/utility/rocker_util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pymammotion
3
- Version: 0.4.0b6
3
+ Version: 0.4.0b8
4
4
  Summary:
5
5
  License: GPL-3.0
6
6
  Author: Michael Arthur
@@ -15,7 +15,6 @@ Requires-Dist: aiohttp (>=3.9.1,<4.0.0)
15
15
  Requires-Dist: alibabacloud-apigateway-util (>=0.0.2,<0.0.3)
16
16
  Requires-Dist: alibabacloud-iot-api-gateway (>=0.0.4,<0.0.5)
17
17
  Requires-Dist: alicloud-gateway-iot (>=1.0.0,<2.0.0)
18
- Requires-Dist: aliyun-iot-linkkit (>=1.2.12,<2.0.0)
19
18
  Requires-Dist: async-timeout (>=4.0.3,<5.0.0)
20
19
  Requires-Dist: betterproto (>=1.2.5,<2.0.0)
21
20
  Requires-Dist: bleak (>=0.21.0)
@@ -26,7 +25,7 @@ Requires-Dist: jsonic (>=1.0.0,<2.0.0)
26
25
  Requires-Dist: mashumaro (>=3.13,<4.0)
27
26
  Requires-Dist: numpy (>=1.26.0)
28
27
  Requires-Dist: orjson (>=3.9.15,<4.0.0)
29
- Requires-Dist: paho-mqtt (>=1.6.1,<2.0.0)
28
+ Requires-Dist: paho-mqtt (>=2.1.0,<3.0.0)
30
29
  Requires-Dist: protobuf (>=4.23.1)
31
30
  Requires-Dist: py-jsonic (>=0.0.2,<0.0.3)
32
31
  Description-Content-Type: text/markdown
@@ -52,6 +52,7 @@ class StateManager:
52
52
  self._device = device
53
53
 
54
54
  def properties(self, thing_properties: ThingPropertiesMessage) -> None:
55
+ # TODO update device based off thing properties
55
56
  self._device.mqtt_properties = thing_properties
56
57
 
57
58
  def status(self, thing_status: ThingStatusMessage) -> None:
@@ -70,19 +71,19 @@ class StateManager:
70
71
  async def gethash_ack_callback(self, msg: NavGetHashListAck) -> None:
71
72
  if self.cloud_gethash_ack_callback:
72
73
  await self.cloud_gethash_ack_callback(msg)
73
- if self.ble_gethash_ack_callback:
74
+ elif self.ble_gethash_ack_callback:
74
75
  await self.ble_gethash_ack_callback(msg)
75
76
 
76
77
  async def on_notification_callback(self, res: tuple[str, Any | None]) -> None:
77
78
  if self.cloud_on_notification_callback:
78
79
  await self.cloud_on_notification_callback(res)
79
- if self.ble_on_notification_callback:
80
+ elif self.ble_on_notification_callback:
80
81
  await self.ble_on_notification_callback(res)
81
82
 
82
83
  async def get_commondata_ack_callback(self, comm_data: NavGetCommDataAck | SvgMessageAckT) -> None:
83
84
  if self.cloud_get_commondata_ack_callback:
84
85
  await self.cloud_get_commondata_ack_callback(comm_data)
85
- if self.ble_get_commondata_ack_callback:
86
+ elif self.ble_get_commondata_ack_callback:
86
87
  await self.ble_get_commondata_ack_callback(comm_data)
87
88
 
88
89
  async def notification(self, message: LubaMsg) -> None:
@@ -94,7 +95,7 @@ class StateManager:
94
95
  case "nav":
95
96
  await self._update_nav_data(message)
96
97
  case "sys":
97
- await self._update_sys_data(message)
98
+ self._update_sys_data(message)
98
99
  case "driver":
99
100
  self._update_driver_data(message)
100
101
  case "net":
@@ -130,7 +131,7 @@ class StateManager:
130
131
  converted_list = [AreaHashNameList(name=item.name, hash=item.hash) for item in hash_names.hashnames]
131
132
  self._device.map.area_name = converted_list
132
133
 
133
- async def _update_sys_data(self, message) -> None:
134
+ def _update_sys_data(self, message) -> None:
134
135
  """Update system."""
135
136
  sys_msg = betterproto.which_one_of(message.sys, "SubSysMsg")
136
137
  match sys_msg[0]:
@@ -148,8 +149,9 @@ class StateManager:
148
149
  self._device.mower_state.side_led = side_led
149
150
  case "device_product_type_info":
150
151
  device_product_type: DeviceProductTypeInfoT = sys_msg[1]
151
- self._device.mower_state.model_id = device_product_type.main_product_type
152
- self._device.mower_state.sub_model_id = device_product_type.sub_product_type
152
+ if device_product_type.main_product_type != "" or device_product_type.sub_product_type != "":
153
+ self._device.mower_state.model_id = device_product_type.main_product_type
154
+ self._device.mower_state.sub_model_id = device_product_type.sub_product_type
153
155
  case "toapp_dev_fw_info":
154
156
  device_fw_info: DeviceFwInfo = sys_msg[1]
155
157
  self._device.device_firmwares.device_version = device_fw_info.version
@@ -84,9 +84,15 @@ class MammotionMixedDeviceManager:
84
84
  def replace_cloud(self, cloud_device: MammotionBaseCloudDevice) -> None:
85
85
  self._cloud_device = cloud_device
86
86
 
87
+ def remove_cloud(self) -> None:
88
+ del self._cloud_device
89
+
87
90
  def replace_ble(self, ble_device: MammotionBaseBLEDevice) -> None:
88
91
  self._ble_device = ble_device
89
92
 
93
+ def remove_ble(self) -> None:
94
+ del self._ble_device
95
+
90
96
  def replace_mqtt(self, mqtt: MammotionCloud) -> None:
91
97
  device = self._cloud_device.device
92
98
  self._cloud_device = MammotionBaseCloudDevice(mqtt, cloud_device=device, state_manager=self._state_manager)
@@ -184,6 +184,8 @@ class MammotionBaseCloudDevice(MammotionBaseDevice):
184
184
  self._mqtt.on_disconnected_event.remove_subscribers(self.on_disconnect)
185
185
  self._mqtt.on_connected_event.remove_subscribers(self.on_connect)
186
186
  self._mqtt.mqtt_message_event.remove_subscribers(self._parse_message_for_device)
187
+ self._state_manager.cloud_gethash_ack_callback = None
188
+ self._state_manager.cloud_get_commondata_ack_callback = None
187
189
  if self._ble_sync_task:
188
190
  self._ble_sync_task.cancel()
189
191
 
@@ -317,6 +319,8 @@ class MammotionBaseCloudDevice(MammotionBaseDevice):
317
319
  if new_msg.net.todev_ble_sync != 0 or has_field(new_msg.net.toapp_wifi_iot_status):
318
320
  return
319
321
 
322
+ await self._state_manager.notification(new_msg)
323
+
320
324
  if len(self._mqtt.waiting_queue) > 0:
321
325
  fut: MammotionFuture = self.dequeue_by_iot_id(self._mqtt.waiting_queue, self.iot_id)
322
326
  if fut is None:
@@ -325,7 +329,6 @@ class MammotionBaseCloudDevice(MammotionBaseDevice):
325
329
  fut = self.dequeue_by_iot_id(self._mqtt.waiting_queue, self.iot_id)
326
330
  if not fut.fut.cancelled():
327
331
  fut.resolve(cast(bytes, binary_data))
328
- await self._state_manager.notification(new_msg)
329
332
 
330
333
  @property
331
334
  def mqtt(self):
@@ -0,0 +1,5 @@
1
+ """Package for linkkit."""
2
+
3
+ from .linkkit import LinkKit
4
+
5
+ __all__ = ["LinkKit"]