pymammotion 0.4.0b2__py3-none-any.whl → 0.4.0b4__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.
- pymammotion/data/model/report_info.py +1 -1
- pymammotion/mqtt/mammotion_mqtt.py +1 -1
- pymammotion/utility/constant/device_constant.py +18 -5
- {pymammotion-0.4.0b2.dist-info → pymammotion-0.4.0b4.dist-info}/METADATA +3 -2
- {pymammotion-0.4.0b2.dist-info → pymammotion-0.4.0b4.dist-info}/RECORD +7 -10
- pymammotion/mqtt/linkkit/__init__.py +0 -5
- pymammotion/mqtt/linkkit/h2client.py +0 -585
- pymammotion/mqtt/linkkit/linkkit.py +0 -3020
- {pymammotion-0.4.0b2.dist-info → pymammotion-0.4.0b4.dist-info}/LICENSE +0 -0
- {pymammotion-0.4.0b2.dist-info → pymammotion-0.4.0b4.dist-info}/WHEEL +0 -0
@@ -10,13 +10,13 @@ import logging
|
|
10
10
|
from logging import getLogger
|
11
11
|
|
12
12
|
import betterproto
|
13
|
+
from linkkit.linkkit import LinkKit
|
13
14
|
from paho.mqtt.client import MQTTMessage
|
14
15
|
|
15
16
|
from pymammotion.aliyun.cloud_gateway import CloudIOTGateway
|
16
17
|
from pymammotion.data.mqtt.event import ThingEventMessage
|
17
18
|
from pymammotion.data.mqtt.properties import ThingPropertiesMessage
|
18
19
|
from pymammotion.data.mqtt.status import ThingStatusMessage
|
19
|
-
from pymammotion.mqtt.linkkit.linkkit import LinkKit
|
20
20
|
from pymammotion.proto.luba_msg import LubaMsg
|
21
21
|
|
22
22
|
logger = getLogger(__name__)
|
@@ -1,5 +1,7 @@
|
|
1
1
|
from enum import IntEnum
|
2
2
|
|
3
|
+
from pymammotion.data.model.report_info import ConnectData
|
4
|
+
|
3
5
|
|
4
6
|
class bleOrderCmd:
|
5
7
|
allpowerfullRW = 67
|
@@ -211,15 +213,26 @@ class WorkMode:
|
|
211
213
|
MODE_CHARGING_PAUSE = 39
|
212
214
|
|
213
215
|
|
214
|
-
def device_connection(
|
216
|
+
def device_connection(connect: ConnectData) -> str:
|
215
217
|
"""Return string representation of device connection."""
|
216
|
-
if value == 1:
|
217
|
-
return "BLE"
|
218
218
|
|
219
|
-
if
|
219
|
+
if (
|
220
|
+
connect.connect_type == 2
|
221
|
+
or connect.used_net == "NET_USED_TYPE_WIFI"
|
222
|
+
or (connect.wifi_rssi != 0 and connect.ble_rssi != 0)
|
223
|
+
):
|
224
|
+
return "WIFI/BLE"
|
225
|
+
|
226
|
+
if connect.connect_type == 2 or connect.used_net == "NET_USED_TYPE_WIFI" or connect.wifi_rssi != 0:
|
220
227
|
return "WIFI"
|
221
228
|
|
222
|
-
|
229
|
+
if connect.connect_type == 1 or connect.used_net == "NET_USED_TYPE_MNET":
|
230
|
+
return "3G/4G"
|
231
|
+
|
232
|
+
if connect.ble_rssi != 0:
|
233
|
+
return "BLE"
|
234
|
+
|
235
|
+
return "None"
|
223
236
|
|
224
237
|
|
225
238
|
def device_mode(value: int) -> str:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: pymammotion
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.0b4
|
4
4
|
Summary:
|
5
5
|
License: GPL-3.0
|
6
6
|
Author: Michael Arthur
|
@@ -15,6 +15,7 @@ Requires-Dist: aiohttp (>=3.9.1,<4.0.0)
|
|
15
15
|
Requires-Dist: alibabacloud-apigateway-util (>=0.0.2,<0.0.3)
|
16
16
|
Requires-Dist: alibabacloud-iot-api-gateway (>=0.0.4,<0.0.5)
|
17
17
|
Requires-Dist: alicloud-gateway-iot (>=1.0.0,<2.0.0)
|
18
|
+
Requires-Dist: aliyun-iot-linkkit (>=1.2.12,<2.0.0)
|
18
19
|
Requires-Dist: async-timeout (>=4.0.3,<5.0.0)
|
19
20
|
Requires-Dist: betterproto (>=1.2.5,<2.0.0)
|
20
21
|
Requires-Dist: bleak (>=0.21.0)
|
@@ -25,7 +26,7 @@ Requires-Dist: jsonic (>=1.0.0,<2.0.0)
|
|
25
26
|
Requires-Dist: mashumaro (>=3.13,<4.0)
|
26
27
|
Requires-Dist: numpy (>=1.26.0)
|
27
28
|
Requires-Dist: orjson (>=3.9.15,<4.0.0)
|
28
|
-
Requires-Dist: paho-mqtt (>=
|
29
|
+
Requires-Dist: paho-mqtt (>=1.6.1,<2.0.0)
|
29
30
|
Requires-Dist: protobuf (>=4.23.1)
|
30
31
|
Requires-Dist: py-jsonic (>=0.0.2,<0.0.3)
|
31
32
|
Description-Content-Type: text/markdown
|
@@ -38,7 +38,7 @@ pymammotion/data/model/plan.py,sha256=wGlcJT-w0EdbWK9jI838TCOm_MABFg7WoR664VB8RW
|
|
38
38
|
pymammotion/data/model/rapid_state.py,sha256=mIdhAG_LZXpVcybxqTLgLXkNOmVmDTn04B9PGIDA8Ls,1251
|
39
39
|
pymammotion/data/model/raw_data.py,sha256=oO8JX4JP8YuWGj_-6XdooCQn8MnXuNYJ3S6e502NzpU,6754
|
40
40
|
pymammotion/data/model/region_data.py,sha256=VokMRqB_o4OFL1TWAM90Fvm-1z4jcYrw3X2o760qpx4,2949
|
41
|
-
pymammotion/data/model/report_info.py,sha256=
|
41
|
+
pymammotion/data/model/report_info.py,sha256=cWr0FC9B0M4ZHS2bY4V5nzjXSMd8qHq2NRhm6TzNXnw,3440
|
42
42
|
pymammotion/data/mqtt/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
43
43
|
pymammotion/data/mqtt/event.py,sha256=r14gzZVxmlGVAwFdZQ1CUsMZFHHwRKnbt2VHnjugP28,5123
|
44
44
|
pymammotion/data/mqtt/properties.py,sha256=pX5JRVmmpVO04CSPm5xAGcSWA_OeLd0JnBagLsfiSEc,3755
|
@@ -70,11 +70,8 @@ pymammotion/mammotion/devices/mammotion.py,sha256=-x9hf_M-_3fp5srHGBuMmO5DBsSDnw
|
|
70
70
|
pymammotion/mammotion/devices/mammotion_bluetooth.py,sha256=G7gprsdvKiBHr4S2myRuLL-PWldtsnlLIsiW8yWvpP0,19613
|
71
71
|
pymammotion/mammotion/devices/mammotion_cloud.py,sha256=nd1Uj6rF8UKHJbHC6nlPRrNQPggPXxfpydT0o0cWbMM,13835
|
72
72
|
pymammotion/mqtt/__init__.py,sha256=Ocs5e-HLJvTuDpVXyECEsWIvwsUaxzj7lZ9mSYutNDY,105
|
73
|
-
pymammotion/mqtt/linkkit/__init__.py,sha256=ENgc3ynd2kd9gMQR3-kgmCu6Ed9Y6XCIzU0zFReUlkk,80
|
74
|
-
pymammotion/mqtt/linkkit/h2client.py,sha256=w9Nvi_nY4CLD_fw-pHtYChwQf7e2TiAGeqkY_sF4cf0,19659
|
75
|
-
pymammotion/mqtt/linkkit/linkkit.py,sha256=NzFpdtfxNHQ6xNu-POyp45fTK7AWUAWV7RavFevX4m4,132772
|
76
73
|
pymammotion/mqtt/mammotion_future.py,sha256=_OWqKOlUGl2yT1xOsXFQYpGd-1zQ63OxqXgy7KRQgYc,710
|
77
|
-
pymammotion/mqtt/mammotion_mqtt.py,sha256=
|
74
|
+
pymammotion/mqtt/mammotion_mqtt.py,sha256=Aec7xQGtTCVdVD-hH20ICm6-6YyWbtXc128yvYmtdWY,8859
|
78
75
|
pymammotion/proto/__init__.py,sha256=v3_P1LOsYRBN9qCAhaWrWMX7GWHrox9XD3hdZQxcPZM,190
|
79
76
|
pymammotion/proto/basestation.proto,sha256=_x5gAz3FkZXS1jtq4GgZgaDCuRU-UV-7HTFdsfQ3zbo,1034
|
80
77
|
pymammotion/proto/basestation.py,sha256=js64_N2xQYRxWPRdVNEapO0qe7vBlfYnjW5sE8hi7hw,2026
|
@@ -118,7 +115,7 @@ pymammotion/proto/mctrl_sys_pb2.py,sha256=DYemb514mlC7c27t-k1YqqBif0xxhLmnIWk8rX
|
|
118
115
|
pymammotion/proto/mctrl_sys_pb2.pyi,sha256=Dj_1UM86kZ5MfcVyNC76Z0gKrfl5YFsVWP2b-bKoZvk,38912
|
119
116
|
pymammotion/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
120
117
|
pymammotion/utility/constant/__init__.py,sha256=tcY0LDeD-qDDHx2LKt55KOyv9ZI0UfCNM6fknLCmm8s,110
|
121
|
-
pymammotion/utility/constant/device_constant.py,sha256=
|
118
|
+
pymammotion/utility/constant/device_constant.py,sha256=nOzNgXc1c1mr4dpuqG0QYToa1q6ocY-G7pLi3z67mEc,8013
|
122
119
|
pymammotion/utility/conversions.py,sha256=v3YICy0zZwwBBzrUZgabI7GRfiDBnkiAX2qdtk3NxOY,89
|
123
120
|
pymammotion/utility/datatype_converter.py,sha256=SPM_HuaaD_XOawlqEnA8qlRRZXGba3WjA8kGOZgeBlQ,4284
|
124
121
|
pymammotion/utility/device_config.py,sha256=hHVyT8uSsHZB4_kuaN6K5wfsC2V5Ixevm1aFi2oYDFk,27956
|
@@ -127,7 +124,7 @@ pymammotion/utility/map.py,sha256=GYscVMg2cX3IPlNpCBNHDW0S55yS1WGRf1iHnNZ7TfQ,22
|
|
127
124
|
pymammotion/utility/movement.py,sha256=N75oAoAgFydqoaOedYIxGUHmuTCtPzAOtb-d_29tpfI,615
|
128
125
|
pymammotion/utility/periodic.py,sha256=MbeSb9cfhxzYmdT_RiE0dZe3H9IfbQW_zSqhmSX2RUc,3321
|
129
126
|
pymammotion/utility/rocker_util.py,sha256=6tX7sS87qoQC_tsxbx3NLL-HgS08wtzXiZkhDiz7uo0,7179
|
130
|
-
pymammotion-0.4.
|
131
|
-
pymammotion-0.4.
|
132
|
-
pymammotion-0.4.
|
133
|
-
pymammotion-0.4.
|
127
|
+
pymammotion-0.4.0b4.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
128
|
+
pymammotion-0.4.0b4.dist-info/METADATA,sha256=9iDEs7KoCvtDGuiAEGd5sPOQTj1PcCI6jeX4CLIFE0Y,3938
|
129
|
+
pymammotion-0.4.0b4.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
130
|
+
pymammotion-0.4.0b4.dist-info/RECORD,,
|