pymammotion 0.4.0a2__py3-none-any.whl → 0.5.51__py3-none-any.whl

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 (133) hide show
  1. pymammotion/__init__.py +5 -4
  2. pymammotion/aliyun/client.py +235 -0
  3. pymammotion/aliyun/cloud_gateway.py +312 -64
  4. pymammotion/aliyun/model/aep_response.py +1 -2
  5. pymammotion/aliyun/model/dev_by_account_response.py +170 -23
  6. pymammotion/aliyun/model/login_by_oauth_response.py +2 -3
  7. pymammotion/aliyun/model/regions_response.py +3 -3
  8. pymammotion/aliyun/model/session_by_authcode_response.py +2 -2
  9. pymammotion/aliyun/model/thing_response.py +12 -0
  10. pymammotion/aliyun/regions.py +62 -0
  11. pymammotion/aliyun/tea/core.py +297 -0
  12. pymammotion/bluetooth/ble.py +7 -9
  13. pymammotion/bluetooth/ble_message.py +10 -14
  14. pymammotion/const.py +3 -0
  15. pymammotion/data/model/__init__.py +1 -2
  16. pymammotion/data/model/device.py +95 -27
  17. pymammotion/data/model/device_config.py +4 -4
  18. pymammotion/data/model/device_info.py +35 -0
  19. pymammotion/data/model/device_limits.py +10 -10
  20. pymammotion/data/model/enums.py +12 -2
  21. pymammotion/data/model/errors.py +12 -0
  22. pymammotion/data/model/events.py +14 -0
  23. pymammotion/data/model/generate_geojson.py +521 -0
  24. pymammotion/data/model/generate_route_information.py +2 -2
  25. pymammotion/data/model/hash_list.py +370 -57
  26. pymammotion/data/model/location.py +4 -4
  27. pymammotion/data/model/mowing_modes.py +17 -1
  28. pymammotion/data/model/raw_data.py +2 -10
  29. pymammotion/data/model/region_data.py +10 -11
  30. pymammotion/data/model/report_info.py +31 -5
  31. pymammotion/data/model/work.py +27 -0
  32. pymammotion/data/mower_state_manager.py +316 -0
  33. pymammotion/data/mqtt/event.py +73 -28
  34. pymammotion/data/mqtt/mammotion_properties.py +257 -0
  35. pymammotion/data/mqtt/properties.py +93 -78
  36. pymammotion/data/mqtt/status.py +18 -17
  37. pymammotion/event/event.py +27 -6
  38. pymammotion/homeassistant/__init__.py +3 -0
  39. pymammotion/homeassistant/mower_api.py +484 -0
  40. pymammotion/homeassistant/rtk_api.py +54 -0
  41. pymammotion/http/encryption.py +5 -6
  42. pymammotion/http/http.py +574 -28
  43. pymammotion/http/model/__init__.py +0 -0
  44. pymammotion/{aliyun/model/stream_subscription_response.py → http/model/camera_stream.py} +14 -2
  45. pymammotion/http/model/http.py +129 -4
  46. pymammotion/http/model/response_factory.py +61 -0
  47. pymammotion/http/model/rtk.py +16 -0
  48. pymammotion/mammotion/commands/abstract_message.py +7 -5
  49. pymammotion/mammotion/commands/mammotion_command.py +30 -1
  50. pymammotion/mammotion/commands/messages/basestation.py +43 -0
  51. pymammotion/mammotion/commands/messages/driver.py +61 -29
  52. pymammotion/mammotion/commands/messages/media.py +68 -15
  53. pymammotion/mammotion/commands/messages/navigation.py +61 -25
  54. pymammotion/mammotion/commands/messages/network.py +17 -23
  55. pymammotion/mammotion/commands/messages/ota.py +18 -18
  56. pymammotion/mammotion/commands/messages/system.py +32 -49
  57. pymammotion/mammotion/commands/messages/video.py +15 -16
  58. pymammotion/mammotion/devices/__init__.py +27 -3
  59. pymammotion/mammotion/devices/base.py +40 -131
  60. pymammotion/mammotion/devices/mammotion.py +436 -201
  61. pymammotion/mammotion/devices/mammotion_bluetooth.py +57 -47
  62. pymammotion/mammotion/devices/mammotion_cloud.py +134 -105
  63. pymammotion/mammotion/devices/mammotion_mower_ble.py +49 -0
  64. pymammotion/mammotion/devices/mammotion_mower_cloud.py +39 -0
  65. pymammotion/mammotion/devices/managers/managers.py +81 -0
  66. pymammotion/mammotion/devices/mower_device.py +124 -0
  67. pymammotion/mammotion/devices/mower_manager.py +107 -0
  68. pymammotion/mammotion/devices/rtk_ble.py +89 -0
  69. pymammotion/mammotion/devices/rtk_cloud.py +113 -0
  70. pymammotion/mammotion/devices/rtk_device.py +50 -0
  71. pymammotion/mammotion/devices/rtk_manager.py +122 -0
  72. pymammotion/mqtt/__init__.py +2 -1
  73. pymammotion/mqtt/aliyun_mqtt.py +232 -0
  74. pymammotion/mqtt/linkkit/__init__.py +5 -0
  75. pymammotion/mqtt/linkkit/h2client.py +585 -0
  76. pymammotion/mqtt/linkkit/linkkit.py +3023 -0
  77. pymammotion/mqtt/mammotion_mqtt.py +176 -169
  78. pymammotion/mqtt/mqtt_models.py +66 -0
  79. pymammotion/proto/__init__.py +4839 -4
  80. pymammotion/proto/basestation.proto +8 -0
  81. pymammotion/proto/basestation_pb2.py +11 -9
  82. pymammotion/proto/basestation_pb2.pyi +16 -2
  83. pymammotion/proto/dev_net.proto +79 -55
  84. pymammotion/proto/dev_net_pb2.py +60 -56
  85. pymammotion/proto/dev_net_pb2.pyi +49 -6
  86. pymammotion/proto/luba_msg.proto +2 -1
  87. pymammotion/proto/luba_msg_pb2.py +6 -6
  88. pymammotion/proto/luba_msg_pb2.pyi +1 -0
  89. pymammotion/proto/luba_mul.proto +62 -1
  90. pymammotion/proto/luba_mul_pb2.py +38 -22
  91. pymammotion/proto/luba_mul_pb2.pyi +94 -7
  92. pymammotion/proto/mctrl_driver.proto +44 -4
  93. pymammotion/proto/mctrl_driver_pb2.py +26 -14
  94. pymammotion/proto/mctrl_driver_pb2.pyi +66 -11
  95. pymammotion/proto/mctrl_nav.proto +93 -52
  96. pymammotion/proto/mctrl_nav_pb2.py +75 -67
  97. pymammotion/proto/mctrl_nav_pb2.pyi +142 -56
  98. pymammotion/proto/mctrl_ota.proto +40 -2
  99. pymammotion/proto/mctrl_ota_pb2.py +23 -13
  100. pymammotion/proto/mctrl_ota_pb2.pyi +67 -4
  101. pymammotion/proto/mctrl_pept.proto +8 -3
  102. pymammotion/proto/mctrl_pept_pb2.py +8 -6
  103. pymammotion/proto/mctrl_pept_pb2.pyi +14 -6
  104. pymammotion/proto/mctrl_sys.proto +325 -86
  105. pymammotion/proto/mctrl_sys_pb2.py +162 -98
  106. pymammotion/proto/mctrl_sys_pb2.pyi +451 -25
  107. pymammotion/proto/message_pool.py +3 -0
  108. pymammotion/proto/py.typed +0 -0
  109. pymammotion/utility/constant/device_constant.py +29 -5
  110. pymammotion/utility/datatype_converter.py +13 -12
  111. pymammotion/utility/device_config.py +522 -130
  112. pymammotion/utility/device_type.py +218 -21
  113. pymammotion/utility/map.py +238 -51
  114. pymammotion/utility/mur_mur_hash.py +159 -0
  115. {pymammotion-0.4.0a2.dist-info → pymammotion-0.5.51.dist-info}/METADATA +26 -31
  116. pymammotion-0.5.51.dist-info/RECORD +152 -0
  117. {pymammotion-0.4.0a2.dist-info → pymammotion-0.5.51.dist-info}/WHEEL +1 -1
  118. pymammotion/aliyun/cloud_service.py +0 -65
  119. pymammotion/data/model/plan.py +0 -58
  120. pymammotion/data/state_manager.py +0 -129
  121. pymammotion/proto/basestation.py +0 -59
  122. pymammotion/proto/common.py +0 -12
  123. pymammotion/proto/dev_net.py +0 -381
  124. pymammotion/proto/luba_msg.py +0 -81
  125. pymammotion/proto/luba_mul.py +0 -76
  126. pymammotion/proto/mctrl_driver.py +0 -100
  127. pymammotion/proto/mctrl_nav.py +0 -664
  128. pymammotion/proto/mctrl_ota.py +0 -48
  129. pymammotion/proto/mctrl_pept.py +0 -41
  130. pymammotion/proto/mctrl_sys.py +0 -574
  131. pymammotion-0.4.0a2.dist-info/RECORD +0 -131
  132. /pymammotion/http/{_init_.py → __init__.py} +0 -0
  133. {pymammotion-0.4.0a2.dist-info → pymammotion-0.5.51.dist-info/licenses}/LICENSE +0 -0
