pymammotion 0.5.42__tar.gz → 0.5.43__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.

Potentially problematic release.


This version of pymammotion might be problematic. Click here for more details.

Files changed (153) hide show
  1. {pymammotion-0.5.42 → pymammotion-0.5.43}/PKG-INFO +1 -1
  2. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/enums.py +2 -2
  3. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/hash_list.py +1 -1
  4. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/mqtt/event.py +47 -22
  5. pymammotion-0.5.43/pymammotion/data/mqtt/mammotion_properties.py +257 -0
  6. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/mqtt/properties.py +32 -29
  7. pymammotion-0.5.43/pymammotion/data/mqtt/status.py +53 -0
  8. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/http/http.py +7 -1
  9. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/devices/mammotion.py +1 -2
  10. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/devices/mammotion_cloud.py +22 -11
  11. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/devices/rtk_cloud.py +2 -2
  12. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mqtt/mammotion_mqtt.py +57 -17
  13. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/utility/datatype_converter.py +13 -12
  14. {pymammotion-0.5.42 → pymammotion-0.5.43}/pyproject.toml +2 -2
  15. pymammotion-0.5.42/pymammotion/data/mqtt/status.py +0 -52
  16. {pymammotion-0.5.42 → pymammotion-0.5.43}/.gitignore +0 -0
  17. {pymammotion-0.5.42 → pymammotion-0.5.43}/LICENSE +0 -0
  18. {pymammotion-0.5.42 → pymammotion-0.5.43}/README.md +0 -0
  19. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/__init__.py +0 -0
  20. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/aliyun/__init__.py +0 -0
  21. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/aliyun/client.py +0 -0
  22. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/aliyun/cloud_gateway.py +0 -0
  23. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/aliyun/model/aep_response.py +0 -0
  24. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/aliyun/model/connect_response.py +0 -0
  25. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/aliyun/model/dev_by_account_response.py +0 -0
  26. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/aliyun/model/login_by_oauth_response.py +0 -0
  27. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/aliyun/model/regions_response.py +0 -0
  28. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/aliyun/model/session_by_authcode_response.py +0 -0
  29. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/aliyun/model/thing_response.py +0 -0
  30. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/aliyun/regions.py +0 -0
  31. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/aliyun/tea/core.py +0 -0
  32. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/aliyun/tmp_constant.py +0 -0
  33. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/bluetooth/__init__.py +0 -0
  34. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/bluetooth/ble.py +0 -0
  35. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/bluetooth/ble_message.py +0 -0
  36. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/bluetooth/const.py +0 -0
  37. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/bluetooth/data/__init__.py +0 -0
  38. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/bluetooth/data/convert.py +0 -0
  39. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/bluetooth/data/framectrldata.py +0 -0
  40. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/bluetooth/data/notifydata.py +0 -0
  41. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/bluetooth/model/__init__.py +0 -0
  42. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/bluetooth/model/atomic_integer.py +0 -0
  43. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/const.py +0 -0
  44. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/__init__.py +0 -0
  45. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/__init__.py +0 -0
  46. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/account.py +0 -0
  47. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/device.py +0 -0
  48. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/device_config.py +0 -0
  49. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/device_info.py +0 -0
  50. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/device_limits.py +0 -0
  51. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/errors.py +0 -0
  52. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/excute_boarder_params.py +0 -0
  53. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/execute_boarder.py +0 -0
  54. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/generate_route_information.py +0 -0
  55. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/location.py +0 -0
  56. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/mowing_modes.py +0 -0
  57. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/rapid_state.py +0 -0
  58. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/raw_data.py +0 -0
  59. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/region_data.py +0 -0
  60. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/report_info.py +0 -0
  61. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/model/work.py +0 -0
  62. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/mower_state_manager.py +0 -0
  63. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/data/mqtt/__init__.py +0 -0
  64. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/event/__init__.py +0 -0
  65. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/event/event.py +0 -0
  66. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/homeassistant/__init__.py +0 -0
  67. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/homeassistant/mower_api.py +0 -0
  68. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/homeassistant/rtk_api.py +0 -0
  69. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/http/__init__.py +0 -0
  70. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/http/_init_.py +0 -0
  71. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/http/encryption.py +0 -0
  72. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/http/model/__init__.py +0 -0
  73. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/http/model/camera_stream.py +0 -0
  74. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/http/model/http.py +0 -0
  75. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/http/model/response_factory.py +0 -0
  76. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/http/model/rtk.py +0 -0
  77. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/__init__.py +0 -0
  78. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/commands/__init__.py +0 -0
  79. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/commands/abstract_message.py +0 -0
  80. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/commands/mammotion_command.py +0 -0
  81. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/commands/messages/__init__.py +0 -0
  82. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/commands/messages/basestation.py +0 -0
  83. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/commands/messages/driver.py +0 -0
  84. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/commands/messages/media.py +0 -0
  85. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/commands/messages/navigation.py +0 -0
  86. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/commands/messages/network.py +0 -0
  87. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/commands/messages/ota.py +0 -0
  88. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/commands/messages/system.py +0 -0
  89. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/commands/messages/video.py +0 -0
  90. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/control/__init__.py +0 -0
  91. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/control/joystick.py +0 -0
  92. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/devices/__init__.py +0 -0
  93. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/devices/base.py +0 -0
  94. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/devices/mammotion_bluetooth.py +0 -0
  95. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/devices/mammotion_mower_ble.py +0 -0
  96. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/devices/mammotion_mower_cloud.py +0 -0
  97. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/devices/managers/managers.py +0 -0
  98. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/devices/mower_device.py +0 -0
  99. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/devices/mower_manager.py +0 -0
  100. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/devices/rtk_ble.py +0 -0
  101. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/devices/rtk_device.py +0 -0
  102. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mammotion/devices/rtk_manager.py +0 -0
  103. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mqtt/__init__.py +0 -0
  104. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mqtt/aliyun_mqtt.py +0 -0
  105. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mqtt/linkkit/__init__.py +0 -0
  106. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mqtt/linkkit/h2client.py +0 -0
  107. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mqtt/linkkit/linkkit.py +0 -0
  108. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mqtt/mammotion_future.py +0 -0
  109. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/mqtt/mqtt_models.py +0 -0
  110. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/__init__.py +0 -0
  111. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/basestation.proto +0 -0
  112. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/basestation_pb2.py +0 -0
  113. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/basestation_pb2.pyi +0 -0
  114. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/common.proto +0 -0
  115. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/common_pb2.py +0 -0
  116. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/common_pb2.pyi +0 -0
  117. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/dev_net.proto +0 -0
  118. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/dev_net_pb2.py +0 -0
  119. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/dev_net_pb2.pyi +0 -0
  120. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/luba_msg.proto +0 -0
  121. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/luba_msg_pb2.py +0 -0
  122. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/luba_msg_pb2.pyi +0 -0
  123. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/luba_mul.proto +0 -0
  124. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/luba_mul_pb2.py +0 -0
  125. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/luba_mul_pb2.pyi +0 -0
  126. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/mctrl_driver.proto +0 -0
  127. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/mctrl_driver_pb2.py +0 -0
  128. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/mctrl_driver_pb2.pyi +0 -0
  129. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/mctrl_nav.proto +0 -0
  130. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/mctrl_nav_pb2.py +0 -0
  131. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/mctrl_nav_pb2.pyi +0 -0
  132. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/mctrl_ota.proto +0 -0
  133. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/mctrl_ota_pb2.py +0 -0
  134. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/mctrl_ota_pb2.pyi +0 -0
  135. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/mctrl_pept.proto +0 -0
  136. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/mctrl_pept_pb2.py +0 -0
  137. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/mctrl_pept_pb2.pyi +0 -0
  138. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/mctrl_sys.proto +0 -0
  139. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/mctrl_sys_pb2.py +0 -0
  140. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/mctrl_sys_pb2.pyi +0 -0
  141. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/message_pool.py +0 -0
  142. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/proto/py.typed +0 -0
  143. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/py.typed +0 -0
  144. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/utility/constant/__init__.py +0 -0
  145. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/utility/constant/device_constant.py +0 -0
  146. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/utility/conversions.py +0 -0
  147. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/utility/device_config.py +0 -0
  148. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/utility/device_type.py +0 -0
  149. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/utility/map.py +0 -0
  150. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/utility/movement.py +0 -0
  151. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/utility/mur_mur_hash.py +0 -0
  152. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/utility/periodic.py +0 -0
  153. {pymammotion-0.5.42 → pymammotion-0.5.43}/pymammotion/utility/rocker_util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pymammotion
