Skip to content

Commit e8c171a

Browse files
committed
publish jdcloud-sdk-python 1.6.61
1 parent ea90914 commit e8c171a

8 files changed

Lines changed: 91 additions & 32 deletions

File tree

jdcloud_sdk/services/iotcore/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ API版本:1.1.15
33

44
|发布时间|版本号|更新|说明|
55
|---|---|---|---|
6+
|2020-05-14 |1.1.18 |增加朗锐接口 | *朗瑞查询接口加参数
67
|2020-05-14 |1.1.15 |增加朗锐接口 | *增加朗锐的设备接口和电梯运行状态接口
78
|2020-04-20 |1.1.5 |增加iotcore融合 | *增加实例列表、实例详情和实例删除接口
89
|2020-01-10 |1.1.4 |增加Edge日志上报通知接口 | *增加Edge日志上报通知接口,增加自定义物模型模板接口,增加自定义topic功能

jdcloud_sdk/services/iotcore/apis/CollectorReadMessageRequest.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,22 @@ def __init__(self, parameters, header=None, version="v2"):
3232

3333
class CollectorReadMessageParameters(object):
3434

35-
def __init__(self, instanceId, regionId, ):
35+
def __init__(self, instanceId, regionId, identifier, protocol):
3636
"""
3737
:param instanceId: Hub实例Id
3838
:param regionId: 区域Id
39+
:param identifier: 当前的链接码
40+
:param protocol: 当前的协议类型:
41+
语音播报控制器-输入端子,0X00000~X0007:inputTerminal
42+
语音播报控制器-播放信息,0X00024~X0027:playInfo
43+
LR001-516-5B边缘数据采集器-传感器管理:sensor
44+
LR001-516-5B边缘数据采集器-采集器属性:collectorProperty
45+
LR001-516-5B边缘数据采集器-电梯属性:elevatorProperty
46+
3947
"""
4048

4149
self.instanceId = instanceId
4250
self.regionId = regionId
43-
self.identifier = None
44-
self.protocol = None
45-
46-
def setIdentifier(self, identifier):
47-
"""
48-
:param identifier: (Optional) 当前的链接码
49-
"""
5051
self.identifier = identifier
51-
52-
def setProtocol(self, protocol):
53-
"""
54-
:param protocol: (Optional) 当前的协议类型
55-
"""
5652
self.protocol = protocol
5753

jdcloud_sdk/services/iotcore/apis/CollectorWriteMessageRequest.py

Lines changed: 48 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,33 +32,65 @@ def __init__(self, parameters, header=None, version="v2"):
3232

3333
class CollectorWriteMessageParameters(object):
3434

35-
def __init__(self, instanceId, regionId, ):
35+
def __init__(self, instanceId, regionId, identifier, data):
3636
"""
3737
:param instanceId: Hub实例Id
3838
:param regionId: 区域Id
39+
:param identifier: 当前的链接码
40+
:param data: 当前待写入的数据
41+
如指定播放设备,寄存地址:13对应16进制0x0D,寄存器值:2
42+
{
43+
"13":2
44+
}
45+
如播放控制,寄存地址:14对应16进制0x0E,寄存器值:1
46+
{
47+
"14": 1
48+
}
49+
如音量设置,寄存地址:15对应16进制0x0F,寄存器值:10,取值范围0~30
50+
{
51+
"15": 10
52+
}
53+
如指定文件夹和文件播放,寄存地址:16对应16进制0x10,寄存器值:1
54+
寄存器值为两字节,第一个字节为文件夹,第二个字节为文件名
55+
如0x01文件夹,0x03文件名,0x0103换算为10进制为259
56+
{
57+
"16": 259
58+
}
59+
如组合播放,寄存器地址:17、18和19,寄存器值:257、258和259,寄存器值的算法和指定文件夹和文件播放是一致的,如259可换算为0x01文件夹,0x03文件名
60+
{
61+
"17": 257,
62+
"18": 258,
63+
"19": 259
64+
}
65+
如播放广告,寄存地址:32对应16进制0x20,寄存器值:259,寄存器值的算法和指定文件夹和文件播放是一致的,如259可换算为0x01文件夹,0x03文件名
66+
{
67+
"32": 259
68+
}
69+
如指定文件夹循环播放,寄存地址:33对应16进制0x21,寄存器值:256,寄存器值的算法,如256可换算为0x0100文件夹
70+
{
71+
"33": 256
72+
}
73+
如指定文件夹随机播放,寄存地址:34对应16进制0x22,寄存器值:256,寄存器值的算法,如256可换算为0x0100文件夹
74+
{
75+
"34": 256
76+
}
77+
如指定曲目播放,寄存地址:35对应16进制0x23,寄存器值:13,歌曲选择范围为0~3000
78+
{
79+
"35": 13
80+
}
81+
3982
"""
4083