@@ -1,4 +1,21 @@
1
1
  from pymammotion.data.model.device_limits import DeviceLimits
2
+ from pymammotion.utility.device_type import DeviceType
3
+
4
+ default_luba_config = {
5
+ "blade_height": {"min": 20, "max": 35},
6
+ "working_speed": {"min": 0.2, "max": 1.2},
7
+ "path_spacing": {"min": 8, "max": 14},
8
+ "work_area_num_max": 60,
9
+ "display_image_type": 0,
10
+ }
11
+
12
+ default_yuka_config = {
13
+ "blade_height": {"min": 0, "max": 0},
14
+ "working_speed": {"min": 0.2, "max": 0.6},
15
+ "path_spacing": {"min": 8, "max": 30},
16
+ "work_area_num_max": 60,
17
+ "display_image_type": 0,
18
+ }
2
19
 
3
20
 
4
21
  class DeviceConfig:
@@ -9,281 +26,644 @@ class DeviceConfig:
9
26
  self.default_list = {
10
27
  "a1ZU6bdGjaM": {
11
28
  "extMod": "LubaAWD1000723",
12
- "cutter_height_min": 30,
13
- "cutter_height_max": 70,
29
+ "blade_height_min": 30,
30
+ "blade_height_max": 70,
14
31
  "working_speed_min": 0.2,
15
32
  "working_speed_max": 0.4,
16
33
  "work_area_num_max": 3,
17
- "working_path_min": 20,
18
- "working_path_max": 35,
19
- "display_imge_type": 1,
34
+ "path_spacing_min": 20,
35
+ "path_spacing_max": 35,
36
+ "display_image_type": 1,
20
37
  },
21
38
  "a1nf9kRBWoH": {
22
39
  "extMod": "LubaAWD3000723",
23
- "cutter_height_min": 30,
24
- "cutter_height_max": 70,
40
+ "blade_height_min": 30,
41
+ "blade_height_max": 70,
25
42
  "working_speed_min": 0.2,
26
- "working_speed_max": 0.4,
43
+ "working_speed_max": 0.6,
27
44
  "work_area_num_max": 6,
28
- "working_path_min": 20,
29
- "working_path_max": 35,
30
- "display_imge_type": 1,
45
+ "path_spacing_min": 20,
46
+ "path_spacing_max": 35,
47
+ "display_image_type": 1,
31
48
  },
32
49
  "a1ae1QnXZGf": {
33
50
  "extMod": "LubaAWD1000743",
34
- "cutter_height_min": 30,
35
- "cutter_height_max": 70,
51
+ "blade_height_min": 30,
52
+ "blade_height_max": 70,
36
53
  "working_speed_min": 0.2,
37
- "working_speed_max": 0.4,
54
+ "working_speed_max": 0.6,
38
55
  "work_area_num_max": 3,
39
- "working_path_min": 20,
40
- "working_path_max": 35,
41
- "display_imge_type": 1,
56
+ "path_spacing_min": 20,
57
+ "path_spacing_max": 35,
58
+ "display_image_type": 1,
42
59
  },
43
60
  "a1K4Ki2L5rK": {
44
61
  "extMod": "LubaAWD5000723",
45
- "cutter_height_min": 30,
46
- "cutter_height_max": 70,
62
+ "blade_height_min": 30,
63
+ "blade_height_max": 70,
47
64
  "working_speed_min": 0.2,
48
65
  "working_speed_max": 0.6,
49
66
  "work_area_num_max": 10,
50
- "working_path_min": 20,
51
- "working_path_max": 35,
52
- "display_imge_type": 0,
67
+ "path_spacing_min": 20,
68
+ "path_spacing_max": 35,
69
+ "display_image_type": 0,
53
70
  },
54
71
  "a1jOhAYOIG8": {
55
72
  "extMod": "LubaAWD5000743LS",
56
- "cutter_height_min": 30,
57
- "cutter_height_max": 70,
73
+ "blade_height_min": 30,
74
+ "blade_height_max": 70,
58
75
  "working_speed_min": 0.2,
59
76
  "working_speed_max": 0.6,
60
77
  "work_area_num_max": 10,
61
- "working_path_min": 20,
62
- "working_path_max": 35,
63
- "display_imge_type": 0,
78
+ "path_spacing_min": 20,
79
+ "path_spacing_max": 35,
80
+ "display_image_type": 0,
64
81
  },
65
82
  "a1BmXWlsdbA": {
66
83
  "extMod": "LubaAWD5000743",
67
- "cutter_height_min": 30,
68
- "cutter_height_max": 70,
84
+ "blade_height_min": 30,
85
+ "blade_height_max": 70,
69
86
  "working_speed_min": 0.2,
70
87
  "working_speed_max": 0.6,
71
88
  "work_area_num_max": 10,
72
- "working_path_min": 20,
73
- "working_path_max": 35,
74
- "display_imge_type": 0,
89
+ "path_spacing_min": 20,
90
+ "path_spacing_max": 35,
91
+ "display_image_type": 0,
75
92
  },
76
93
  "a1JFpmAV5Ur": {
77
94
  "extMod": "Kumar-10",
78
- "cutter_height_min": 30,
79
- "cutter_height_max": 70,
95
+ "blade_height_min": 30,
96
+ "blade_height_max": 70,
80
97
  "working_speed_min": 0.2,
81
98
  "working_speed_max": 0.6,
82
99
  "work_area_num_max": 10,
83
- "working_path_min": 20,
84
- "working_path_max": 35,
85
- "display_imge_type": 0,
100
+ "path_spacing_min": 20,
101
+ "path_spacing_max": 35,
102
+ "display_image_type": 0,
86
103
  },
87
104
  "a1kweSOPylG": {
88
105
  "extMod": "LubaAWD3000723",
89
- "cutter_height_min": 30,
90
- "cutter_height_max": 70,
106
+ "blade_height_min": 30,
107
+ "blade_height_max": 70,
91
108
  "working_speed_min": 0.2,
92
109
  "working_speed_max": 0.6,
93
110
  "work_area_num_max": 6,
94
- "working_path_min": 20,
95
- "working_path_max": 35,
96
- "display_imge_type": 1,
111
+ "path_spacing_min": 20,
112
+ "path_spacing_max": 35,
113
+ "display_image_type": 1,
97
114
  },
98
115
  "a1pvCnb3PPu": {
99
116
  "extMod": "LubaAWD1000743",
100
- "cutter_height_min": 30,
101
- "cutter_height_max": 70,
117
+ "blade_height_min": 30,
118
+ "blade_height_max": 70,
102
119
  "working_speed_min": 0.2,
103
120
  "working_speed_max": 0.6,
104
121
  "work_area_num_max": 3,
105
- "working_path_min": 20,
106
- "working_path_max": 35,
107
- "display_imge_type": 1,
122
+ "path_spacing_min": 20,
123
+ "path_spacing_max": 35,
124
+ "display_image_type": 1,
108
125
  },
109
126
  "a1x0zHD3Xop": {
110
127
  "extMod": "LubaAWD5000743LS",
111
- "cutter_height_min": 30,
112
- "cutter_height_max": 70,
128
+ "blade_height_min": 30,
129
+ "blade_height_max": 70,
113
130
  "working_speed_min": 0.2,
114
131
  "working_speed_max": 0.6,
115
132
  "work_area_num_max": 10,
116
- "working_path_min": 20,
117
- "working_path_max": 35,
118
- "display_imge_type": 0,
133
+ "path_spacing_min": 20,
134
+ "path_spacing_max": 35,
135
+ "display_image_type": 0,
119
136
  },
120
137
  "a1UBFdq6nNz": {
121
138
  "extMod": "LubaAWD5000723",
122
- "cutter_height_min": 30,
123
- "cutter_height_max": 70,
139
+ "blade_height_min": 30,
140
+ "blade_height_max": 70,
124
141
  "working_speed_min": 0.2,
125
142
  "working_speed_max": 0.6,
126
143
  "work_area_num_max": 10,
127
- "working_path_min": 20,
128
- "working_path_max": 35,
129
- "display_imge_type": 0,
144
+ "path_spacing_min": 20,
145
+ "path_spacing_max": 35,
146
+ "display_image_type": 0,
130
147
  },
131
148
  "a1FbaU4Bqk5": {
132
149
  "extMod": "LubaAWD5000743",
133
- "cutter_height_min": 30,
134
- "cutter_height_max": 70,
150
+ "blade_height_min": 30,
151
+ "blade_height_max": 70,
135
152
  "working_speed_min": 0.2,
136
153
  "working_speed_max": 0.6,
137
154
  "work_area_num_max": 10,
138
- "working_path_min": 20,
139
- "working_path_max": 35,
140
- "display_imge_type": 0,
155
+ "path_spacing_min": 20,
156
+ "path_spacing_max": 35,
157
+ "display_image_type": 0,
141
158
  },
142
159
  }
