Commit e5950adc authored by 尹佳钦's avatar 尹佳钦
parents 51588aed c1141a95
......@@ -3,32 +3,41 @@ nanomsg_File="/home/kk/lib/libnanomsg.so.5"
ev_File="/home/kk/lib/libev.so.4"
sqlite_File="/home/kk/lib/libsqlite3.so.0"
run_Dir="/"
dev_cfg_Dir="${run_Dir}/ZB/dev_config_table"
run_Dir="/usr/kk"
tsl_Dir="${run_Dir}/tsl"
dev_cfg_Dir="${run_Dir}/dev_config_table"
cd /sbin/
insmod /sbin/ssd1306-revision.ko
/sbin/oled >/dev/null 2>&1 &
sleep 1
if [ ! -d "$run_Dir" ]; then
mkdir ${run_Dir}
fi
if [ ! -d "$tsl_Dir" ]; then
cp -rf /home/kk/tsl ${run_Dir}/
fi
if [ ! -d "$dev_cfg_Dir" ]; then
mkdir /ZB
cp -rf /home/kk/dev_config_table /ZB
cp -rf /home/kk/dev_map_table.json /ZB
cp -rf /home/kk/dev_config_table ${run_Dir}
sleep 1
fi
sleep 1
export LD_LIBRARY_PATH=/home/kk/lib
cd /home/kk/lib
if [ ! -f "$nanomsg_File" ]; then
ln -s libnanomsg.so /lib/libnanomsg.so.5
ln -sf /home/kk/lib/libnanomsg.so /lib/libnanomsg.so.5
fi
if [ ! -f "$ev_File" ]; then
ln -s libev.so /lib/libev.so.4
ln -sf /home/kk/lib/libev.so /lib/libev.so.4
fi
if [ ! -f "$sqlite_File" ]; then
ln -s libsqlite3.so /lib/libsqlite3.so.0
ln -sf /home/kk/lib/libsqlite3.so /lib/libsqlite3.so.0
fi
......@@ -41,9 +50,9 @@ export LD_LIBRARY_PATH=/home/kk/lib
cd ${run_Dir}
/home/kk/kk_midware >/dev/null 2>&1 &
sleep 1
/home/kk/kcloud >/dev/null 2>&1 &
/home/kk/Z3GatewayHost -f x -p /dev/ttyS0 >/dev/null 2>&1 &
sleep 5
/home/kk/process_check.sh >/dev/null 2>&1 &
......
......@@ -41,6 +41,13 @@ typedef enum {
#define MSG_TOPO_CHANGE_DEVICES_STR "devices"
#define MSG_DEVICE_MAC "mac"
#define MSG_DEVICE_PARENTCODE "parentCode"
#define MSG_AREA_ADDROOM_ROOMNAME "roomName"
#define MSG_AREA_ROOM_ROOMID "roomId"
#define MSG_AREA_ROOM_EPNUM "epNum"
#define MSG_AREA_ROOM_ACTION "action"
#define MSG_AREA_ADDROOM_NOTIFICATION "addRoomNotification"
#define MSG_AREA_ADDROOM_NOTIFICATION_ROOMID "addRoomNotification.roomId"
typedef void ipc_cb(void* data, int len, char* chalMark);
......
......@@ -6,7 +6,7 @@
#include "kk_property_db.h"
#define KK_PROPERTIES_DB_FILE "kk_properties.db"
#define KK_PROPERTIES_DB_FILE "/usr/kk/kk_properties.db"
typedef struct {
void *mutex;
......
......@@ -7,7 +7,7 @@
#include "sqlite3.h"
#include "kk_log.h"
#define KK_SUB_DB_FILE "subDevice.db"
#define KK_SUB_DB_FILE "/usr/kk/subDevice.db"
typedef struct {
void *mutex;
......
......@@ -4,9 +4,9 @@
#include "kk_tsl_common.h"
#include "kk_dm_mng.h"
#include "kk_log.h"
#define TSL_SUBDEVICE_PATH_FILE "/home/kk/tsl/product_%s.json"
#define TSL_GATEWAY_PATH_FILE "/home/kk/tsl/gateway-%s.json"
#define TSL_CCU_PATH_FILE "/home/kk/tsl/ccu-%s.json"
#define TSL_SUBDEVICE_PATH_FILE "/usr/kk/tsl/product_%s.json"
#define TSL_GATEWAY_PATH_FILE "/usr/kk/tsl/gateway-%s.json"
#define TSL_CCU_PATH_FILE "/usr/kk/tsl/ccu-%s.json"
char* kk_load_json(const char *productCode,int type)
{
......
......@@ -230,9 +230,9 @@ void kk_network_check(void)
int kk_permit_join(jrpc_context * ctx,EmberNodeId node,unsigned char ep,void* data)
{
EmberStatus status;
uint8_t isEnable = *(uint8_t*)data;
int isEnable = *(int*)data;
kk_network_check();
//kk_network_check();
if(isEnable == 0){
status = nwkPermitJoinCMD(FALSE);
......@@ -254,7 +254,7 @@ error_return:
#define KK_DEVICE_MAP_TABLE_FILE "./ZB/dev_map_table.json"
#define KK_DEVICE_MAP_TABLE_FILE "/usr/kk/dev_config_table/dev_map_table.json"
#define KK_DEVICE_MAP_TABLE_ARRAY_IDENTIFY "mapTable"
#define KK_DEVICE_CONFIG_MAP_TABLE_ARRAY_IDENTIFY "config"
......@@ -422,7 +422,7 @@ char *kk_match_productCode(const char* modelId)
static kk_dev_config_map *dev_config_map = NULL;
#define KK_DEVICE_CONFIG_MAP_TABLE_FILE_PREFIX "./ZB/dev_config_table/device_%s.json"
#define KK_DEVICE_CONFIG_MAP_TABLE_FILE_PREFIX "/usr/kk/dev_config_table/device_%s.json"
......
......@@ -10,7 +10,7 @@
#define KK_DEVICE_DB_TABLE "kk_device"
#define KK_DEVICE_DB_FILE "kk_device.db"
#define KK_DEVICE_DB_FILE "/usr/kk/kk_device.db"
......
......@@ -172,7 +172,7 @@ int kk_tsl_set_gloabl_OnOff(jrpc_context * ctx,EmberNodeId node,unsigned char ep
uint8_t Onoff = 0;
EmberStatus status = 0;
Onoff = *(uint8_t*)data;
Onoff = *(int*)data;
emberAfAppPrintln("[tsl set:OnOff],Onoff=0x%02x",Onoff);
if(node==EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_NODE_ID){
......@@ -206,7 +206,7 @@ int kk_tsl_set_windowCovering_OperationMode(jrpc_context * ctx,EmberNodeId node,
uint8_t Operation = 0;
EmberStatus status = 0;
Operation = *(uint8_t*)data;
Operation = *(int*)data;
emberAfAppPrintln("[tsl set:Window Covering Operation Mode],mode=0x%02x",Operation);
if(node==EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_NODE_ID){
......@@ -242,7 +242,7 @@ int kk_tsl_set_windowCovering_mode(jrpc_context * ctx,EmberNodeId node,unsigned
uint8_t WCmode = 0;
EmberStatus status = 0;
mode = *(uint8_t*)data;
mode = *(int*)data;
emberAfAppPrintln("[tsl set:Window Covering Run Mode],mode=0x%02x",mode);
if(mode==WC_calibration_mode){
......@@ -288,7 +288,7 @@ int kk_tsl_set_windowCovering_position(jrpc_context * ctx,EmberNodeId node,unsig
uint8_t position = 0;
EmberStatus status = 0;
position = *(uint8_t*)data;
position = *(int*)data;
emberAfAppPrintln("[tsl set:Window Covering Position],position=0x%02x",position);
status = WindowCover_GotoLiftPercentage(node,ep,position);
......@@ -326,7 +326,7 @@ static int kk_zclColorControlMovetohueandsat(EmberNodeId node,unsigned char ep)
}
int kk_tsl_set_colorlight_RGB_red(jrpc_context * ctx,EmberNodeId node,unsigned char ep,void* data)
{
int value = *(uint8_t*)data;
int value = *(int*)data;
EmberStatus status = 0;
emberAfAppPrintln("[tsl set:kk_tsl_set_colorloght_RGB_red],value=0x%02x",value);
//s_Red = value;
......@@ -337,7 +337,7 @@ int kk_tsl_set_colorlight_RGB_red(jrpc_context * ctx,EmberNodeId node,unsigned c
}
int kk_tsl_set_colorlight_RGB_green(jrpc_context * ctx,EmberNodeId node,unsigned char ep,void* data)
{
int value = *(uint8_t*)data;
int value = *(int*)data;
EmberStatus status = 0;
emberAfAppPrintln("[tsl set:kk_tsl_set_colorloght_RGB_green],value=0x%02x",value);
//s_Green = value;
......@@ -348,7 +348,7 @@ int kk_tsl_set_colorlight_RGB_green(jrpc_context * ctx,EmberNodeId node,unsigned
}
int kk_tsl_set_colorlight_RGB_blue(jrpc_context * ctx,EmberNodeId node,unsigned char ep,void* data)
{
int value = *(uint8_t*)data;
int value = *(int*)data;
EmberStatus status = 0;
emberAfAppPrintln("[tsl set:kk_tsl_set_colorloght_RGB_blue],value=0x%02x",value);
//s_Blue = value;
......@@ -360,7 +360,7 @@ int kk_tsl_set_colorlight_RGB_blue(jrpc_context * ctx,EmberNodeId node,unsigned
int kk_tsl_set_colorlight_Brightness(jrpc_context * ctx,EmberNodeId node,unsigned char ep,void* data)
{
int value = *(uint8_t*)data;
int value = *(int*)data;
EmberStatus status = 0;
emberAfAppPrintln("[tsl set:kk_tsl_set_colorloght_Brightness],value=0x%02x",value);
if(node==EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_NODE_ID){
......@@ -375,7 +375,7 @@ int kk_tsl_set_colorlight_Brightness(jrpc_context * ctx,EmberNodeId node,unsigne
int kk_tsl_set_colorlight_mode(jrpc_context * ctx,EmberNodeId node,unsigned char ep,void* data)
{
int value = *(uint8_t*)data;
int value = *(int*)data;
EmberStatus status = EMBER_ERR_FATAL;
kk_dev_config_item_extra_data *mode;
int ix = 1;
......
......@@ -20,4 +20,13 @@ else
/home/kk/kk_midware >/dev/null 2>&1 &
/home/kk/kcloud >/dev/null 2>&1 &
fi
sleep 30
PIDS=`ps|grep Z3GatewayHost |grep -v grep | awk '{print $1}'`
if [ "$PIDS" != "" ]; then
echo "Z3GatewayHost is runing!"
else
echo "Z3GatewayHost is not running ,now restart Z3GatewayHost"
pgrep Z3GatewayHost | xargs kill -s 9
/home/kk/Z3GatewayHost -f x -p /dev/ttyS0 >/dev/null 2>&1 &
fi
done
.PHONY: doc detect config reconfig toolchain sub-mods final-out env cmake one help package squashfs
.PHONY: doc detect config reconfig toolchain sub-mods final-out env cmake one help package squashfs firmware
all: detect config toolchain sub-mods final-out
$(TOP_Q) \
......@@ -208,7 +208,7 @@ package:
cp -rf $(TOP_DIR)/process_check.sh $(TOP_DIR)/$(releaseDir)/
cp -rf $(TOP_DIR)/platform/zigbee/app/builder/Z3GatewayHost/ZB/dev_config_table $(TOP_DIR)/$(releaseDir)/
cp -rf $(TOP_DIR)/platform/zigbee/app/builder/Z3GatewayHost/ZB/dev_map_table.json $(TOP_DIR)/$(releaseDir)/
cp -rf $(TOP_DIR)/platform/zigbee/app/builder/Z3GatewayHost/ZB/dev_map_table.json $(TOP_DIR)/$(releaseDir)/dev_config_table/
ifeq ($(CONFIG_VENDOR),ubuntu)
cp -rf $(TOP_DIR)/common/nanomsg/libnanomsg_ubuntu.so $(TOP_DIR)/$(releaseDir)/lib/libnanomsg.so.5
cp -rf $(TOP_DIR)/common/ev/libev_ubuntu.so $(TOP_DIR)/$(releaseDir)/lib
......@@ -227,7 +227,6 @@ squashfs: package
rm -rf kkdir kkdir.squashfs
mkdir kkdir
cp zlog.conf $(TOP_DIR)/$(releaseDir)
cp -rf $(TOP_DIR)/$(releaseDir) $(TOP_DIR)/kkdir/
cp -rf $(TOP_DIR)/app.sh $(TOP_DIR)/kkdir/
TOP_DIR='$(TOP_DIR)' $(TOP_DIR)/tools/mk2fs/mk2fs.sh
......@@ -235,6 +234,19 @@ squashfs: package
rm -rf kkdir kkdir.squashfs
echo $(PWD)
firmware:
@echo "build firmware"
ifneq (ap86-key-factory.bin, $(wildcard ap86-key-factory.bin))
@echo "================请把包括产测的固件ap86-key-factory.bin放在当前目录下================="
exit 1
endif
cp -rf $(TOP_DIR)/ap86-key-factory.bin $(TOP_DIR)/tools/mk2fs/
cd $(TOP_DIR)/tools/mk2fs/ && ./mkfirmware-ap86-key.sh
mv $(TOP_DIR)/tools/mk2fs/ap86-key-new-zone-factory-burn-firmware.bin $(TOP_DIR)/
rm $(TOP_DIR)/tools/mk2fs/ap86-key-factory.bin
@echo "build firmware success"
ifeq ($(shell uname),Darwin)
KCONFIG_MCONF := tools/prebuilt/macos/kconfig-frontends-mac/kconfig-mconf
else
......
#!/bin/sh
output="ap86-key-new-zone-factory-burn-firmware.bin"
tr "\000" "\377" < /dev/zero | dd of=$output ibs=1k count=16384 2>/dev/null
dd if=ap86-uboot-v1.0.bin of=$output conv=notrunc seek=0 bs=1k 2>/dev/null
dd if=uboot-env-ap86-key.bin of=$output conv=notrunc seek=256 bs=1k 2>/dev/null
dd if=ap86-key-factory.bin of=$output conv=notrunc seek=320 bs=1k 2>/dev/null
dd if=9531-art-wifi-ok.bin of=$output conv=notrunc seek=16320 bs=1k 2>/dev/null
此文件夹包括art、uboot、uboot-env、带产测的ota固件共四种bin文件
使用方法:替换最新版本的ap86-key-factory.bin文件,然后执行mkfirmware-ap86-key.sh脚本
生成文件:生成的<ap86-key-new-zone-factory-burn-firmware.bin>文件是工厂烧录固件
This diff is collapsed.
This diff is collapsed.
{
"schema": "https://iot-ap.ikonke.com/model/product_1008.json",
"productType": "sensor",
"profile": {
"heartbeat": "3000",
"productCode": "1008",
"productName": "铂金系列长供电SOS"
},
"services": [{
"outputData": [{
"identifier": "SosState",
"name": "紧急按钮状态",
"dataType": {
"type": "enum",
"specs": {
"0": "关闭",
"1": "打开"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "get",
"inputData": ["SosState", "Battery"],
"method": "thing.service.property.get",
"name": "get",
"required": true,
"callType": "async",
"desc": "属性获取"
}],
"properties": [{
"identifier": "SosState",
"name": "门磁状态",
"accessMode": "r",
"required": true,
"dataType": {
"type": "enum",
"specs": {
"0": "关闭",
"1": "打开"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"accessMode": "r",
"required": false,
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"events": [{
"outputData": [{
"identifier": "SosState",
"name": "门磁状态",
"dataType": {
"type": "enum",
"specs": {
"0": "关闭",
"1": "打开"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}, {
"outputData": [{
"identifier": "SosState",
"name": "门磁状态",
"dataType": {
"type": "enum",
"specs": {
"0": "关闭",
"1": "打开"
}
}
}],
"identifier": "sosAlarm",
"method": "thing.event.alarm.post",
"name": "sosAlarm",
"type": "alarm",
"required": true,
"desc": "紧急按钮告警"
}, {
"outputData": [{
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "batteryAlarm",
"method": "thing.event.alarm.post",
"name": "batteryAlarm",
"type": "alarm",
"required": true,
"desc": "低电量告警"
}]
}
\ No newline at end of file
{
"schema": "https://iot-ap.ikonke.com/model/product_1012.json",
"productType": "sensor",
"profile": {
"heartbeat": "3000",
"productCode": "1012",
"productName": "铂金系列SOS按钮"
},
"services": [{
"outputData": [{
"identifier": "SosState",
"name": "紧急按钮状态",
"dataType": {
"type": "enum",
"specs": {
"0": "关闭",
"1": "打开"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "get",
"inputData": ["SosState", "Battery"],
"method": "thing.service.property.get",
"name": "get",
"required": true,
"callType": "async",
"desc": "属性获取"
}],
"properties": [{
"identifier": "SosState",
"name": "门磁状态",
"accessMode": "r",
"required": true,
"dataType": {
"type": "enum",
"specs": {
"0": "关闭",
"1": "打开"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"accessMode": "r",
"required": false,
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"events": [{
"outputData": [{
"identifier": "SosState",
"name": "门磁状态",
"dataType": {
"type": "enum",
"specs": {
"0": "关闭",
"1": "打开"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}, {
"outputData": [{
"identifier": "SosState",
"name": "门磁状态",
"dataType": {
"type": "enum",
"specs": {
"0": "关闭",
"1": "打开"
}
}
}],
"identifier": "sosAlarm",
"method": "thing.event.alarm.post",
"name": "sosAlarm",
"type": "alarm",
"required": true,
"desc": "紧急按钮告警"
}, {
"outputData": [{
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "batteryAlarm",
"method": "thing.event.alarm.post",
"name": "batteryAlarm",
"type": "alarm",
"required": true,
"desc": "低电量告警"
}]
}
\ No newline at end of file
{
"schema": "https://iot-ap.ikonke.com/model/product_1015.json",
"productType": "sensor",
"profile": {
"heartbeat": "3000",
"productCode": "1015",
"productName": "KPL燃气报警器"
},
"services": [{
"outputData": [{
"identifier": "GasSensorState",
"name": "燃气检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "燃气泄漏"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "get",
"inputData": ["GasSensorState", "Battery"],
"method": "thing.service.property.get",
"name": "get",
"required": true,
"callType": "async",
"desc": "属性获取"
}],
"properties": [{
"identifier": "GasSensorState",
"name": "燃气检测状态",
"accessMode": "r",
"required": true,
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "燃气泄漏"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"accessMode": "r",
"required": false,
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"events": [{
"outputData": [{
"identifier": "GasSensorState",
"name": "燃气检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "燃气泄漏"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}, {
"outputData": [{
"identifier": "GasSensorState",
"name": "燃气检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "燃气泄漏"
}
}
}],
"identifier": "gasAlarm",
"method": "thing.event.alarm.post",
"name": "gasAlarm",
"type": "alarm",
"required": true,
"desc": "燃气告警"
}, {
"outputData": [{
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "batteryAlarm",
"method": "thing.event.alarm.post",
"name": "batteryAlarm",
"type": "alarm",
"required": true,
"desc": "低电量告警"
}]
}
\ No newline at end of file
{
"schema": "https://iot-ap.ikonke.com/model/product_1020.json",
"productType": "sensor",
"profile": {
"heartbeat": "3000",
"productCode": "1020",
"productName": "环境传感器"
},
"services": [{
"outputData": [{
"identifier": "Temperature",
"name": "温度",
"dataType": {
"type": "double",
"specs": {
"min": "-40",
"max": "100",
"unit": "°C",
"unitName": "摄氏度",
"step": "0.01"
}
}
},
{
"identifier": "Humidity",
"name": "当前湿度",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
},
{
"identifier": "Illuminance",
"name": "光照度检测值",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "65535",
"unit": "Lux",
"unitName": "照度",
"step": "0.01"
}
}
}
],
"identifier": "get",
"inputData": ["Temperature", "Humidity", "Illuminance"],
"method": "thing.service.property.get",
"name": "get",
"required": true,
"callType": "async",
"desc": "属性获取"
}],
"properties": [{
"identifier": "CurrentTemperature",
"name": "当前温度",
"accessMode": "r",
"required": false,
"dataType": {
"type": "double",
"specs": {
"min": "-40",
"max": "80",
"unit": "°C",
"unitName": "摄氏度",
"step": "0.01"
}
}
},
{
"identifier": "CurrentHumidity",
"name": "当前湿度",
"accessMode": "r",
"required": false,
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}, {
"identifier": "Illuminance",
"name": "光照度检测值",
"accessMode": "r",
"required": true,
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "65535",
"unit": "Lux",
"unitName": "照度",
"step": "0.01"
}
}
}
],
"events": [{
"outputData": [{
"identifier": "Temperature",
"name": "温度",
"dataType": {
"type": "double",
"specs": {
"min": "-40",
"max": "100",
"unit": "°C",
"unitName": "摄氏度",
"step": "0.01"
}
}
},
{
"identifier": "Humidity",
"name": "当前湿度",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
},
{
"identifier": "Illuminance",
"name": "光照度检测值",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "65535",
"unit": "Lux",
"unitName": "照度",
"step": "0.01"
}
}
}
],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}]
}
\ No newline at end of file
{
"schema": "https://iot-ap.ikonke.com/model/product_1023.json",
"productType": "sensor",
"profile": {
"heartbeat": "3000",
"productCode": "1023",
"productName": "KPL门磁"
},
"services": [{
"outputData": [{
"identifier": "ContactState",
"name": "门磁状态",
"dataType": {
"type": "enum",
"specs": {
"0": "关闭",
"1": "打开"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "get",
"inputData": ["ContactState", "Battery"],
"method": "thing.service.property.get",
"name": "get",
"required": true,
"callType": "async",
"desc": "属性获取"
}],
"properties": [{
"identifier": "ContactState",
"name": "门磁状态",
"accessMode": "r",
"required": true,
"dataType": {
"type": "enum",
"specs": {
"0": "关闭",
"1": "打开"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"accessMode": "r",
"required": false,
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"events": [{
"outputData": [{
"identifier": "ContactState",
"name": "门磁状态",
"dataType": {
"type": "enum",
"specs": {
"0": "关闭",
"1": "打开"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}, {
"outputData": [{
"identifier": "ContactState",
"name": "门磁状态",
"dataType": {
"type": "enum",
"specs": {
"0": "关闭",
"1": "打开"
}
}
}],
"identifier": "contactAlarm",
"method": "thing.event.alarm.post",
"name": "contactAlarm",
"type": "alarm",
"required": true,
"desc": "门磁告警"
}, {
"outputData": [{
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "batteryAlarm",
"method": "thing.event.alarm.post",
"name": "batteryAlarm",
"type": "alarm",
"required": true,
"desc": "低电量告警"
}]
}
\ No newline at end of file
{
"schema": "https://iot-ap.ikonke.com/model/product_1024.json",
"productType": "sensor",
"profile": {
"heartbeat": "3000",
"productCode": "1024",
"productName": "KPL水浸"
},
"services": [{
"outputData": [{
"identifier": "WaterSensorState",
"name": "水浸检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "有水浸入"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "get",
"inputData": ["WaterSensorState", "Battery"],
"method": "thing.service.property.get",
"name": "get",
"required": true,
"callType": "async",
"desc": "属性获取"
}],
"properties": [{
"identifier": "WaterSensorState",
"name": "水浸检测状态",
"accessMode": "r",
"required": true,
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "有水浸入"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"accessMode": "r",
"required": false,
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"events": [{
"outputData": [{
"identifier": "WaterSensorState",
"name": "水浸检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "有水浸入"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}, {
"outputData": [{
"identifier": "WaterSensorState",
"name": "水浸检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "有水浸入"
}
}
}],
"identifier": "waterAlarm",
"method": "thing.event.alarm.post",
"name": "waterAlarm",
"type": "alarm",
"required": true,
"desc": "水浸告警"
}, {
"outputData": [{
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "batteryAlarm",
"method": "thing.event.alarm.post",
"name": "batteryAlarm",
"type": "alarm",
"required": true,
"desc": "低电量告警"
}]
}
\ No newline at end of file
{
"schema": "https://iot-ap.ikonke.com/model/product_1035.json",
"productType": "sensor",
"profile": {
"heartbeat": "3000",
"productCode": "1035",
"productName": "kit silicon labs 人体感应"
},
"services": [{
"outputData": [{
"identifier": "MotionAlarmState",
"name": "红外检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "无人",
"1": "有人"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "get",
"inputData": ["MotionAlarmState", "Battery"],
"method": "thing.service.property.get",
"name": "get",
"required": true,
"callType": "async",
"desc": "属性获取"
}],
"properties": [{
"identifier": "MotionAlarmState",
"name": "红外检测状态",
"accessMode": "r",
"required": true,
"dataType": {
"type": "enum",
"specs": {
"0": "无人",
"1": "有人"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"accessMode": "r",
"required": false,
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"events": [{
"outputData": [{
"identifier": "MotionAlarmState",
"name": "红外检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "无人",
"1": "有人"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}, {
"outputData": [{
"identifier": "MotionAlarmState",
"name": "红外检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "无人",
"1": "有人"
}
}
}],
"identifier": "motionAlarm",
"method": "thing.event.alarm.post",
"name": "motionAlarm",
"type": "alarm",
"required": true,
"desc": "红外检测告警"
}, {
"outputData": [{
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "batteryAlarm",
"method": "thing.event.alarm.post",
"name": "batteryAlarm",
"type": "alarm",
"required": true,
"desc": "低电量告警"
}]
}
\ No newline at end of file
{
"schema": "https://iot-ap.ikonke.com/model/product_135.json",
"productType": "sensor",
"profile": {
"heartbeat": "3000",
"productCode": "135",
"productName": "kit silicon labs 门磁"
},
"services": [{
"outputData": [{
"identifier": "ContactState",
"name": "门磁状态",
"dataType": {
"type": "enum",
"specs": {
"0": "关闭",
"1": "打开"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "get",
"inputData": ["ContactState", "Battery"],
"method": "thing.service.property.get",
"name": "get",
"required": true,
"callType": "async",
"desc": "属性获取"
}],
"properties": [{
"identifier": "ContactState",
"name": "门磁状态",
"accessMode": "r",
"required": true,
"dataType": {
"type": "enum",
"specs": {
"0": "关闭",
"1": "打开"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"accessMode": "r",
"required": false,
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"events": [{
"outputData": [{
"identifier": "ContactState",
"name": "门磁状态",
"dataType": {
"type": "enum",
"specs": {
"0": "关闭",
"1": "打开"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}, {
"outputData": [{
"identifier": "ContactState",
"name": "门磁状态",
"dataType": {
"type": "enum",
"specs": {
"0": "关闭",
"1": "打开"
}
}
}],
"identifier": "contactAlarm",
"method": "thing.event.alarm.post",
"name": "contactAlarm",
"type": "alarm",
"required": true,
"desc": "门磁告警"
}, {
"outputData": [{
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "batteryAlarm",
"method": "thing.event.alarm.post",
"name": "batteryAlarm",
"type": "alarm",
"required": true,
"desc": "低电量告警"
}]
}
\ No newline at end of file
{
"schema": "https://iot-ap.ikonke.com/model/product_140.json",
"productType": "sensor",
"profile": {
"heartbeat": "3000",
"productCode": "140",
"productName": "豪恩烟雾传感器"
},
"services": [{
"outputData": [{
"identifier": "SmokeSensorState",
"name": "烟雾检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "检测到烟雾"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "get",
"inputData": ["SmokeSensorState", "Battery"],
"method": "thing.service.property.get",
"name": "get",
"required": true,
"callType": "async",
"desc": "属性获取"
}],
"properties": [{
"identifier": "SmokeSensorState",
"name": "烟雾检测状态",
"accessMode": "r",
"required": true,
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "检测到烟雾"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"accessMode": "r",
"required": false,
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"events": [{
"outputData": [{
"identifier": "SmokeSensorState",
"name": "烟雾检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "检测到烟雾"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}, {
"outputData": [{
"identifier": "SmokeSensorState",
"name": "烟雾检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "检测到烟雾"
}
}
}],
"identifier": "smokeAlarm",
"method": "thing.event.alarm.post",
"name": "smokeAlarm",
"type": "alarm",
"required": true,
"desc": "烟雾告警"
}, {
"outputData": [{
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "batteryAlarm",
"method": "thing.event.alarm.post",
"name": "batteryAlarm",
"type": "alarm",
"required": true,
"desc": "低电量告警"
}]
}
\ No newline at end of file
{
"schema": "https://iot-ap.ikonke.com/model/product_141.json",
"productType": "sensor",
"profile": {
"heartbeat": "3000",
"productCode": "141",
"productName": "豪恩燃气传感器"
},
"services": [{
"outputData": [{
"identifier": "GasSensorState",
"name": "燃气检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "燃气泄漏"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "get",
"inputData": ["GasSensorState", "Battery"],
"method": "thing.service.property.get",
"name": "get",
"required": true,
"callType": "async",
"desc": "属性获取"
}],
"properties": [{
"identifier": "GasSensorState",
"name": "燃气检测状态",
"accessMode": "r",
"required": true,
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "燃气泄漏"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"accessMode": "r",
"required": false,
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"events": [{
"outputData": [{
"identifier": "GasSensorState",
"name": "燃气检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "燃气泄漏"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}, {
"outputData": [{
"identifier": "GasSensorState",
"name": "燃气检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "燃气泄漏"
}
}
}],
"identifier": "gasAlarm",
"method": "thing.event.alarm.post",
"name": "gasAlarm",
"type": "alarm",
"required": true,
"desc": "燃气告警"
}, {
"outputData": [{
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "batteryAlarm",
"method": "thing.event.alarm.post",
"name": "batteryAlarm",
"type": "alarm",
"required": true,
"desc": "低电量告警"
}]
}
\ No newline at end of file
{
"schema": "https://iot-ap.ikonke.com/model/product_26.json",
"productType": "sensor",
"profile": {
"heartbeat": "3000",
"productCode": "26",
"productName": "k人体传感器"
},
"services": [{
"outputData": [{
"identifier": "MotionAlarmState",
"name": "红外检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "无人",
"1": "有人"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "get",
"inputData": ["MotionAlarmState", "Battery"],
"method": "thing.service.property.get",
"name": "get",
"required": true,
"callType": "async",
"desc": "属性获取"
}],
"properties": [{
"identifier": "MotionAlarmState",
"name": "红外检测状态",
"accessMode": "r",
"required": true,
"dataType": {
"type": "enum",
"specs": {
"0": "无人",
"1": "有人"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"accessMode": "r",
"required": false,
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"events": [{
"outputData": [{
"identifier": "MotionAlarmState",
"name": "红外检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "无人",
"1": "有人"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}, {
"outputData": [{
"identifier": "MotionAlarmState",
"name": "红外检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "无人",
"1": "有人"
}
}
}],
"identifier": "motionAlarm",
"method": "thing.event.alarm.post",
"name": "motionAlarm",
"type": "alarm",
"required": true,
"desc": "红外检测告警"
}, {
"outputData": [{
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "batteryAlarm",
"method": "thing.event.alarm.post",
"name": "batteryAlarm",
"type": "alarm",
"required": true,
"desc": "低电量告警"
}]
}
\ No newline at end of file
{
"schema": "https://iot-ap.ikonke.com/model/product_27.json",
"productType": "sensor",
"profile": {
"heartbeat": "3000",
"productCode": "27",
"productName": "k烟雾报警器"
},
"services": [{
"outputData": [{
"identifier": "SmokeSensorState",
"name": "烟雾检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "检测到烟雾"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "get",
"inputData": ["SmokeSensorState", "Battery"],
"method": "thing.service.property.get",
"name": "get",
"required": true,
"callType": "async",
"desc": "属性获取"
}],
"properties": [{
"identifier": "SmokeSensorState",
"name": "烟雾检测状态",
"accessMode": "r",
"required": true,
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "检测到烟雾"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"accessMode": "r",
"required": false,
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"events": [{
"outputData": [{
"identifier": "SmokeSensorState",
"name": "烟雾检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "检测到烟雾"
}
}
}, {
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}, {
"outputData": [{
"identifier": "SmokeSensorState",
"name": "烟雾检测状态",
"dataType": {
"type": "enum",
"specs": {
"0": "正常",
"1": "检测到烟雾"
}
}
}],
"identifier": "smokeAlarm",
"method": "thing.event.alarm.post",
"name": "smokeAlarm",
"type": "alarm",
"required": true,
"desc": "烟雾告警"
}, {
"outputData": [{
"identifier": "Battery",
"name": "电池电量",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "0.01"
}
}
}],
"identifier": "batteryAlarm",
"method": "thing.event.alarm.post",
"name": "batteryAlarm",
"type": "alarm",
"required": true,
"desc": "低电量告警"
}]
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment