添加几款文档

This commit is contained in:
Frank 2024-04-03 15:24:31 +08:00
parent 135bf18f2f
commit 1d06459c3c
14 changed files with 187 additions and 0 deletions

Binary file not shown.

Binary file not shown.

3
爱牵挂/members.csv Normal file
View File

@ -0,0 +1,3 @@
deviceid,sim_phone,sim_phone_type,group_name,member_name,username,password,email,nickname,address,phone
868111010026363,,,,,,,,,,
868111010003214,,,,,,,,,,
1 deviceid sim_phone sim_phone_type group_name member_name username password email nickname address phone
2 868111010026363
3 868111010003214

BIN
爱牵挂/请先读我.doc Normal file

Binary file not shown.

View File

@ -0,0 +1,4 @@
### 红外
电信AEP平台TCP协议对接流程 https://nb.phchn.com/download/?type=aep_tcp_doc
TCP协议直连对接流程 https://nb.phchn.com/download/?type=tcp_doc

Binary file not shown.

View File

@ -0,0 +1,5 @@
2000413971.non-nb.ctwing.cn:8996
17053734
-mYd-caLeNgWJBQP1w6MkPFua9KYi4F0wZdHWpAPFU4

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
{"version":"1.0","profile":{"industryId":"2","sceneId":"19","categoryId":"29","productId":"WY4xk3aeWd"},"properties":[{"identifier":"BatteryPercentage","name":"电池电量","functionType":"st","accessMode":"r","desc":"","dataType":{"type":"double","specs":{"min":"0","max":"100","unit":"百分比 / %","step":"0.01"}}},{"identifier":"ICCID","name":"ICCID","functionType":"u","accessMode":"r","desc":"","dataType":{"type":"string","specs":{"length":32}}},{"identifier":"IMEI","name":"IMEI","functionType":"u","accessMode":"r","desc":"","dataType":{"type":"string","specs":{"length":32}}},{"identifier":"RSSI","name":"接收信号强度","functionType":"st","accessMode":"r","desc":"","dataType":{"type":"double","specs":{"min":"-127","max":"127","unit":"分贝毫瓦 / dBm","step":"0.01"}}},{"identifier":"SmokeSensorState","name":"烟雾检测状态","functionType":"st","accessMode":"r","desc":"","dataType":{"type":"enum","specs":{"0":"正常","1":"检测到烟雾","2":"手动测试报警"}}},{"identifier":"batteryVoltage","name":"电池电压","functionType":"u","accessMode":"r","desc":"","dataType":{"type":"double","specs":{"min":"0","max":"255","unit":"伏特 / V","step":"0.1"}}},{"identifier":"levSmokerPercentage","name":"烟雾浓度","functionType":"u","accessMode":"r","desc":"","dataType":{"type":"int32","specs":{"min":"0","max":"255","unit":"百分比 / %","step":"1"}}}],"events":[{"identifier":"Error","name":"故障上报","functionType":"st","eventType":"info","desc":"","outputData":[{"identifier":"ErrorCode","name":"故障代码","dataType":{"type":"enum","specs":{"0":"恢复正常"}}}]}],"services":[]}

View File

@ -0,0 +1,174 @@
/**
* @Smoker script
* @Copyright : PGST Technologies Ltd.
* @All Rights Reserved
* @Copyright (c) 2022, PGST Technologies Ltd.
* @Designed Milo lu
*/
var COMMAND_POST = 0x01 // Attribute Report
var THING_PROP_POST_METHOD = 'thing.property.post'
/**
* @Profile Uplink conversion
*
* 01 01 xx xx xx xx xx n1 n2 n3 ...n20 m1 m2 m3 ... m15 crc
* | | | | | | | | | | | |__________crc
* | | | | | | | | | |_____________|______________IMEI number code
* | | | | | | | |___________|_________________________________ICCID number code
* | | | | | | |_________________________________________________smoker percentage
* | | | | | |____________________________________________________battery voltage
* | | | | |_______________________________________________________smoke sensor state
* | | | |__________________________________________________________Rssi value
* | | |_____________________________________________________________battery percent
* | |________________________________________________________________msgID
* |___________________________________________________________________command ID
*/
function rawDataToJson (rawData)
{
var uint8Array = new Uint8Array(rawData.length)
var iccidArry = []
var imeiArry = []
var i
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
var NUM_CODE=[0,1,2,3,4,5,6,7,8,9,'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','*']
var crc = 0
for (i = 0; i < rawData.length; i++)
{
uint8Array[i] = rawData[i] & 0xff
if(i < (rawData.length-1))
{
crc = (crc + uint8Array[i]) & 0xff
}
}
var dataView = new DataView(uint8Array.buffer, 0)
var jsonMap = { 'version': '1.0' }
var fHead = uint8Array[0] // command
if (fHead===COMMAND_POST && crc==uint8Array[rawData.length-1])
{
jsonMap['method'] = THING_PROP_POST_METHOD
jsonMap['id'] = '' + dataView.getInt8(1)
var k = 0
var int2char
if(rawData.length==43)
{
for (i = 0; i < 20; i++)
{
int2char = dataView.getInt8(7+k)
if(int2char>=48&&int2char<=57)
{
int2char-=48
}
else if(int2char>=65&&int2char<=90)
{
int2char-=55
}
else if(int2char>=97&&int2char<=122)
{
int2char-=87
}
else
{
int2char=36
}
iccidArry[i] = NUM_CODE[int2char]
k++
}
for (i = 0; i < 15; i++)
{
int2char = dataView.getInt8(7+k)
if(int2char>=48&&int2char<=57)
{
int2char-=48
}
else if(int2char>=65&&int2char<=90)
{
int2char-=55
}
else if(int2char>=97&&int2char<=122)
{
int2char-=87
}
else
{
int2char=36
}
imeiArry[i] = NUM_CODE[int2char]
k++
}
jsonMap['params'] =
{
'BatteryPercentage':
{
'value': dataView.getInt8(2)
},
'RSSI':
{
'value': dataView.getInt8(3)
},
'SmokeSensorState':
{
'value': dataView.getInt8(4)
},
'batteryVoltage':
{
'value':dataView.getInt8(5)/10
},
'levSmokerPercentage':
{
'value':dataView.getInt8(6)
},
'ICCID':
{
'value': iccidArry.join("")
},
'IMEI':
{
'value': imeiArry.join("")
},
}
}
else if(rawData.length==8)
{
jsonMap['params'] =
{
'BatteryPercentage':
{
'value': dataView.getInt8(2)
},
'RSSI':
{
'value': dataView.getInt8(3)
},
'SmokeSensorState':
{
'value': dataView.getInt8(4)
},
'batteryVoltage':
{
'value':dataView.getInt8(5)/10
},
'levSmokerPercentage':
{
'value':dataView.getInt8(6)
},
}
}
}
return jsonMap
}
/**
* @Profile downlink conversion
*/
function jsonToRawData(jsonObj){
var rawData = [];
return rawData;
}

Binary file not shown.