3
- Version: 0.5.42
3
+ Version: 0.5.43
4
4
  Author: jLynx
5
5
  Author-email: Michael Arthur <michael@jumblesoft.co.nz>
6
6
  License-Expression: GPL-3.0
@@ -19,7 +19,7 @@ class PositionMode(Enum):
19
19
  UNKNOWN = 4
20
20
 
21
21
  @staticmethod
22
- def from_value(value: int):
22
+ def from_value(value: int) -> "PositionMode":
23
23
  if value == 0:
24
24
  return PositionMode.FIX
25
25
  elif value == 1:
@@ -52,7 +52,7 @@ class RTKStatus(Enum):
52
52
  UNKNOWN = 6
53
53
 
54
54
  @staticmethod
55
- def from_value(value: int):
55
+ def from_value(value: int) -> "RTKStatus":
56
56
  if value == 0:
57
57
  return RTKStatus.NONE
58
58
  elif value == 1 or value == 2:
@@ -220,7 +220,7 @@ class HashList(DataClassORJSONMixin):
220
220
  self.svg = {hash_id: frames for hash_id, frames in self.svg.items() if hash_id in hashlist}
221
221
 
222
222
  area_hashes = list(self.area.keys())
223
- for hash_id, plan_task in self.plan.items():
223
+ for hash_id, plan_task in self.plan.copy().items():
224
224
  for item in plan_task.zone_hashs:
225
225
  if item not in area_hashes:
226
226
  self.plan.pop(hash_id)
@@ -1,10 +1,10 @@
1
1
  from base64 import b64decode
2
2
  from dataclasses import dataclass
