pymammotion 0.4.21__tar.gz → 0.4.23__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 (125) hide show
  1. {pymammotion-0.4.21 → pymammotion-0.4.23}/PKG-INFO +1 -1
  2. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/hash_list.py +22 -3
  3. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/state_manager.py +15 -1
  4. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/devices/base.py +11 -2
  5. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/devices/mammotion_bluetooth.py +1 -0
  6. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/devices/mammotion_cloud.py +4 -0
  7. {pymammotion-0.4.21 → pymammotion-0.4.23}/pyproject.toml +2 -2
  8. {pymammotion-0.4.21 → pymammotion-0.4.23}/LICENSE +0 -0
  9. {pymammotion-0.4.21 → pymammotion-0.4.23}/README.md +0 -0
  10. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/__init__.py +0 -0
  11. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/aliyun/__init__.py +0 -0
  12. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/aliyun/client.py +0 -0
  13. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/aliyun/cloud_gateway.py +0 -0
  14. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/aliyun/model/aep_response.py +0 -0
  15. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/aliyun/model/connect_response.py +0 -0
  16. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/aliyun/model/dev_by_account_response.py +0 -0
  17. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/aliyun/model/login_by_oauth_response.py +0 -0
  18. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/aliyun/model/regions_response.py +0 -0
  19. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/aliyun/model/session_by_authcode_response.py +0 -0
  20. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/aliyun/model/stream_subscription_response.py +0 -0
  21. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/aliyun/tea/core.py +0 -0
  22. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/aliyun/tmp_constant.py +0 -0
  23. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/bluetooth/__init__.py +0 -0
  24. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/bluetooth/ble.py +0 -0
  25. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/bluetooth/ble_message.py +0 -0
  26. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/bluetooth/const.py +0 -0
  27. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/bluetooth/data/__init__.py +0 -0
  28. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/bluetooth/data/convert.py +0 -0
  29. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/bluetooth/data/framectrldata.py +0 -0
  30. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/bluetooth/data/notifydata.py +0 -0
  31. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/bluetooth/model/__init__.py +0 -0
  32. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/bluetooth/model/atomic_integer.py +0 -0
  33. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/const.py +0 -0
  34. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/__init__.py +0 -0
  35. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/__init__.py +0 -0
  36. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/account.py +0 -0
  37. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/device.py +0 -0
  38. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/device_config.py +0 -0
  39. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/device_info.py +0 -0
  40. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/device_limits.py +0 -0
  41. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/enums.py +0 -0
  42. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/excute_boarder_params.py +0 -0
  43. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/execute_boarder.py +0 -0
  44. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/generate_route_information.py +0 -0
  45. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/location.py +0 -0
  46. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/mowing_modes.py +0 -0
  47. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/plan.py +0 -0
  48. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/rapid_state.py +0 -0
  49. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/raw_data.py +0 -0
  50. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/region_data.py +0 -0
  51. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/model/report_info.py +0 -0
  52. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/mqtt/__init__.py +0 -0
  53. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/mqtt/event.py +0 -0
  54. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/mqtt/properties.py +0 -0
  55. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/data/mqtt/status.py +0 -0
  56. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/event/__init__.py +0 -0
  57. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/event/event.py +0 -0
  58. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/http/_init_.py +0 -0
  59. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/http/encryption.py +0 -0
  60. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/http/http.py +0 -0
  61. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/http/model/http.py +0 -0
  62. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/__init__.py +0 -0
  63. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/commands/__init__.py +0 -0
  64. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/commands/abstract_message.py +0 -0
  65. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/commands/mammotion_command.py +0 -0
  66. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/commands/messages/__init__.py +0 -0
  67. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/commands/messages/driver.py +0 -0
  68. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/commands/messages/media.py +0 -0
  69. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/commands/messages/navigation.py +0 -0
  70. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/commands/messages/network.py +0 -0
  71. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/commands/messages/ota.py +0 -0
  72. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/commands/messages/system.py +0 -0
  73. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/commands/messages/video.py +0 -0
  74. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/control/__init__.py +0 -0
  75. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/control/joystick.py +0 -0
  76. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/devices/__init__.py +0 -0
  77. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mammotion/devices/mammotion.py +0 -0
  78. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mqtt/__init__.py +0 -0
  79. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mqtt/linkkit/__init__.py +0 -0
  80. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mqtt/linkkit/h2client.py +0 -0
  81. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mqtt/linkkit/linkkit.py +0 -0
  82. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mqtt/mammotion_future.py +0 -0
  83. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/mqtt/mammotion_mqtt.py +0 -0
  84. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/__init__.py +0 -0
  85. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/basestation.proto +0 -0
  86. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/basestation_pb2.py +0 -0
  87. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/basestation_pb2.pyi +0 -0
  88. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/common.proto +0 -0
  89. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/common_pb2.py +0 -0
  90. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/common_pb2.pyi +0 -0
  91. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/dev_net.proto +0 -0
  92. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/dev_net_pb2.py +0 -0
  93. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/dev_net_pb2.pyi +0 -0
  94. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/luba_msg.proto +0 -0
  95. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/luba_msg_pb2.py +0 -0
  96. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/luba_msg_pb2.pyi +0 -0
  97. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/luba_mul.proto +0 -0
  98. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/luba_mul_pb2.py +0 -0
  99. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/luba_mul_pb2.pyi +0 -0
  100. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/mctrl_driver.proto +0 -0
  101. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/mctrl_driver_pb2.py +0 -0
  102. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/mctrl_driver_pb2.pyi +0 -0
  103. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/mctrl_nav.proto +0 -0
  104. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/mctrl_nav_pb2.py +0 -0
  105. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/mctrl_nav_pb2.pyi +0 -0
  106. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/mctrl_ota.proto +0 -0
  107. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/mctrl_ota_pb2.py +0 -0
  108. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/mctrl_ota_pb2.pyi +0 -0
  109. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/mctrl_pept.proto +0 -0
  110. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/mctrl_pept_pb2.py +0 -0
  111. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/mctrl_pept_pb2.pyi +0 -0
  112. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/mctrl_sys.proto +0 -0
  113. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/mctrl_sys_pb2.py +0 -0
  114. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/proto/mctrl_sys_pb2.pyi +0 -0
  115. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/py.typed +0 -0
  116. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/utility/constant/__init__.py +0 -0
  117. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/utility/constant/device_constant.py +0 -0
  118. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/utility/conversions.py +0 -0
  119. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/utility/datatype_converter.py +0 -0
  120. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/utility/device_config.py +0 -0
  121. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/utility/device_type.py +0 -0
  122. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/utility/map.py +0 -0
  123. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/utility/movement.py +0 -0
  124. {pymammotion-0.4.21 → pymammotion-0.4.23}/pymammotion/utility/periodic.py +0 -0
  125. {pymammotion-0.4.21 → pymammotion-0.4.23}/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.21