143
160
 
144
161
  self.inner_list = {
145
162
  "HM010060LBAWD10": {
146
163
  "extMod": "LubaAWD1000",
147
- "cutter_height_min": 30,
148
- "cutter_height_max": 70,
164
+ "blade_height_min": 30,
165
+ "blade_height_max": 70,
149
166
  "working_speed_min": 0.2,
150
167
  "working_speed_max": 0.6,
151
168
  "work_area_num_max": 3,
152
- "working_path_min": 20,
153
- "working_path_max": 35,
154
- "display_imge_type": 1,
169
+ "path_spacing_min": 20,
170
+ "path_spacing_max": 35,
171
+ "display_image_type": 1,
155
172
  },
156
173
  "HM030080LBAWD30": {
157
174
  "extMod": "LubaAWD3000",
158
- "cutter_height_min": 30,
159
- "cutter_height_max": 70,
175
+ "blade_height_min": 30,
176
+ "blade_height_max": 70,
160
177
  "working_speed_min": 0.2,
161
178
  "working_speed_max": 0.6,
162
179
  "work_area_num_max": 6,
163
- "working_path_min": 20,
164
- "working_path_max": 35,
165
- "display_imge_type": 1,
180
+ "path_spacing_min": 20,
181
+ "path_spacing_max": 35,
182
+ "display_image_type": 1,
166
183
  },
167
184
  "HM050080LBAWD50": {
168
185
  "extMod": "LubaAWD5000",
169
- "cutter_height_min": 30,
170
- "cutter_height_max": 70,
186
+ "blade_height_min": 30,
187
+ "blade_height_max": 70,
171
188
  "working_speed_min": 0.2,
172
189
  "working_speed_max": 0.6,
173
190
  "work_area_num_max": 10,
174
- "working_path_min": 20,
175
- "working_path_max": 35,
176
- "display_imge_type": 0,
191
+ "path_spacing_min": 20,
192
+ "path_spacing_max": 35,
193
+ "display_image_type": 0,
177
194
  },
178
195
  "HM030060LBAWD50OMNI": {
179
196
  "extMod": "LubaAWD5000",
180
- "cutter_height_min": 30,
181
- "cutter_height_max": 70,
197
+ "blade_height_min": 30,
198
+ "blade_height_max": 70,
182
199
  "working_speed_min": 0.2,
183
200
  "working_speed_max": 0.6,
184
201
  "work_area_num_max": 10,
185
- "working_path_min": 20,
186
- "working_path_max": 35,
187
- "display_imge_type": 1,
202
+ "path_spacing_min": 20,
203
+ "path_spacing_max": 35,
204
+ "display_image_type": 1,
188
205
  },
189
206
  "HM060100LBAWD50OMNIH": {
190
207
  "extMod": "LubaAWD5000H",
191
- "cutter_height_min": 60,
192
- "cutter_height_max": 100,
208
+ "blade_height_min": 60,
209
+ "blade_height_max": 100,
193
210
  "working_speed_min": 0.2,
194
211
  "working_speed_max": 0.6,
195
212
  "work_area_num_max": 10,
196
- "working_path_min": 20,
197
- "working_path_max": 35,
198
- "display_imge_type": 0,
213
+ "path_spacing_min": 20,
214
+ "path_spacing_max": 35,
215
+ "display_image_type": 0,
199
216
  },
200
217
  "HM030070LBVAWD10OMNI": {
201
218
  "extMod": "Luba2AWD1000",
202
- "cutter_height_min": 25,
203
- "cutter_height_max": 70,
219
+ "blade_height_min": 25,
220
+ "blade_height_max": 70,
204
221
  "working_speed_min": 0.2,
205
222
  "working_speed_max": 0.6,
206
223
  "work_area_num_max": 10,
207
- "working_path_min": 20,
208
- "working_path_max": 35,
209
- "display_imge_type": 0,
224
+ "path_spacing_min": 20,
225
+ "path_spacing_max": 35,
226
+ "display_image_type": 0,
210
227
  },
211
228
  "HM060100LBVAWD10OMNIH": {
212
229
  "extMod": "Luba2AWD1000H",
213
- "cutter_height_min": 55,
214
- "cutter_height_max": 100,
230
+ "blade_height_min": 55,
231
+ "blade_height_max": 100,
215
232
  "working_speed_min": 0.2,
216
233
  "working_speed_max": 0.6,
217
234
  "work_area_num_max": 10,
218
- "working_path_min": 20,
219
- "working_path_max": 35,
220
- "display_imge_type": 0,
235
+ "path_spacing_min": 20,
236
+ "path_spacing_max": 35,
237
+ "display_image_type": 0,
221
238
  },
222
239
  "HM030070LBVAWD30OMNI": {
223
240
  "extMod": "Luba2AWD3000",
224
- "cutter_height_min": 25,
225
- "cutter_height_max": 70,
241
+ "blade_height_min": 25,
242
+ "blade_height_max": 70,
226
243
  "working_speed_min": 0.2,
227
244
  "working_speed_max": 0.6,
228
245
  "work_area_num_max": 20,
229
- "working_path_min": 20,
230
- "working_path_max": 35,
231
- "display_imge_type": 0,
246
+ "path_spacing_min": 20,
247
+ "path_spacing_max": 35,
248
+ "display_image_type": 0,
232
249
  },
233
250
  "HM060100LBVAWD30OMNIH": {
234
251
  "extMod": "Luba2AWD3000H",
235
- "cutter_height_min": 55,
236
- "cutter_height_max": 100,
252
+ "blade_height_min": 55,
253
+ "blade_height_max": 100,
237
254
  "working_speed_min": 0.2,
238
255
  "working_speed_max": 0.6,
239
256
  "work_area_num_max": 20,
240
- "working_path_min": 20,
241
- "working_path_max": 35,
242
- "display_imge_type": 0,
257
+ "path_spacing_min": 20,
258
+ "path_spacing_max": 35,
259
+ "display_image_type": 0,
243
260
  },
244
261
  "HM030070LBVAWD50OMNI": {
245
262
  "extMod": "Luba2AWD5000",
246
- "cutter_height_min": 25,
247
- "cutter_height_max": 70,
263
+ "blade_height_min": 25,
264
+ "blade_height_max": 70,
248
265
  "working_speed_min": 0.2,
249
266
  "working_speed_max": 0.6,
250
267
  "work_area_num_max": 30,
251
- "working_path_min": 20,
252
- "working_path_max": 35,
253
- "display_imge_type": 0,
268
+ "path_spacing_min": 20,
269
+ "path_spacing_max": 35,
270
+ "display_image_type": 0,
254
271
  },
255
272
  "HM060100LBVAWD50OMNIH": {
256
273
  "extMod": "Luba2AWD5000H",
257
- "cutter_height_min": 55,
258
- "cutter_height_max": 100,
274
+ "blade_height_min": 55,
275
+ "blade_height_max": 100,
259
276
  "working_speed_min": 0.2,
260
277
  "working_speed_max": 0.6,
261
278
  "work_area_num_max": 30,
262
- "working_path_min": 20,
263
- "working_path_max": 35,
264
- "display_imge_type": 0,
279
+ "path_spacing_min": 20,
280
+ "path_spacing_max": 35,
281
+ "display_image_type": 0,
265
282
  },
266
283
  "HM030070LBVAWD100OMNI": {
267
284
  "extMod": "Luba2AWD10000",
268
- "cutter_height_min": 25,
269
- "cutter_height_max": 70,
285
+ "blade_height_min": 25,
286
+ "blade_height_max": 70,
270
287
  "working_speed_min": 0.2,
271
288
  "working_speed_max": 0.6,
272
289
  "work_area_num_max": 60,
273
- "working_path_min": 20,
274
- "working_path_max": 35,
275
- "display_imge_type": 0,
290
+ "path_spacing_min": 20,
291
+ "path_spacing_max": 35,
292
+ "display_image_type": 0,
276
293
  },
277
294
  "HM060100LBVAWD100OMNIH": {
278
295
  "extMod": "Luba2AWD10000H",
279
- "cutter_height_min": 55,
280
- "cutter_height_max": 100,
296
+ "blade_height_min": 55,
297
+ "blade_height_max": 100,
298
+ "working_speed_min": 0.2,
299
+ "working_speed_max": 0.6,
300
+ "work_area_num_max": 60,
301
+ "path_spacing_min": 20,
302
+ "path_spacing_max": 35,
303
+ "display_image_type": 0,
304
+ },
305
+ "HM030070LB2PAWD30OMNI": {
306
+ "extMod": "Luba2ProAWD3000",
307
+ "blade_height_min": 25,
308
+ "blade_height_max": 70,
309
+ "working_speed_min": 0.2,
310
+ "working_speed_max": 0.8,
311
+ "work_area_num_max": 60,
312
+ "path_spacing_min": 20,
313
+ "path_spacing_max": 35,
314
+ "display_image_type": 0,
315
+ },
316
+ "HM060100LB2PAWD30OMNIH": {
317
+ "extMod": "Luba2ProAWD3000NA",
318
+ "blade_height_min": 55,
319
+ "blade_height_max": 100,
320
+ "working_speed_min": 0.2,
321
+ "working_speed_max": 0.8,
322
+ "work_area_num_max": 60,
323
+ "path_spacing_min": 20,
324
+ "path_spacing_max": 35,
325
+ "display_image_type": 0,
326
+ },
327
+ "HM030070LB2PAWD50OMNI": {
328
+ "extMod": "Luba2ProAWD5000",
329
+ "blade_height_min": 25,
330
+ "blade_height_max": 70,
331
+ "working_speed_min": 0.2,
332
+ "working_speed_max": 1.0,
333
+ "work_area_num_max": 60,
334
+ "path_spacing_min": 20,
335
+ "path_spacing_max": 35,
336
+ "display_image_type": 0,
337
+ },
338
+ "HM060100LB2PAWD50OMNIH": {
339
+ "extMod": "Luba2ProAWD5000NA",
340
+ "blade_height_min": 55,
341
+ "blade_height_max": 100,
342
+ "working_speed_min": 0.2,
343
+ "working_speed_max": 1.0,
344
+ "work_area_num_max": 60,
345
+ "path_spacing_min": 20,
346
+ "path_spacing_max": 35,
347
+ "display_image_type": 0,
348
+ },
349
+ "HM030070LB2PAWD100OMNI": {
350
+ "extMod": "Luba2ProAWD10000",
351
+ "blade_height_min": 25,
352
+ "blade_height_max": 70,
353
+ "working_speed_min": 0.2,
354
+ "working_speed_max": 1.0,
355
+ "work_area_num_max": 60,
356
+ "path_spacing_min": 20,
357
+ "path_spacing_max": 35,
358
+ "display_image_type": 0,
359
+ },
360
+ "HM060100LB2PAWD100OMNIH": {
361
+ "extMod": "Luba2ProAWD10000NA",
362
+ "blade_height_min": 55,
363
+ "blade_height_max": 100,
364
+ "working_speed_min": 0.2,
365
+ "working_speed_max": 1.0,
366
+ "work_area_num_max": 60,
367
+ "path_spacing_min": 20,
368
+ "path_spacing_max": 35,
369
+ "display_image_type": 0,
370
+ },
371
+ "HM020065LB2MINIAWD08OMNI": {
372
+ "extMod": "Luba2MiniAWD800",
373
+ "blade_height_min": 20,
374
+ "blade_height_max": 65,
375
+ "working_speed_min": 0.2,
376
+ "working_speed_max": 0.6,
377
+ "work_area_num_max": 60,
378
+ "path_spacing_min": 5,
379
+ "path_spacing_max": 20,
380
+ "display_image_type": 0,
381
+ },
382
+ "HM020065LB2MINIAWD15OMNI": {
383
+ "extMod": "Luba2MiniAWD1500",
384
+ "blade_height_min": 20,
385
+ "blade_height_max": 65,
386
+ "working_speed_min": 0.2,
387
+ "working_speed_max": 0.6,
388
+ "work_area_num_max": 60,
389
+ "path_spacing_min": 5,
390
+ "path_spacing_max": 20,
391
+ "display_image_type": 0,
392
+ },
393
+ "HM020065LB2MINIAWD15OMNILD": {
394
+ "extMod": "Luba2MiniAWD1500Lidar",
395
+ "blade_height_min": 20,
396
+ "blade_height_max": 65,
397
+ "working_speed_min": 0.2,
398
+ "working_speed_max": 0.6,
399
+ "work_area_num_max": 60,
400
+ "path_spacing_min": 5,
401
+ "path_spacing_max": 20,
402
+ "display_image_type": 0,
403
+ },
404
+ "HM055100LB2MINIAWD08OMNIH": {
405
+ "extMod": "Luba2MiniAWD800NA",
406
+ "blade_height_min": 55,
407
+ "blade_height_max": 100,
408
+ "working_speed_min": 0.2,
409
+ "working_speed_max": 0.6,
410
+ "work_area_num_max": 60,
411
+ "path_spacing_min": 5,
412
+ "path_spacing_max": 20,
413
+ "display_image_type": 0,
414
+ },
415
+ "HM055100LB2MINIAWD15OMNIH": {
416
+ "extMod": "Luba2MiniAWD1500NA",
417
+ "blade_height_min": 55,
418
+ "blade_height_max": 100,
419
+ "working_speed_min": 0.2,
420
+ "working_speed_max": 0.6,
421
+ "work_area_num_max": 60,
422
+ "path_spacing_min": 5,
423
+ "path_spacing_max": 20,
424
+ "display_image_type": 0,
425
+ },
426
+ "HM055100LB2MINIAWD15OMNIHLD": {
427
+ "extMod": "Luba2MiniAWD1500NALidar",
428
+ "blade_height_min": 55,
429
+ "blade_height_max": 100,
430
+ "working_speed_min": 0.2,
431
+ "working_speed_max": 0.6,
432
+ "work_area_num_max": 60,
433
+ "path_spacing_min": 5,
434
+ "path_spacing_max": 20,
435
+ "display_image_type": 0,
436
+ },
437
+ "HM030070YK06": {
438
+ "extMod": "Yuka600",
439
+ "blade_height_min": 0,
440
+ "blade_height_max": 0,
441
+ "working_speed_min": 0.2,
442
+ "working_speed_max": 0.6,
443
+ "work_area_num_max": 60,
444
+ "path_spacing_min": 15,
445
+ "path_spacing_max": 30,
446
+ "display_image_type": 0,
447
+ },
448
+ "HM030100YK06H": {
449
+ "extMod": "Yuka600NA",
450
+ "blade_height_min": 0,
451
+ "blade_height_max": 0,
452
+ "working_speed_min": 0.2,
453
+ "working_speed_max": 0.6,
454
+ "work_area_num_max": 60,
455
+ "path_spacing_min": 15,
456
+ "path_spacing_max": 30,
457
+ "display_image_type": 0,
458
+ },
459
+ "HM030070YK10": {
460
+ "extMod": "Yuka1000",
461
+ "blade_height_min": 0,
462
+ "blade_height_max": 0,
463
+ "working_speed_min": 0.2,
464
+ "working_speed_max": 0.6,
465
+ "work_area_num_max": 60,
466
+ "path_spacing_min": 15,
467
+ "path_spacing_max": 30,
468
+ "display_image_type": 0,
469
+ },
470
+ "HM030100YK10H": {
471
+ "extMod": "Yuka1000NA",
472
+ "blade_height_min": 0,
473
+ "blade_height_max": 0,
474
+ "working_speed_min": 0.2,
475
+ "working_speed_max": 0.6,
476
+ "work_area_num_max": 60,
477
+ "path_spacing_min": 15,
478
+ "path_spacing_max": 30,
479
+ "display_image_type": 0,
480
+ },
481
+ "HM030070YK15": {
482
+ "extMod": "Yuka1500",
483
+ "blade_height_min": 0,
484
+ "blade_height_max": 0,
281
485
  "working_speed_min": 0.2,
282
486
  "working_speed_max": 0.6,
283
487
  "work_area_num_max": 60,
284
- "working_path_min": 20,
285
- "working_path_max": 35,
286
- "display_imge_type": 0,
488
+ "path_spacing_min": 15,
489
+ "path_spacing_max": 30,
490
+ "display_image_type": 0,
491
+ },
492
+ "HM030100YK15H": {
493
+ "extMod": "Yuka1500NA",
494
+ "blade_height_min": 0,
495
+ "blade_height_max": 0,
496
+ "working_speed_min": 0.2,
497
+ "working_speed_max": 0.6,
498
+ "work_area_num_max": 60,
499
+ "path_spacing_min": 15,
500
+ "path_spacing_max": 30,
501
+ "display_image_type": 0,
502
+ },
503
+ "HM020090YK20": {
504
+ "extMod": "Yuka2000",
505
+ "blade_height_min": 0,
506
+ "blade_height_max": 0,
507
+ "working_speed_min": 0.2,
508
+ "working_speed_max": 0.6,
509
+ "work_area_num_max": 60,
510
+ "path_spacing_min": 15,
511
+ "path_spacing_max": 30,
512
+ "display_image_type": 0,
513
+ },
514
+ "HM030100YK20H": {
515
+ "extMod": "Yuka2000NA",
516
+ "blade_height_min": 0,
517
+ "blade_height_max": 0,
518
+ "working_speed_min": 0.2,
519
+ "working_speed_max": 0.6,
520
+ "work_area_num_max": 60,
521
+ "path_spacing_min": 15,
522
+ "path_spacing_max": 30,
523
+ "display_image_type": 0,
524
+ },
525
+ "HM020080YKMINI05": {
526
+ "extMod": "YukaMini500",
527
+ "blade_height_min": 0,
528
+ "blade_height_max": 0,
529
+ "working_speed_min": 0.2,
530
+ "working_speed_max": 0.6,
531
+ "work_area_num_max": 60,
532
+ "path_spacing_min": 8,
533
+ "path_spacing_max": 14,
534
+ "display_image_type": 0,
535
+ },
536
+ "HM050090YKMINI05H": {
537
+ "extMod": "YukaMini500NA",
538
+ "blade_height_min": 0,
539
+ "blade_height_max": 0,
540
+ "working_speed_min": 0.2,
541
+ "working_speed_max": 0.6,
542
+ "work_area_num_max": 60,
543
+ "path_spacing_min": 8,
544
+ "path_spacing_max": 14,
545
+ "display_image_type": 0,
546
+ },
547
+ "HM020080YKMINI08": {
548
+ "extMod": "YukaMini800",
549
+ "blade_height_min": 0,
550
+ "blade_height_max": 0,
551
+ "working_speed_min": 0.2,
552
+ "working_speed_max": 0.6,
553
+ "work_area_num_max": 60,
554
+ "path_spacing_min": 8,
555
+ "path_spacing_max": 14,
556
+ "display_image_type": 0,
557
+ },
558
+ "HM050090YKMINI08H": {
559
+ "extMod": "YukaMini800NA",
560
+ "blade_height_min": 0,
561
+ "blade_height_max": 0,
562
+ "working_speed_min": 0.2,
563
+ "working_speed_max": 0.6,
564
+ "work_area_num_max": 60,
565
+ "path_spacing_min": 8,
566
+ "path_spacing_max": 14,
567
+ "display_image_type": 0,
568
+ },
569
+ "HM020080YKMINI06": {
570
+ "extMod": "YukaMini600",
571
+ "blade_height_min": 0,
572
+ "blade_height_max": 0,
573
+ "working_speed_min": 0.2,
574
+ "working_speed_max": 0.6,
575
+ "work_area_num_max": 60,
576
+ "path_spacing_min": 8,
577
+ "path_spacing_max": 14,
578
+ "display_image_type": 0,
579
+ },
580
+ "HM020080YKMINI07": {
581
+ "extMod": "YukaMini700",
582
+ "blade_height_min": 0,
583
+ "blade_height_max": 0,
584
+ "working_speed_min": 0.2,
585
+ "working_speed_max": 0.6,
586
+ "work_area_num_max": 60,
587
+ "path_spacing_min": 8,
588
+ "path_spacing_max": 14,
589
+ "display_image_type": 0,
590
+ },
591
+ "HM050090YKMINI06H": {
592
+ "extMod": "YukaMini600NA",
593
+ "blade_height_min": 0,
594
+ "blade_height_max": 0,
595
+ "working_speed_min": 0.2,
596
+ "working_speed_max": 0.6,
597
+ "work_area_num_max": 60,
598
+ "path_spacing_min": 8,
599
+ "path_spacing_max": 14,
600
+ "display_image_type": 0,
601
+ },
602
+ "HM050090YKMINI07H": {
603
+ "extMod": "YukaMini700NA",
604
+ "blade_height_min": 0,
605
+ "blade_height_max": 0,
606
+ "working_speed_min": 0.2,
607
+ "working_speed_max": 0.6,
608
+ "work_area_num_max": 60,
609
+ "path_spacing_min": 8,
610
+ "path_spacing_max": 14,
611
+ "display_image_type": 0,
612
+ },
613
+ "HM020090YKPLUS15": {
614
+ "extMod": "YukaPlus1500",
615
+ "blade_height_min": 0,
616
+ "blade_height_max": 0,
617
+ "working_speed_min": 0.2,
618
+ "working_speed_max": 0.6,
619
+ "work_area_num_max": 60,
620
+ "path_spacing_min": 15,
621
+ "path_spacing_max": 30,
622
+ "display_image_type": 0,
623
+ },
624
+ "HM020090YKPLUS20": {
625
+ "extMod": "YukaPlus2000",
626
+ "blade_height_min": 0,
627
+ "blade_height_max": 0,
628
+ "working_speed_min": 0.2,
629
+ "working_speed_max": 0.6,
630
+ "work_area_num_max": 60,
631
+ "path_spacing_min": 15,
632
+ "path_spacing_max": 30,
633
+ "display_image_type": 0,
634
+ },
635
+ "HM030100YKPLUS15H": {
636
+ "extMod": "YukaPlus1500NA",
637
+ "blade_height_min": 0,
638
+ "blade_height_max": 0,
639
+ "working_speed_min": 0.2,
640
+ "working_speed_max": 0.6,
641
+ "work_area_num_max": 60,
642
+ "path_spacing_min": 15,
643
+ "path_spacing_max": 30,
644
+ "display_image_type": 0,
645
+ },
646
+ "HM030100YKPLUS20H": {
647
+ "extMod": "YukaPlus2000NA",
648
+ "blade_height_min": 0,
649
+ "blade_height_max": 0,
650
+ "working_speed_min": 0.2,
651
+ "working_speed_max": 0.6,
652
+ "work_area_num_max": 60,
653
+ "path_spacing_min": 15,
654
+ "path_spacing_max": 30,
655
+ "display_image_type": 0,
656
+ },
657
+ "HM020080MN23103": {
658
+ "extMod": "MN231_1",
659
+ "blade_height_min": 0,
660
+ "blade_height_max": 0,
661
+ "working_speed_min": 0.2,
662
+ "working_speed_max": 0.6,
663
+ "work_area_num_max": 60,
664
+ "path_spacing_min": 8,
665
+ "path_spacing_max": 14,
666
+ "display_image_type": 0,
287
667
  },
288
668
  }