3
- from typing import Any, Literal
3
+ from typing import Annotated, Any, Literal
4
4
 
5
5
  from google.protobuf import json_format
6
6
  from mashumaro.mixins.orjson import DataClassORJSONMixin
7
- from mashumaro.types import SerializableType
7
+ from mashumaro.types import Alias, SerializableType
8
8
 
9
9
  from pymammotion.proto import luba_msg_pb2
10
10
 
@@ -73,34 +73,35 @@ class DeviceBizReqEventValue(DataClassORJSONMixin):
73
73
 
74
74
  @dataclass
75
75
  class GeneralParams(DataClassORJSONMixin):
76
- groupIdList: list[str]
77
- groupId: str
78
- categoryKey: Literal["LawnMower", "Tracker"]
79
- batchId: str
80
- gmtCreate: int
81
- productKey: str
76
+ group_id_list: Annotated[list[str], Alias("groupIdList")]
77
+ group_id: Annotated[str, Alias("groupId")]
78
+ category_key: Annotated[Literal["LawnMower", "Tracker"], Alias("categoryKey")]
79
+ batch_id: Annotated[str, Alias("batchId")]
80
+ gmt_create: Annotated[int, Alias("gmtCreate")]
81
+ product_key: Annotated[str, Alias("productKey")]
82
82
  type: str
83
- deviceName: str
84
- iotId: str
85
- checkLevel: int
83
+ device_name: Annotated[str, Alias("deviceName")]
84
+ iot_id: Annotated[str, Alias("iotId")]
85
+ check_level: Annotated[int, Alias("checkLevel")]
86
86
  namespace: str
87
- tenantId: str
87
+ tenant_id: Annotated[str, Alias("tenantId")]
88
88
  name: str
89
- thingType: Literal["DEVICE"]
89
+ thing_type: Annotated[Literal["DEVICE"], Alias("thingType")]
90
90
  time: int
91
- tenantInstanceId: str
91
+ tenant_instance_id: Annotated[str, Alias("tenantInstanceId")]
92
92
  value: Any
93
93
 
94
+ # Optional fields
94
95
  identifier: str | None = None
95
- checkFailedData: dict | None = None
96
- _tenantId: str | None = None
97
- generateTime: int | None = None
98
- JMSXDeliveryCount: int | None = None
96
+ check_failed_data: Annotated[dict | None, Alias("checkFailedData")] = None
97
+ _tenant_id: Annotated[str | None, Alias("_tenantId")] = None
98
+ generate_time: Annotated[int | None, Alias("generateTime")] = None
99
+ jmsx_delivery_count: Annotated[int | None, Alias("JMSXDeliveryCount")] = None
99
100
  qos: int | None = None
100
- requestId: str | None = None
101
- _categoryKey: str | None = None
102
- deviceType: str | None = None
103
- _traceId: str | None = None
101
+ request_id: Annotated[str | None, Alias("requestId")] = None
102
+ _category_key: Annotated[str | None, Alias("_categoryKey")] = None
103
+ device_type: Annotated[str | None, Alias("deviceType")] = None
104
+ _trace_id: Annotated[str | None, Alias("_traceId")] = None
104
105
 
105
106
 
106
107
  @dataclass
@@ -196,3 +197,27 @@ class ThingEventMessage(DataClassORJSONMixin):
196
197
  raise ValueError(f"Unknown identifier: {identifier} {params_dict}")
197
198
 
198
199
  return cls(method=method, id=event_id, params=params_obj, version=version)
