Skip to content

Commit 44d4881

Browse files
committed
publish jdcloud-sdk-python 1.6.64
1 parent 2353382 commit 44d4881

6 files changed

Lines changed: 128 additions & 12 deletions

File tree

jdcloud_sdk/services/iotcore/ChangeLog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# 更新历史 #
2-
API版本:1.1.20
2+
API版本:1.1.21
33

44
|发布时间|版本号|更新|说明|
55
|---|---|---|---|
6+
|2020-06-15 |1.1.21 |增加设备统计接口 | *设备统计接口发布
67
|2020-06-11 |1.1.20 |增加设备接口 | *设备更新接口发布
78
|2020-05-28 |1.1.19 |增加朗锐接口 | *(0x03)读保持寄存器
89
|2020-05-14 |1.1.18 |增加朗锐接口 | *朗瑞查询接口加参数

jdcloud_sdk/services/iotcore/apis/CollectorReadMessageRequest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ def __init__(self, instanceId, regionId, identifier, protocol):
4343
LR001-516-5B边缘数据采集器-传感器管理:sensor
4444
LR001-516-5B边缘数据采集器-采集器属性:collectorProperty
4545
LR001-516-5B边缘数据采集器-电梯属性:elevatorProperty
46+
LR001-516-5A边缘数据采集器-水质酸碱度(PH):waterQualityPh
47+
LR001-516-5A水质监测采集器-水质电导率:waterQualityElectroConductivity
4648
4749
"""
4850

jdcloud_sdk/services/iotcore/apis/CollectorWriteMessageRequest.py

Lines changed: 58 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,46 +38,95 @@ def __init__(self, instanceId, regionId, identifier, data):
3838
:param regionId: 区域Id
3939
:param identifier: 当前的链接码
4040
:param data: 当前待写入的数据
41-
如指定播放设备,寄存地址:13对应16进制0x0D,寄存器值:2
41+
如语音播报控制器-指定播放设备,寄存地址:13对应16进制0x0D,寄存器值:2
4242
{
4343
"13":2
4444
}
45-
如播放控制,寄存地址:14对应16进制0x0E,寄存器值:1
45+
如语音播报控制器-播放控制,寄存地址:14对应16进制0x0E,寄存器值:1
4646
{
4747
"14": 1
4848
}
49-
如音量设置,寄存地址:15对应16进制0x0F,寄存器值:10,取值范围0~30
49+
如语音播报控制器-音量设置,寄存地址:15对应16进制0x0F,寄存器值:10,取值范围0~30
5050
{
5151
"15": 10
5252
}
53-
如指定文件夹和文件播放,寄存地址:16对应16进制0x10,寄存器值:1
53+
如语音播报控制器-指定文件夹和文件播放,寄存地址:16对应16进制0x10,寄存器值:1
5454
寄存器值为两字节,第一个字节为文件夹,第二个字节为文件名
5555
如0x01文件夹,0x03文件名,0x0103换算为10进制为259
5656
{
5757
"16": 259
5858
}
59-
如组合播放,寄存器地址:17、18和19,寄存器值:257、258和259,寄存器值的算法和指定文件夹和文件播放是一致的,如259可换算为0x01文件夹,0x03文件名
59+
如语音播报控制器-组合播放,寄存器地址:17、18和19,寄存器值:257、258和259,寄存器值的算法和指定文件夹和文件播放是一致的,如259可换算为0x01文件夹,0x03文件名
6060
{
6161
"17": 257,
6262
"18": 258,
6363
"19": 259
6464
}
65-
如播放广告,寄存地址:32对应16进制0x20,寄存器值:259,寄存器值的算法和指定文件夹和文件播放是一致的,如259可换算为0x01文件夹,0x03文件名
65+
如语音播报控制器-播放广告,寄存地址:32对应16进制0x20,寄存器值:259,寄存器值的算法和指定文件夹和文件播放是一致的,如259可换算为0x01文件夹,0x03文件名
6666
{
6767
"32": 259
6868
}
69-
如指定文件夹循环播放,寄存地址:33对应16进制0x21,寄存器值:256,寄存器值的算法,如256可换算为0x0100文件夹
69+
如语音播报控制器-指定文件夹循环播放,寄存地址:33对应16进制0x21,寄存器值:256,寄存器值的算法,如256可换算为0x0100文件夹
7070
{
7171
"33": 256
7272
}
73-
如指定文件夹随机播放,寄存地址:34对应16进制0x22,寄存器值:256,寄存器值的算法,如256可换算为0x0100文件夹
73+
如语音播报控制器-指定文件夹随机播放,寄存地址:34对应16进制0x22,寄存器值:256,寄存器值的算法,如256可换算为0x0100文件夹
7474
{
7575
"34": 256
7676
}
77-
如指定曲目播放,寄存地址:35对应16进制0x23,寄存器值:13,歌曲选择范围为0~3000
77+
如语音播报控制器-指定曲目播放,寄存地址:35对应16进制0x23,寄存器值:13,歌曲选择范围为0~3000
7878
{
7979
"35": 13
8080
}
81+
如电梯数据采集器-传感器管理数据更新
82+
{
83+
"40426": 1,
84+
"40427": 1,
85+
"40428": 1,
86+
"40429": 1,
87+
"40430": 1,
88+
"40431": 1,
89+
"40432": 1,
90+
"40433": 1,
91+
"40434": 1,
92+
"40435": 1,
93+
"40436": 1,
94+
"40437": 1,
95+
"40438": 1,
96+
"40439": 1,
97+
"40440": 1
98+
}
99+
如电梯数据采集器-采集器属性数据更新
100+
{
101+
"40441": 40441,
102+
"40443": 40443,
103+
"40444": 40444,
104+
"40445": 40445,
105+
"40446": 40446,
106+
"40447": 40447,
107+
"40448": 40448,
108+
"40449": 40449,
109+
"40450": 40450
110+
}
111+
如电梯数据采集器-电梯属性数据更新
112+
{
113+
"40801": 1,
114+
"40802": 1,
115+
"40803": 1,
116+
"40804": 1,
117+
"40805": 1,
118+
"40806": 1,
119+
"40807": 1,
120+
"40808": 1,
121+
"40809": 1,
122+
"40810": 1
123+
}
124+
如电梯数据采集器-楼层数据更新
125+
{
126+
"40797": 1,
127+
"40798": 1,
128+
"40799": 1
129+
}
81130
82131
"""
83132

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class QueryAdminStatisticsRequest(JDCloudRequest):
23+
"""
24+
设备基本数据统计,包括设备数,激活数,在线数
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v2"):
28+
super(QueryAdminStatisticsRequest, self).__init__(
29+
'/regions/{regionId}/instances/{instanceId}/device:queryAdminStatistics', 'GET', header, version)
30+
self.parameters = parameters
31+
32+
33+
class QueryAdminStatisticsParameters(object):
34+
35+
def __init__(self, instanceId, regionId, ):
36+
"""
37+
:param instanceId: 设备归属的实例ID
38+
:param regionId: 设备归属的实例所在区域
39+
"""
40+
41+
self.instanceId = instanceId
42+
self.regionId = regionId
43+
self.productKey = None
44+
self.parentId = None
45+
self.deviceCollectorType = None
46+
47+
def setProductKey(self, productKey):
48+
"""
49+
:param productKey: (Optional) 过滤条件,产品Key
50+
"""
51+
self.productKey = productKey
52+
53+
def setParentId(self, parentId):
54+
"""
55+
:param parentId: (Optional) 针对parentId下的子设备进行统计
56+
"""
57+
self.parentId = parentId
58+
59+
def setDeviceCollectorType(self, deviceCollectorType):
60+
"""
61+
:param deviceCollectorType: (Optional) 采集器类型
62+
"""
63+
self.deviceCollectorType = deviceCollectorType
64+

jdcloud_sdk/services/iotcore/client/IotcoreClient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ def __init__(self, credential, config=None, logger=None):
2626
if config is None:
2727
config = Config('iotcore.jdcloud-api.com')
2828

29-
super(IotcoreClient, self).__init__(credential, config, 'iotcore', '1.1.20', logger)
29+
super(IotcoreClient, self).__init__(credential, config, 'iotcore', '1.1.21', logger)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setup(
1111
name='jdcloud_sdk',
12-
version="1.6.63",
12+
version="1.6.64",
1313
long_description=long_description,
1414
long_description_content_type="text/markdown",
1515
author='JDCloud API Gateway Team',

0 commit comments

Comments
 (0)