289
669
 
@@ -316,7 +696,7 @@ class DeviceConfig:
316
696
  config = self.get_device_config(int_mod)
317
697
  return config.get("extMod") if config else None
318
698
 
319
- def get_working_parameters(self, int_mod_or_key: str) -> DeviceLimits:
699
+ def get_working_parameters(self, int_mod_or_key: str) -> DeviceLimits | None:
320
700
  """Get working parameters for given internal model code
321
701
 
322
702
  Args:
@@ -324,6 +704,7 @@ class DeviceConfig:
324
704
 
325
705
  Returns:
326
706
  dict: Working parameters or None if not found
707
+ :param int_mod_or_key:
327
708
 
328
709
  """
329
710
  config = self.get_device_config(int_mod_or_key)
@@ -332,14 +713,25 @@ class DeviceConfig:
332
713
 
333
714
  return DeviceLimits.from_dict(
334
715
  {
335
- "cutter_height": {"min": config["cutter_height_min"], "max": config["cutter_height_max"]},
716
+ "blade_height": {"min": config["blade_height_min"], "max": config["blade_height_max"]},
336
717
  "working_speed": {"min": config["working_speed_min"], "max": config["working_speed_max"]},
337
- "working_path": {"min": config["working_path_min"], "max": config["working_path_max"]},
718
+ "path_spacing": {"min": config["path_spacing_min"], "max": config["path_spacing_max"]},
338
719
  "work_area_num_max": config["work_area_num_max"],
339
720
  "display_image_type": config["display_image_type"],
340
721
  }
341
722
  )
342
723
 
724
+ @staticmethod
725
+ def get_best_default(product_key: str) -> DeviceLimits:
726
+ """Basic fallback if device is offline."""
727
+
728
+ if DeviceType.contain_luba_product_key(product_key):
729
+ return DeviceLimits.from_dict(default_luba_config)
730
+ if DeviceType.contain_luba_2_product_key(product_key):
731
+ return DeviceLimits.from_dict(default_luba_config)
732
+
733
+ return DeviceLimits.from_dict(default_yuka_config)
734
+
343
735
 
344
736
  # # Usage example:
345
737
  # def main():