200
+
201
+
202
+ @dataclass
203
+ class MammotionProtoMsgParams(DataClassORJSONMixin, SerializableType):
204
+ value: DeviceProtobufMsgEventValue
205
+ iot_id: str = ""
206
+ product_key: str = ""
207
+ device_name: str = ""
208
+
209
+ @classmethod
210
+ def _deserialize(cls, d: dict[str, Any]) -> "MammotionProtoMsgParams":
211
+ """Override from_dict to allow dict manipulation before conversion."""
212
+ proto: str = d["content"]
213
+
214
+ return cls(value=DeviceProtobufMsgEventValue(content=proto))
215
+
216
+
217
+ @dataclass
218
+ class MammotionEventMessage(DataClassORJSONMixin):
219
+ id: str
220
+ version: str
221
+ sys: dict
222
+ params: MammotionProtoMsgParams
223
+ method: str
@@ -0,0 +1,257 @@
1
+ from dataclasses import dataclass
2
+ from typing import Annotated
3
+
4
+ from mashumaro.config import BaseConfig
5
+ from mashumaro.mixins.orjson import DataClassORJSONMixin
6
+ from mashumaro.types import Alias
7
+
8
+
9
+ @dataclass
10
+ class FirmwareInfo(DataClassORJSONMixin):
11
+ t: str
12
+ c: str
13
+ v: str
14
+
15
+
16
+ @dataclass
17
+ class DeviceVersionInfo(DataClassORJSONMixin):
18
+ dev_ver: Annotated[str, Alias("devVer")]
19
+ whole: int
20
+ fw_info: Annotated[list[FirmwareInfo], Alias("fwInfo")]
21
+
22
+
23
+ @dataclass
24
+ class Coordinate(DataClassORJSONMixin):
25
+ lon: float
26
+ lat: float
27
+
28
+
29
+ @dataclass
30
+ class InternalNavigation(DataClassORJSONMixin):
31
+ nav: Annotated[str, Alias("NAV")]
32
+ pau: Annotated[str, Alias("Pau")]
33
+ r_pau: Annotated[str, Alias("rPau")]
34
+ mcu: Annotated[str, Alias("MCU")]
35
+ app: Annotated[str, Alias("APP")]
36
+ w_slp: Annotated[str, Alias("wSlp")]
37
+ i_slp: Annotated[str, Alias("iSlp")]
38
+
39
+
40
+ @dataclass
41
+ class BandwidthTraffic(DataClassORJSONMixin):
42
+ iot: Annotated[str, Alias("IoT")]
43
+ roi: Annotated[str, Alias("RoI")]
44
+ fpv: Annotated[str, Alias("FPV")]
45
+ inav: InternalNavigation
46
+
47
+
48
+ @dataclass
49
+ class TrafficPeriod(DataClassORJSONMixin):
50
+ r: str
51
+ t: str
52
+ s: str
53
+
54
+
55
+ @dataclass
56
+ class TrafficData(DataClassORJSONMixin):
57
+ upt: str
58
+ hour: Annotated[dict[str, TrafficPeriod], Alias("Hour")]
59
+ day: Annotated[dict[str, TrafficPeriod], Alias("Day")]
60
+ mon: Annotated[dict[str, TrafficPeriod], Alias("Mon")]
61
+
62
+
63
+ @dataclass
64
+ class NetworkInfo(DataClassORJSONMixin):
65
+ ssid: str
66
+ ip: str
67
+ wifi_sta_mac: str
68
+ wifi_rssi: int
69
+ wifi_available: int
70
+ bt_mac: str
71
+ mnet_model: str
72
+ imei: str
73
+ fw_ver: str
74
+ sim: str
75
+ imsi: str
76
+ iccid: str
77
+ sim_source: str
78
+ mnet_rssi: int
79
+ signal: int
80
+ mnet_link: int
81
+ mnet_option: str
82
+ mnet_ip: str
83
+ mnet_reg: str
84
+ mnet_rsrp: str
85
+ mnet_snr: str
86
+ mnet_enable: int
87
+ apn_num: int
88
+ apn_info: str
89
+ apn_cid: int
90
+ used_net: int
91
+ hub_reset: int
92
+ mnet_dis: int
93
+ airplane_times: int
94
+ lsusb_num: int
95
+ b_tra: Annotated[BandwidthTraffic, Alias("bTra")]
96
+ bw_tra: Annotated[BandwidthTraffic, Alias("bwTra")]
97
+ mnet_rx: str
98
+ mnet_tx: str
99
+ m_tra: Annotated[TrafficData, Alias("mTra")]
100
+ mnet_uniot: int
101
+ mnet_un_getiot: int
102
+ ssh_flag: str
103
+ mileage: str
104
+ work_time: str
105
+ wt_sec: int
106
+ bat_cycles: str
107
+
108
+
109
+ @dataclass
110
+ class DeviceOtherInfo(DataClassORJSONMixin):
111
+ soc_up_time: Annotated[int, Alias("socUpTime")]
112
+ mcu_up_time: Annotated[int, Alias("mcuUpTime")]
113
+ soc_loads: Annotated[str, Alias("socLoads")]
114
+ soc_mem_free: Annotated[int, Alias("socMemFree")]
115
+ soc_mem_total: Annotated[int, Alias("socMemTotal")]
116
+ soc_mmc_life_time: Annotated[int, Alias("socMmcLifeTime")]
117
+ usb_dis_cnt: Annotated[int, Alias("usbDisCnt")]
118
+ soc_pstore: Annotated[int, Alias("socPstore")]
119
+ soc_coredump: Annotated[int, Alias("socCoredump")]
120
+ soc_tmp: Annotated[int, Alias("socTmp")]
121
+ mc_mcu: Annotated[str, Alias("mcMcu")]
122
+ tilt_degree: str
123
+ i_msg_free: Annotated[int, Alias("iMsgFree")]
124
+ i_msg_limit: Annotated[int, Alias("iMsgLimit")]
125
+ i_msg_raw: Annotated[int, Alias("iMsgRaw")]
126
+ i_msg_prop: Annotated[int, Alias("iMsgprop")]
127
+ i_msg_serv: Annotated[int, Alias("iMsgServ")]
128
+ i_msg_info: Annotated[int, Alias("iMsgInfo")]
129
+ i_msg_warn: Annotated[int, Alias("iMsgWarn")]
130
+ i_msg_fault: Annotated[int, Alias("iMsgFault")]
131
+ i_msg_ota_stage: Annotated[int, Alias("iMsgOtaStage")]
132
+ i_msg_protobuf: Annotated[int, Alias("iMsgProtobuf")]
133
+ i_msg_notify: Annotated[int, Alias("iMsgNotify")]
134
+ i_msg_log_prog: Annotated[int, Alias("iMsgLogProg")]
135
+ i_msg_biz_req: Annotated[int, Alias("iMsgBizReq")]
136
+ i_msg_cfg_req: Annotated[int, Alias("iMsgCfgReq")]
137
+ i_msg_voice: Annotated[int, Alias("iMsgVoice")]
138
+ i_msg_warn_code: Annotated[int, Alias("iMsgWarnCode")]
139
+ pb_net: Annotated[int, Alias("pbNet")]
140
+ pb_sys: Annotated[int, Alias("pbSys")]
141
+ pb_nav: Annotated[int, Alias("pbNav")]
142
+ pb_local: Annotated[int, Alias("pbLocal")]
143
+ pb_plan: Annotated[int, Alias("pbPlan")]
144
+ pb_e_drv: Annotated[int, Alias("pbEDrv")]
145
+ pb_e_sys: Annotated[int, Alias("pbESys")]
146
+ pb_midware: Annotated[int, Alias("pbMidware")]
147
+ pb_ota: Annotated[int, Alias("pbOta")]
148
+ pb_appl: Annotated[int, Alias("pbAppl")]
149
+ pb_mul: Annotated[int, Alias("pbMul")]
150
+ pb_other: Annotated[int, Alias("pbOther")]
151
+ lora_connect: Annotated[int, Alias("loraConnect")]
152
+ base_status: Annotated[int, Alias("Basestatus")]
153
+ mqtt_rtk_switch: int
154
+ mqtt_rtk_channel: int
155
+ mqtt_rtk_status: int
156
+ mqtt_rtcm_cnt: int
157
+ mqtt_conn_cnt: int
158
+ mqtt_disconn_cnt: int
159
+ mqtt_rtk_hb_flag: int
160
+ mqtt_rtk_hb_count: int
161
+ mqtt_start_cnt: int
162
+ mqtt_close_cnt: int
163
+ mqtt_rtk_ssl_fail: int
164
+ mqtt_rtk_wifi_config: int
165
+ nrtk_svc_prov: int
166
+ nrtk_svc_err: int
167
+ base_stn_id: int
168
+ rtk_status: int
169
+ charge_status: int
170
+ chassis_state: int
171
+ nav: str
172
+ ins_fusion: str
173
+ perception: str
174
+ vision_proxy: str
175
+ vslam_vio: str
176
+ iot_con_timeout: int
177
+ iot_con: int
178
+ iot_con_fail_max: str
179
+ iot_con_fail_min: Annotated[str, Alias("iot_con__fail_min")]
180
+ iot_url_count: int
181
+ iot_url_max: str
182
+ iot_url_min: str
183
+ iot_cn: int
184
+ iot_ap: int
185
+ iot_us: int
186
+ iot_eu: int
187
+ task_area: float
188
+ task_count: int
189
+ task_hash: str
190
+ systemio_boot_time: Annotated[str, Alias("systemioBootTime")]
191
+ dds_no_gdc: int
192
+
193
+
194
+ @dataclass
195
+ class CheckData(DataClassORJSONMixin):
196
+ result: str
197
+ error: Annotated[list[int], Alias("Error")]
198
+ warn: Annotated[list[int], Alias("Warn")]
199
+ ok: Annotated[list[int], Alias("OK")]
200
+
201
+
202
+ @dataclass
203
+ class DeviceProperties(DataClassORJSONMixin):
204
+ device_state: Annotated[int, Alias("deviceState")]
205
+ battery_percentage: Annotated[int, Alias("batteryPercentage")]
206
+ device_version: Annotated[str, Alias("deviceVersion")]
207
+ knife_height: Annotated[int, Alias("knifeHeight")]
208
+ lora_general_config: Annotated[str, Alias("loraGeneralConfig")]
209
+ ext_mod: Annotated[str, Alias("extMod")]
210
+ int_mod: Annotated[str, Alias("intMod")]
211
+ iot_state: Annotated[int, Alias("iotState")]
212
+ iot_msg_total: Annotated[int, Alias("iotMsgTotal")]
213
+ iot_msg_hz: Annotated[int, Alias("iotMsgHz")]
214
+ lt_mr_mod: Annotated[str, Alias("ltMrMod")]
215
+ rt_mr_mod: Annotated[str, Alias("rtMrMod")]
216
+ bms_hardware_version: Annotated[str, Alias("bmsHardwareVersion")]
217
+ stm32_h7_version: Annotated[str, Alias("stm32H7Version")]
218
+ left_motor_version: Annotated[str, Alias("leftMotorVersion")]
219
+ right_motor_version: Annotated[str, Alias("rightMotorVersion")]
220
+ rtk_version: Annotated[str, Alias("rtkVersion")]
221
+ bms_version: Annotated[str, Alias("bmsVersion")]
222
+ mc_boot_version: Annotated[str, Alias("mcBootVersion")]
223
+ left_motor_boot_version: Annotated[str, Alias("leftMotorBootVersion")]
224
+ right_motor_boot_version: Annotated[str, Alias("rightMotorBootVersion")]
225
+
226
+ # Nested JSON objects
227
+ device_version_info: Annotated[DeviceVersionInfo, Alias("deviceVersionInfo")]
228
+ coordinate: Coordinate
229
+ device_other_info: Annotated[DeviceOtherInfo, Alias("deviceOtherInfo")]
230
+ network_info: Annotated[NetworkInfo, Alias("networkInfo")]
231
+ check_data: Annotated[CheckData, Alias("checkData")]
232
+ iot_id: str = ""
233
+
234
+ class Config(BaseConfig):
235
+ # Custom deserializer for nested JSON strings
236
+ serialization_strategy = {
237
+ DeviceVersionInfo: {
238
+ "deserialize": lambda x: DeviceVersionInfo.from_json(x) if isinstance(x, str) else x,
239
+ "serialize": lambda x: x.to_json() if hasattr(x, "to_json") else x,
240
+ },
241
+ Coordinate: {
242
+ "deserialize": lambda x: Coordinate.from_json(x) if isinstance(x, str) else x,
243
+ "serialize": lambda x: x.to_json() if hasattr(x, "to_json") else x,
244
+ },
245
+ DeviceOtherInfo: {
246
+ "deserialize": lambda x: DeviceOtherInfo.from_json(x) if isinstance(x, str) else x,
247
+ "serialize": lambda x: x.to_json() if hasattr(x, "to_json") else x,
248
+ },
249
+ NetworkInfo: {
250
+ "deserialize": lambda x: NetworkInfo.from_json(x) if isinstance(x, str) else x,
251
+ "serialize": lambda x: x.to_json() if hasattr(x, "to_json") else x,
252
+ },
253
+ CheckData: {
254
+ "deserialize": lambda x: CheckData.from_json(x) if isinstance(x, str) else x,
255
+ "serialize": lambda x: x.to_json() if hasattr(x, "to_json") else x,
256
+ },
257
+ }
@@ -1,16 +1,11 @@
1
1
  from dataclasses import dataclass