4184
self.instanceId = instanceId
4285
self.regionId = regionId
43-
self.identifier = None
44-
self.protocol = None
45-
self.data = None
46-
47-
def setIdentifier(self, identifier):
48-
"""
49-
:param identifier: (Optional) 当前的链接码
50-
"""
5186
self.identifier = identifier
87+
self.protocol = None
88+
self.data = data
5289

5390
def setProtocol(self, protocol):
5491
"""
55-
:param protocol: (Optional) 当前的协议类型
56-
"""
57-
self.protocol = protocol
92+
:param protocol: (Optional) 当前的协议类型,非必填项
5893
59-
def setData(self, data):
6094
"""
61-
:param data: (Optional) 当前待写入的数据
62-
"""
63-
self.data = data
95+
self.protocol = protocol
6496

jdcloud_sdk/services/iotcore/apis/LoongrayQueryPageRequest.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ def __init__(self, instanceId, regionId, ):
4949
self.order = None
5050
self.direction = None
5151
self.parentId = None
52+
self.orderId = None
53+
self.deviceCollectorType = None
5254

5355
def setDeviceName(self, deviceName):
5456
"""
@@ -104,3 +106,15 @@ def setParentId(self, parentId):
104106
"""
105107
self.parentId = parentId
106108

109+
def setOrderId(self, orderId):
110+
"""
111+
:param orderId: (Optional) 订单号
112+
"""
113+
self.orderId = orderId
114+
115+
def setDeviceCollectorType(self, deviceCollectorType):
116+
"""
117+
:param deviceCollectorType: (Optional) 设备采集器类型
118+
"""
119+
self.deviceCollectorType = deviceCollectorType
120+

jdcloud_sdk/services/iotcore/apis/QueryDevicePageRequest.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ def __init__(self, instanceId, regionId, ):
4949
self.order = None
5050
self.direction = None
5151
self.parentId = None
52+
self.orderId = None
53+
self.deviceCollectorType = None
5254

5355
def setDeviceName(self, deviceName):
5456
"""
@@ -104,3 +106,15 @@ def setParentId(self, parentId):
104106
"""
105107
self.parentId = parentId
106108

109+
def setOrderId(self, orderId):
110+
"""
111+
:param orderId: (Optional) 订单号
112+
"""
113+
self.orderId = orderId
114+
115+
def setDeviceCollectorType(self, deviceCollectorType):
116+
"""
117+
:param deviceCollectorType: (Optional) 设备采集器类型
118+
"""
119+
self.deviceCollectorType = deviceCollectorType
120+

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.17', logger)
29+
super(IotcoreClient, self).__init__(credential, config, 'iotcore', '1.1.18', logger)

jdcloud_sdk/services/iotcore/models/DeviceVO.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
class DeviceVO(object):
2121

22-
def __init__(self, deviceId=None, deviceName=None, parentId=None, deviceType=None, status=None, identifier=None, secret=None, description=None, activatedTime=None, lastConnectedTime=None, createdTime=None, updatedTime=None, productKey=None, productName=None, productSecret=None, model=None, manufacturer=None, dynamicRegister=None, deviceCollectorType=None, lastDisconnectTime=None):
22+
def __init__(self, deviceId=None, deviceName=None, parentId=None, deviceType=None, status=None, identifier=None, secret=None, description=None, activatedTime=None, lastConnectedTime=None, createdTime=None, updatedTime=None, productKey=None, productName=None, productSecret=None, model=None, manufacturer=None, dynamicRegister=None, deviceCollectorType=None, lastDisconnectTime=None, orderId=None):
2323
"""
2424
:param deviceId: (Optional) 设备ID
2525
:param deviceName: (Optional) 设备名称
@@ -41,6 +41,7 @@ def __init__(self, deviceId=None, deviceName=None, parentId=None, deviceType=Non
4141
:param dynamicRegister: (Optional) 是否开启动态注册,0:关闭,1:开启,开启动态注册的设备认证类型为一型一密,否则为一机一密
4242
:param deviceCollectorType: (Optional) 设备采集器类型
4343
:param lastDisconnectTime: (Optional) 最后离线时间
44+
:param orderId: (Optional) 订单号
4445
"""
4546

4647
self.deviceId = deviceId
@@ -63,3 +64,4 @@ def __init__(self, deviceId=None, deviceName=None, parentId=None, deviceType=Non
6364
self.dynamicRegister = dynamicRegister
6465
self.deviceCollectorType = deviceCollectorType
6566
self.lastDisconnectTime = lastDisconnectTime
67+
self.orderId = orderId

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.60",
12+
version="1.6.61",
1313
long_description=long_description,
1414
long_description_content_type="text/markdown",
1515
author='JDCloud API Gateway Team',

0 commit comments

Comments
 (0)