pymammotion 0.4.0a7__py3-none-any.whl → 0.4.0a8__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-0.4.0a7.dist-info → pymammotion-0.4.0a8.dist-info}/METADATA +1 -3
- {pymammotion-0.4.0a7.dist-info → pymammotion-0.4.0a8.dist-info}/RECORD +4 -5
- pymammotion/aliyun/cloud_service.py +0 -65
- {pymammotion-0.4.0a7.dist-info → pymammotion-0.4.0a8.dist-info}/LICENSE +0 -0
- {pymammotion-0.4.0a7.dist-info → pymammotion-0.4.0a8.dist-info}/WHEEL +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: pymammotion
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.0a8
|
4
4
|
Summary:
|
5
5
|
License: GPL-3.0
|
6
6
|
Author: Michael Arthur
|
@@ -15,8 +15,6 @@ Requires-Dist: aiohttp (>=3.9.1,<4.0.0)
|
|
15
15
|
Requires-Dist: alibabacloud-apigateway-util (>=0.0.2,<0.0.3)
|
16
16
|
Requires-Dist: alibabacloud-iot-api-gateway (>=0.0.4,<0.0.5)
|
17
17
|
Requires-Dist: alicloud-gateway-iot (>=1.0.0,<2.0.0)
|
18
|
-
Requires-Dist: aliyun-python-sdk-core (>=2.16.0,<3.0.0)
|
19
|
-
Requires-Dist: aliyun-python-sdk-iot (>=8.59.0,<9.0.0)
|
20
18
|
Requires-Dist: async-timeout (>=4.0.3,<5.0.0)
|
21
19
|
Requires-Dist: betterproto (>=1.2.5,<2.0.0)
|
22
20
|
Requires-Dist: bleak (>=0.21.0)
|
@@ -1,7 +1,6 @@
|
|
1
1
|
pymammotion/__init__.py,sha256=u1OHuD8Uj0qCOH4I7Lt5d7T-TPt1R0pY-bv8S6UfVxM,1587
|
2
2
|
pymammotion/aliyun/__init__.py,sha256=T1lkX7TRYiL4nqYanG4l4MImV-SlavSbuooC-W-uUGw,29
|
3
3
|
pymammotion/aliyun/cloud_gateway.py,sha256=XLe1crlSmntZtt3MekGBZzqQ0zHh_c4sVAb_x-hDRe0,26117
|
4
|
-
pymammotion/aliyun/cloud_service.py,sha256=px7dUKow5Z7VyebjYzuKkzkm77XbUXYiFiYO_2e-UQ0,2207
|
5
4
|
pymammotion/aliyun/model/aep_response.py,sha256=8f6GIP58ve8gd6AL3HBoXxsy0n2q4ygWvjELGnoOnVc,452
|
6
5
|
pymammotion/aliyun/model/connect_response.py,sha256=Yz-fEbDzgGPTo5Of2oAjmFkSv08T7ze80pQU4k-gKIU,824
|
7
6
|
pymammotion/aliyun/model/dev_by_account_response.py,sha256=QZeopszFlGI7wltla-XDyGMbg5QSnb4Q1wTINkkaJyA,1026
|
@@ -128,7 +127,7 @@ pymammotion/utility/map.py,sha256=GYscVMg2cX3IPlNpCBNHDW0S55yS1WGRf1iHnNZ7TfQ,22
|
|
128
127
|
pymammotion/utility/movement.py,sha256=N75oAoAgFydqoaOedYIxGUHmuTCtPzAOtb-d_29tpfI,615
|
129
128
|
pymammotion/utility/periodic.py,sha256=MbeSb9cfhxzYmdT_RiE0dZe3H9IfbQW_zSqhmSX2RUc,3321
|
130
129
|
pymammotion/utility/rocker_util.py,sha256=6tX7sS87qoQC_tsxbx3NLL-HgS08wtzXiZkhDiz7uo0,7179
|
131
|
-
pymammotion-0.4.
|
132
|
-
pymammotion-0.4.
|
133
|
-
pymammotion-0.4.
|
134
|
-
pymammotion-0.4.
|
130
|
+
pymammotion-0.4.0a8.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
131
|
+
pymammotion-0.4.0a8.dist-info/METADATA,sha256=R7_WJcbRLeF1uFrAbhKXQ6chMTXprwfrJRh0dqKDOVo,3879
|
132
|
+
pymammotion-0.4.0a8.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
133
|
+
pymammotion-0.4.0a8.dist-info/RECORD,,
|
@@ -1,65 +0,0 @@
|
|
1
|
-
import base64
|
2
|
-
|
3
|
-
from aliyunsdkcore import client
|
4
|
-
from aliyunsdkiot.request.v20180120.GetDeviceStatusRequest import GetDeviceStatusRequest
|
5
|
-
from aliyunsdkiot.request.v20180120.InvokeThingServiceRequest import (
|
6
|
-
InvokeThingServiceRequest,
|
7
|
-
)
|
8
|
-
|
9
|
-
|
10
|
-
class CloudService:
|
11
|
-
# com.aliyun.iot.aep.sdk
|
12
|
-
# https://domestic.mammotion.com/privacy/ - lists all aliyun packages
|
13
|
-
def __init__(self) -> None:
|
14
|
-
self.selectDeviceIOTID = ""
|
15
|
-
accessKeyId = "<your accessKey>"
|
16
|
-
accessKeySecret = "<your accessSecret>"
|
17
|
-
self.clt = client.AcsClient(accessKeyId, accessKeySecret, "ap-southeast")
|
18
|
-
|
19
|
-
"""
|
20
|
-
String printBase64Binary = DatatypeConverter.printBase64Binary(byteArray);
|
21
|
-
JSONObject jSONObject = new JSONObject();
|
22
|
-
JSONObject jSONObject2 = new JSONObject();
|
23
|
-
try {
|
24
|
-
jSONObject2.put("content", printBase64Binary);
|
25
|
-
jSONObject.put("args", jSONObject2);
|
26
|
-
jSONObject.put("iotId", this.selectDeviceIOTID);
|
27
|
-
jSONObject.put("identifier", "device_protobuf_sync_service");
|
28
|
-
} catch (JSONException e) {
|
29
|
-
e.printStackTrace();
|
30
|
-
}
|
31
|
-
|
32
|
-
"""
|
33
|
-
|
34
|
-
def invoke_thing_service(self, data: bytearray) -> None:
|
35
|
-
base64_encoded = base64.b64encode(data).decode("utf-8")
|
36
|
-
|
37
|
-
# Create a dictionary structure
|
38
|
-
data = {
|
39
|
-
"args": {"content": base64_encoded},
|
40
|
-
"DEVICE_IOTID": self.selectDeviceIOTID,
|
41
|
-
"identifier": "device_protobuf_sync_service",
|
42
|
-
}
|
43
|
-
|
44
|
-
request = InvokeThingServiceRequest()
|
45
|
-
request.set_accept_format("json")
|
46
|
-
|
47
|
-
request.set_Args("Args")
|
48
|
-
request.set_Identifier("Identifier")
|
49
|
-
request.set_IotId("IotId")
|
50
|
-
request.set_ProductKey("ProductKey")
|
51
|
-
|
52
|
-
response = self.clt.do_action_with_exception(request)
|
53
|
-
# python2: print(response)
|
54
|
-
print(response)
|
55
|
-
|
56
|
-
def get_device_status(self) -> None:
|
57
|
-
request = GetDeviceStatusRequest()
|
58
|
-
request.set_accept_format("json")
|
59
|
-
|
60
|
-
request.set_IotId("IotId")
|
61
|
-
request.set_ProductKey("ProductKey")
|
62
|
-
request.set_DeviceName("DeviceName")
|
63
|
-
|
64
|
-
response = self.clt.do_action_with_exception(request)
|
65
|
-
print(response)
|
File without changes
|
File without changes
|