2
- from typing import Any, Generic, Literal, TypeVar, Union
2
+ from typing import Annotated, Any, Generic, Literal, TypeVar, Union
3
3
 
4
4
  from mashumaro import DataClassDictMixin
5
5
  from mashumaro.mixins.orjson import DataClassORJSONMixin
6
+ from mashumaro.types import Alias
6
7
 
7
- DataT = TypeVar("DataT")
8
-
9
-
10
- @dataclass
11
- class Item(DataClassDictMixin, Generic[DataT]):
12
- time: int
13
- value: DataT
8
+ from pymammotion.data.mqtt.mammotion_properties import DeviceProperties
14
9
 
15
10
 
16
11
  @dataclass
@@ -163,29 +158,29 @@ class Items(DataClassDictMixin):
163
158
 
164
159
  @dataclass
165
160
  class Params(DataClassORJSONMixin):
166
- deviceType: Literal["LawnMower", "Tracker"]
167
- checkFailedData: dict
168
- groupIdList: list[str]
169
- _tenantId: str
170
- groupId: str
171
- categoryKey: Literal["LawnMower", "Tracker"]
172
- batchId: str
173
- gmtCreate: int
174
- productKey: str
175
- generateTime: int
176
- deviceName: str
177
- _traceId: str
178
- iotId: str
179
- JMSXDeliveryCount: int
180
- checkLevel: int
161
+ device_type: Annotated[Literal["LawnMower", "Tracker"], Alias("deviceType")]
162
+ check_failed_data: Annotated[dict[str, Any], Alias("checkFailedData")]
163
+ group_id_list: Annotated[list[str], Alias("groupIdList")]
164
+ _tenant_id: Annotated[str, Alias("_tenantId")]
165
+ group_id: Annotated[str, Alias("groupId")]
166
+ category_key: Annotated[Literal["LawnMower", "Tracker"], Alias("categoryKey")]
167
+ batch_id: Annotated[str, Alias("batchId")]
168
+ gmt_create: Annotated[int, Alias("gmtCreate")]
169
+ product_key: Annotated[str, Alias("productKey")]
170
+ generate_time: Annotated[int, Alias("generateTime")]
171
+ device_name: Annotated[str, Alias("deviceName")]
172
+ _trace_id: Annotated[str, Alias("_traceId")]
173
+ iot_id: Annotated[str, Alias("iotId")]
174
+ jmsx_delivery_count: Annotated[int, Alias("JMSXDeliveryCount")]
175
+ check_level: Annotated[int, Alias("checkLevel")]
181
176
  qos: int