3
+ Version: 0.4.23
4
4
  Summary:
5
5
  License: GPL-3.0
6
6
  Author: Michael Arthur
@@ -86,27 +86,43 @@ class FrameList(DataClassORJSONMixin):
86
86
 
87
87
  @dataclass
88
88
  class Plan(DataClassORJSONMixin):
89
+ pver: int = 0
89
90
  sub_cmd: int = 2
91
+ area: int = 0
92
+ work_time: int = 0
90
93
  version: str = ""
94
+ id: str = ""
91
95
  user_id: str = ""
92
96
  device_id: str = ""
93
97
  plan_id: str = ""
94
98
  task_id: str = ""
95
- start_time: str = "00:00"
99
+ job_id: str = ""
100
+ start_time: str = ""
101
+ end_time: str = ""
102
+ week: int = 0
96
103
  knife_height: int = 0
97
104
  model: int = 0
98
105
  edge_mode: int = 0
106
+ required_time: int = 0
107
+ route_angle: int = 0
99
108
  route_model: int = 0
100
109
  route_spacing: int = 0
101
110
  ultrasonic_barrier: int = 0
102
111
  total_plan_num: int = 0
112
+ plan_index: int = 0
113
+ result: int = 0
103
114
  speed: float = 0.0
104
115
  task_name: str = ""
105
- zone_hashs: list[str] = field(default_factory=list)
116
+ job_name: str = ""
117
+ zone_hashs: list[int] = field(default_factory=list)
106
118
  reserved: str = ""
107
119
  start_date: str = ""
120
+ end_date: str = ""
108
121
  trigger_type: int = 0
109
- remained_seconds: str = "-1"
122
+ day: int = 0
123
+ weeks: list[int] = field(default_factory=list)
124
+ remained_seconds: int = 0
125
+ toward_mode: int = 0
110
126
  toward_included_angle: int = 0