182
- requestId: str
183
- _categoryKey: str
177
+ request_id: Annotated[str, Alias("requestId")]
178
+ _category_key: Annotated[str, Alias("_categoryKey")]
184
179
  namespace: str
185
- tenantId: str
186
- thingType: Literal["DEVICE"]
187
- items: Items
188
- tenantInstanceId: str
180
+ tenant_id: Annotated[str, Alias("tenantId")]
181
+ thing_type: Annotated[Literal["DEVICE"], Alias("thingType")]
182
+ items: Annotated["Items", Alias("items")]
183
+ tenant_instance_id: Annotated[str, Alias("tenantInstanceId")]
189
184
 
190
185
 
191
186
  @dataclass
@@ -194,3 +189,11 @@ class ThingPropertiesMessage(DataClassORJSONMixin):
194
189
  id: str
195
190
  params: Params
196
191
  version: Literal["1.0"]
192
+
193
+
194
+ @dataclass
195
+ class MammotionPropertiesMessage(DataClassORJSONMixin):
196
+ id: str
197
+ version: str
198
+ sys: dict
199
+ params: DeviceProperties
@@ -0,0 +1,53 @@
1
+ from dataclasses import dataclass
2
+ from enum import Enum
3
+ from typing import Annotated, Literal
4
+
5
+ from mashumaro.mixins.orjson import DataClassORJSONMixin
6
+ from mashumaro.types import Alias
7
+
8
+
9
+ @dataclass
10
+ class GroupIdListItem(DataClassORJSONMixin):
11
+ groupId: str
12
+ groupType: Literal["ISOLATION", "ILOP_APP"]
13
+
14
+
15
+ # are there other values?
16
+ class StatusType(Enum):
17
+ CONNECTED = 1
18
+ DISCONNECTED = 3
19
+
20
+
21
+ @dataclass
22
+ class Status(DataClassORJSONMixin):
23
+ time: int
24
+ value: StatusType
25
+
26
+
27
+ @dataclass
28
+ class Params(DataClassORJSONMixin):
29
+ group_id_list: Annotated[list[GroupIdListItem], Alias("groupIdList")]
30
+ net_type: Annotated[Literal["NET_WIFI", "NET_MNET"], Alias("netType")]
31
+ active_time: Annotated[int, Alias("activeTime")]
32
+ ip: str
33
+ aliyun_commodity_code: Annotated[Literal["iothub_senior"], Alias("aliyunCommodityCode")]
34
+ category_key: Annotated[Literal["LawnMower", "Tracker"], Alias("categoryKey")]
35
+ node_type: Annotated[Literal["DEVICE"], Alias("nodeType")]
36
+ product_key: Annotated[str, Alias("productKey")]
37
+ status_last: Annotated[int, Alias("statusLast")]
38
+ device_name: Annotated[str, Alias("deviceName")]
39
+ iot_id: Annotated[str, Alias("iotId")]
40
+ namespace: str
41
+ tenant_id: Annotated[str, Alias("tenantId")]
42
+ thing_type: Annotated[Literal["DEVICE"], Alias("thingType")]
43
+ tenant_instance_id: Annotated[str, Alias("tenantInstanceId")]
44
+ category_id: Annotated[int, Alias("categoryId")]
45
+ status: Annotated[Status, Alias("status")]
46
+
47
+
48
+ @dataclass
49
+ class ThingStatusMessage(DataClassORJSONMixin):
50
+ method: Literal["thing.status"]
51
+ id: str
52
+ params: Params
53
+ version: Literal["1.0"]
@@ -370,7 +370,13 @@ class MammotionHTTP:
370
370
  async with ClientSession(self.jwt_info.iot) as session:
371
371
  async with session.post(
372
372
  "/v1/mqtt/rpc/thing/service/invoke",
373
- json={"args": {"content": content, "deviceName": device_name, "iotId": iot_id, "productKey": ""}},
373
+ json={
374
+ "args": {"content": content},
375
+ "deviceName": device_name,
376
+ "identifier": "device_protobuf_sync_service",
377
+ "iotId": iot_id,
378
+ "productKey": "",
379
+ },
374
380
  headers={
375
381
  **self._headers,
376
382
  "Authorization": f"Bearer {self.login_info.access_token}",
@@ -289,8 +289,7 @@ class Mammotion:
289
289
  if len(mammotion_http.device_records.records) != 0:
290
290
  mammotion_cloud = MammotionCloud(
291
291
  MammotionMQTT(
292
- product_key=cloud_client.aep_response.data.productKey,
293
- device_name=cloud_client.aep_response.data.deviceName,
292
+ records=mammotion_http.device_records.records,
294
293
  mammotion_http=mammotion_http,
295
294
  mqtt_connection=mammotion_http.mqtt_credentials,
296
295
  ),
@@ -15,8 +15,8 @@ from pymammotion import AliyunMQTT, CloudIOTGateway, MammotionMQTT
15
15
  from pymammotion.aliyun.cloud_gateway import DeviceOfflineException
16
16
  from pymammotion.aliyun.model.dev_by_account_response import Device
17
17
  from pymammotion.data.mower_state_manager import MowerStateManager
18
- from pymammotion.data.mqtt.event import ThingEventMessage
19
- from pymammotion.data.mqtt.properties import ThingPropertiesMessage
18
+ from pymammotion.data.mqtt.event import MammotionEventMessage, ThingEventMessage
19
+ from pymammotion.data.mqtt.properties import MammotionPropertiesMessage, ThingPropertiesMessage
20
20
  from pymammotion.data.mqtt.status import ThingStatusMessage
21
21
  from pymammotion.event.event import DataEvent
22
22
  from pymammotion.mammotion.commands.mammotion_command import MammotionCommand
@@ -112,10 +112,9 @@ class MammotionCloud:
112
112
  # _LOGGER.debug("MQTT message received on topic %s: %s, iot_id: %s", topic, payload, iot_id)
113
113
  json_str = payload.decode("utf-8")
114
114
  dict_payload = json.loads(json_str)
115
- print(dict_payload)
116
- await self._parse_mqtt_response(topic, dict_payload)
115
+ await self._parse_mqtt_response(topic, dict_payload, iot_id)
117
116
 
118
- async def _parse_mqtt_response(self, topic: str, payload: dict) -> None:
117
+ async def _parse_mqtt_response(self, topic: str, payload: dict, iot_id: str) -> None:
119
118
  """Parse and handle MQTT responses based on the topic.
120
119
 
121
120
  This function processes different types of MQTT messages received from various
@@ -150,6 +149,17 @@ class MammotionCloud:
150
149
  property_event = ThingPropertiesMessage.from_dict(payload)
151
150
  await self.mqtt_properties_event.data_event(property_event)
152
151
 
152
+ if topic.endswith("/thing/event/device_protobuf_msg_event/post"):
153
+ _LOGGER.debug("Mammotion Thing event received")
154
+ mammotion_event = MammotionEventMessage.from_dict(payload)
155
+ mammotion_event.params.iot_id = iot_id
156
+ await self.mqtt_message_event.data_event(mammotion_event)
157
+ elif topic.endswith("/thing/event/property/post"):
158
+ _LOGGER.debug("Mammotion Property event received")
159
+ mammotion_property_event = MammotionPropertiesMessage.from_dict(payload)
160
+ mammotion_property_event.params.iot_id = iot_id
161
+ await self.mqtt_properties_event.data_event(mammotion_property_event)
162
+
153
163
  def _disconnect(self) -> None:
154
164
  """Disconnect the MQTT client."""
155
165
  self._mqtt_client.disconnect()
@@ -229,6 +239,7 @@ class MammotionBaseCloudDevice(MammotionBaseDevice):
229
239
  self.stopped = True
230
240
 
231
241
  async def start(self) -> None:
242
+ """Start the device connection."""
232
243
  self.stopped = False
233
244
  if not self.mqtt.is_connected():
234
245
  loop = asyncio.get_running_loop()
@@ -277,18 +288,18 @@ class MammotionBaseCloudDevice(MammotionBaseDevice):
277
288
  return None
278
289
 
279
290
  async def _parse_message_properties_for_device(self, event: ThingPropertiesMessage) -> None:
280
- if event.params.iotId != self.iot_id:
291
+ if event.params.iot_id != self.iot_id:
281
292
  return
282
293
  await self.state_manager.properties(event)
283
294
 
284
295
  async def _parse_message_status_for_device(self, status: ThingStatusMessage) -> None:
285
- if status.params.iotId != self.iot_id:
296
+ if status.params.iot_id != self.iot_id:
286
297
  return
287
298
  await self.state_manager.status(status)
288
299
 
289
300
  async def _parse_device_event_for_device(self, status: ThingStatusMessage) -> None:
290
301
  """Process device event if it matches the device's IoT ID."""
291
- if status.params.iotId != self.iot_id:
302
+ if status.params.iot_id != self.iot_id:
292
303
  return
293
304
  await self.state_manager.device_event(status)
294
305
 
@@ -307,7 +318,7 @@ class MammotionBaseCloudDevice(MammotionBaseDevice):
307
318
  """
308
319
  params = event.params
309
320
  new_msg = LubaMsg()
310
- if event.params.iotId != self.iot_id:
321
+ if event.params.iot_id != self.iot_id:
311
322
  return
312
323
  binary_data = base64.b64decode(params.value.content)
313
324
  try:
@@ -318,9 +329,9 @@ class MammotionBaseCloudDevice(MammotionBaseDevice):
318
329
 
319
330
  if (
320
331
  self._commands.get_device_product_key() == ""
321
- and self._commands.get_device_name() == event.params.deviceName
332
+ and self._commands.get_device_name() == event.params.device_name
322
333
  ):
323
- self._commands.set_device_product_key(event.params.productKey)
334
+ self._commands.set_device_product_key(event.params.product_key)
324
335
 
325
336
  res = betterproto2.which_one_of(new_msg, "LubaSubMsg")
326
337
  if res[0] == "net":
@@ -96,14 +96,14 @@ class MammotionRTKCloudDevice(MammotionRTKDevice):
96
96
 
97
97
  async def _parse_message_properties_for_device(self, event: ThingPropertiesMessage) -> None:
98
98
  """Parse property messages for this RTK device."""
99
- if event.params.iotId != self.iot_id:
99
+ if event.params.iot_id != self.iot_id:
100
100
  return
101
101
  # RTK devices have simpler properties - update as needed
102
102
  _LOGGER.debug("RTK properties update: %s", event)
103
103
 
104
104
  async def _parse_message_status_for_device(self, status: ThingStatusMessage) -> None:
105
105
  """Parse status messages for this RTK device."""
106
- if status.params.iotId != self.iot_id:
106
+ if status.params.iot_id != self.iot_id:
107
107
  return
108
108
  # Update online status
109
109
  self._rtk_device.online = True