111
127
 
112
128
 
@@ -263,6 +279,9 @@ class HashList(DataClassORJSONMixin):
263
279
 
264
280
  return []
265
281
 
282
+ def update_plan(self, plan: Plan) -> None:
283
+ self.plan[plan.plan_index] = plan
284
+
266
285
  def update(self, hash_data: NavGetCommData | SvgMessage) -> bool:
267
286
  """Update the map data."""
268
287
 
@@ -9,7 +9,7 @@ import betterproto
9
9
 
10
10
  from pymammotion.data.model.device import MowingDevice
11
11
  from pymammotion.data.model.device_info import SideLight
12
- from pymammotion.data.model.hash_list import AreaHashNameList, NavGetCommData, NavGetHashListData, SvgMessage
12
+ from pymammotion.data.model.hash_list import AreaHashNameList, NavGetCommData, NavGetHashListData, Plan, SvgMessage
13
13
  from pymammotion.data.mqtt.properties import ThingPropertiesMessage
14
14
  from pymammotion.data.mqtt.status import ThingStatusMessage
15
15
  from pymammotion.proto import (
@@ -21,6 +21,7 @@ from pymammotion.proto import (
21
21
  LubaMsg,
22
22
  NavGetCommDataAck,
23
23
  NavGetHashListAck,
24
+ NavPlanJobSet,
24
25
  SvgMessageAckT,
25
26
  TimeCtrlLight,
26
27
  WifiIotStatusReport,
@@ -36,6 +37,7 @@ class StateManager:
36
37
  last_updated_at: datetime = datetime.now()
37
38
  cloud_gethash_ack_callback: Callable[[NavGetHashListAck], Awaitable[None]] | None = None
38
39
  cloud_get_commondata_ack_callback: Callable[[NavGetCommDataAck | SvgMessageAckT], Awaitable[None]] | None = None
40
+ cloud_get_plan_callback: Callable[[NavPlanJobSet], Awaitable[None]] | None = None
39
41
  cloud_on_notification_callback: Callable[[tuple[str, Any | None]], Awaitable[None]] | None = None
40
42
 
41
43
  # possibly don't need anymore
@@ -43,6 +45,7 @@ class StateManager:
43
45
 
44
46
  ble_gethash_ack_callback: Callable[[NavGetHashListAck], Awaitable[None]] | None = None
45
47
  ble_get_commondata_ack_callback: Callable[[NavGetCommDataAck | SvgMessageAckT], Awaitable[None]] | None = None
48
+ ble_get_plan_callback: Callable[[NavPlanJobSet], Awaitable[None]] | None = None
46
49
  ble_on_notification_callback: Callable[[tuple[str, Any | None]], Awaitable[None]] | None = None
47
50
 
48
51
  # possibly don't need anymore
@@ -97,6 +100,12 @@ class StateManager:
97
100
  elif self.ble_get_commondata_ack_callback:
98
101
  await self.ble_get_commondata_ack_callback(comm_data)
99
102
 
103
+ async def get_plan_callback(self, planjob: NavPlanJobSet) -> None:
104
+ if self.cloud_get_plan_callback:
105
+ await self.get_plan_callback(planjob)
106
+ elif self.ble_get_plan_callback:
107
+ await self.ble_get_plan_callback(planjob)
108
+
100
109
  async def notification(self, message: LubaMsg) -> None:
101
110
  """Handle protobuf notifications."""
102
111
  res = betterproto.which_one_of(message, "LubaSubMsg")
@@ -138,6 +147,11 @@ class StateManager:
138
147
  )
139
148
  if updated:
140
149
  await self.get_commondata_ack_callback(common_data)
150
+ case "todev_planjob_set":
151
+ planjob: NavPlanJobSet = nav_msg[1]
152
+ self._device.map.update_plan(Plan.from_dict(planjob.to_dict(casing=betterproto.Casing.SNAKE)))
153
+ await self.get_plan_callback(planjob)
154
+
141
155
  case "toapp_svg_msg":
142
156
  common_svg_data: SvgMessageAckT = nav_msg[1]
143
157
  updated = self._device.map.update(
@@ -10,7 +10,7 @@ from pymammotion.data.model import RegionData
10
10
  from pymammotion.data.model.device import MowingDevice
11
11
  from pymammotion.data.model.raw_data import RawMowerData
12
12
  from pymammotion.data.state_manager import StateManager
13
- from pymammotion.proto import LubaMsg, NavGetCommDataAck, NavGetHashListAck, SvgMessageAckT
13
+ from pymammotion.proto import LubaMsg, NavGetCommDataAck, NavGetHashListAck, NavPlanJobSet, SvgMessageAckT
14
14
  from pymammotion.utility.device_type import DeviceType
15
15
 
16
16
  _LOGGER = logging.getLogger(__name__)
@@ -89,6 +89,14 @@ class MammotionBaseDevice:
89
89
  region_data.current_frame = current_frame
90
90
  await self.queue_command("get_regional_data", regional_data=region_data)
91
91
 
92
+ async def plan_callback(self, plan: NavPlanJobSet) -> None:
93
+ if plan.plan_index != 0 and plan.total_plan_num - 1 != plan.plan_index:
94
+ index = plan.plan_index
95
+ while index in self.mower.map.plan and index < plan.total_plan_num:
96
+ index += 1
97
+ if index < plan.total_plan_num:
98
+ await self.queue_command("read_plan", plan_index=index)
99
+
92
100
  def _update_raw_data(self, data: bytes) -> None:
93
101
  """Update raw and model data from notifications."""
94
102
  tmp_msg = LubaMsg().parse(data)
@@ -216,7 +224,8 @@ class MammotionBaseDevice:
216
224
  if self._cloud_device and len(self.mower.map.area_name) == 0 and not DeviceType.is_luba1(self.mower.name):
217
225
  await self.queue_command("get_area_name_list", device_id=self._cloud_device.iotId)
218
226
 
219
- await self.queue_command("read_plan", sub_cmd=2, plan_index=0)
227
+ if len(self.mower.map.plan) == 0 or self.mower.map.plan[0].total_plan_num != len(self.mower.map.plan):
228
+ await self.queue_command("read_plan", sub_cmd=2, plan_index=0)
220
229
 
221
230
  for hash, frame in list(self.mower.map.area.items()):
222
231
  missing_frames = self.mower.map.find_missing_frames(frame)
@@ -91,6 +91,7 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
91
91
  self.set_queue_callback(self.queue_command)
92
92
  self._state_manager.ble_gethash_ack_callback = self.datahash_response
93
93
  self._state_manager.ble_get_commondata_ack_callback = self.commdata_response
94
+ self._state_manager.ble_get_plan_callback = self.plan_callback
94
95
  loop = asyncio.get_event_loop()
95
96
  loop.create_task(self.process_queue())
96
97
 
@@ -167,6 +167,7 @@ class MammotionBaseCloudDevice(MammotionBaseDevice):
167
167
  self._mqtt.on_connected_event.add_subscribers(self.on_connect)
168
168
  self._state_manager.cloud_gethash_ack_callback = self.datahash_response
169
169
  self._state_manager.cloud_get_commondata_ack_callback = self.commdata_response
170
+ self._state_manager.cloud_get_plan_callback = self.plan_callback
170
171
  self.set_queue_callback(self.queue_command)
171
172
 
172
173
  if self._mqtt.is_ready:
@@ -227,6 +228,9 @@ class MammotionBaseCloudDevice(MammotionBaseDevice):
227
228
  # self.mqtt._mqtt_client.thing_on_thing_enable(None)
228
229
 
229
230
  async def _ble_sync(self) -> None:
231
+ if self.stopped or self._mqtt.is_connected is False:
232
+ return
233
+
230
234
  command_bytes = self._commands.send_todev_ble_sync(3)
231
235
  try:
232
236
  await self._mqtt.send_command(self.iot_id, command_bytes)
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [project]
6
6
  name = "pymammotion"
7
- version = "0.4.21"
7
+ version = "0.4.23"
8
8
  license = "GPL-3.0"
9
9
  description = ""
10
10
  readme = "README.md"
@@ -66,7 +66,7 @@ autotyping = "^24.3.0"
66
66
  ipython = "^9.0.2"
67
67
 
68
68
  [tool.bumpver]
69
- current_version = "0.4.21"
69
+ current_version = "0.4.23"
70
70
  version_pattern = "MAJOR.MINOR.PATCH"
71
71
  commit_message = "Bump version {old_version} -> {new_version}"
72
72
  commit = true
File without changes
File without changes