Skip to main content

萤石云摄像头驱动

AIRIOT 与 摄像头对接说明


本驱动主要实现摄像头的预览回放和云台控制功能。

使用本驱动时,需要平台所在服务器能连接到萤石云。

1、登录萤石开放平台(没有账号的话,先注册),在基础服务-账号中心-应用信息,创建一个应用,创建应用,后边配置airiot平台驱动时,

萤石云创建aksk

2、打开设备监控-驱动管理,点击添加驱动,在厂商驱动-海康威视中,选择driver-ezviz。

添加驱动实例

3、驱动配置

一般情况下,如果实例配置、设备表配置、表记录配置中存在相同的字段,优先级依次升高,不填时默认继承上一级的配置。

实例配置

驱动实例配置中,可填写第一步从萤石云平台中,获取的AppKey和Secret。 实例配置

设备表配置

在数据管理页面中,新建设备表,选择上一步创建的驱动实例。 设备表设备配置-设备配置 数据点和指令如图填写, 数据点可只填写state。 设备表设备配置-数据点和指令

表记录配置

表记录设备配置

萤石设备参考( https://www.yuque.com/u2038998/qa5rn7/sn0vhx#pbx57 )查看怎么获取设备序列号和验证码。 海康设备可通过配置页面查询序列号,序列号为设备序列号的数字部分加一个字母。或者通过ISUP的配置查看。 表记录设备配置 表记录设备配置 设备配置中,平台接入方式选择萤石云,勾选启动,注册状态应该为在线。否则请检查设备是否能连接公网或萤石云服务器。 表记录设备配置

4、画面示例:

预览:在画面中,添加一个画面组件,右侧组件属性中,选择设备表视频,选择创建好的表记录,视频类型和视频地址会自动根据所选的表记录填写。 画面预览 云台:画面中选择云台组件,填写设备,也可以从上级组件组继承。

附录

数据点和指令配置json,可直接复制

数据点:

[
{
"policy": "change",
"errview": "不显示当前值",
"name": "在线状态",
"id": "state"
}
]

指令:

[
{
"name": "上",
"ops": {
"action": "cameraUp",
"param": "上"
},
"writeIn": {
"defaultValue": {
"default": 3
},
"ioway": "默认写入",
"type": "number"
}
},
{
"name": "下",
"ops": {
"action": "cameraDown",
"param": "下"
},
"writeIn": {
"defaultValue": {
"default": 3
},
"ioway": "默认写入",
"type": "number"
}
},
{
"name": "左",
"ops": {
"action": "cameraLeft",
"param": "左"
},
"writeIn": {
"defaultValue": {
"default": 3
},
"ioway": "默认写入",
"type": "number"
}
},
{
"name": "右",
"ops": {
"action": "cameraRight",
"param": "右"
},
"writeIn": {
"defaultValue": {
"default": 3
},
"ioway": "默认写入",
"type": "number"
}
},
{
"name": "左上",
"ops": {
"action": "cameraLeftUp",
"param": "左上"
},
"writeIn": {
"defaultValue": {
"default": 3
},
"ioway": "默认写入",
"type": "number"
}
},
{
"name": "左下",
"ops": {
"action": "cameraLeftDown",
"param": "左下"
},
"writeIn": {
"defaultValue": {
"default": 3
},
"ioway": "默认写入",
"type": "number"
}
},
{
"name": "右上",
"ops": {
"action": "cameraRightUp",
"param": "右上"
},
"writeIn": {
"defaultValue": {
"default": 3
},
"ioway": "默认写入",
"type": "number"
}
},
{
"name": "右下",
"ops": {
"action": "cameraRightDown",
"param": "右下"
},
"writeIn": {
"defaultValue": {
"default": 3
},
"ioway": "默认写入",
"type": "number"
}
},
{
"name": "放大",
"ops": {
"action": "cameraZoomIn",
"param": "放大"
},
"writeIn": {
"defaultValue": {
"default": 3
},
"ioway": "默认写入",
"type": "number"
}
},
{
"name": "缩小",
"ops": {
"action": "cameraZoomOut",
"param": "缩小"
},
"writeIn": {
"defaultValue": {
"default": 3
},
"ioway": "默认写入",
"type": "number"
}
},
{
"name": "转到指定预置位",
"ops": {
"action": "cameraPreset",
"param": "转到指定预置位"
},
"writeIn": {
"defaultValue": {
"default": 3
},
"ioway": "默认写入",
"type": "number"
}
},
{
"form": [
{
"arrayValue": null,
"ifRepeat": null,
"ioway": "默认写入",
"mod": null,
"name": "报警抓拍",
"objectValue": {
"schema": {
"form": [
"table",
"device",
"quality",
"*"
],
"key": "root",
"listFields": [
"table",
"device",
"quality"
],
"properties": {
"device": {
"canOrder": false,
"config": "文本",
"createShow": true,
"descriptionType": "tooltip",
"editShow": true,
"fieldType": "input",
"invalid": false,
"key": "device",
"listFields": true,
"need": true,
"placeholder": "被抓拍设备的编号",
"textContent": "text",
"textType": "input",
"title": "设备编号",
"type": "string"
},
"quality": {
"canOrder": false,
"config": "选择器",
"createShow": true,
"dataType": "string",
"defaultVal": "3",
"descriptionType": "tooltip",
"editShow": true,
"enum1": [
"0",
"1",
"2",
"3",
"4"
],
"enum_title1": [
"流畅",
"高清(720P)",
"4CIF",
"1080P",
"400w"
],
"fieldType": "select",
"invalid": false,
"key": "quality",
"listFields": true,
"metricStore": false,
"need": false,
"numRange": null,
"selectFace": "select",
"selectType": "single",
"title": "图片质量",
"type": "string"
},
"table": {
"canOrder": false,
"config": "文本",
"createShow": true,
"descriptionType": "tooltip",
"editShow": true,
"fieldType": "input",
"invalid": false,
"key": "table",
"listFields": true,
"need": true,
"placeholder": "被抓设备所属设备表的标识",
"textContent": "text",
"textType": "input",
"title": "表标识",
"type": "string"
}
},
"required": [
"table",
"device"
],
"title": "根对象",
"treeKey": "root",
"type": "object"
}
},
"objectValue2": null,
"select": null,
"select2": null,
"tableValue": null,
"tableValue2": null,
"tag": null,
"tagValue": null,
"type": "object"
}
],
"formSchema": {
"schema": {
"form": [
"table",
"device",
"quality",
"*"
],
"key": "root",
"listFields": [
"table",
"device",
"quality"
],
"name": "报警抓拍",
"properties": {
"device": {
"canOrder": false,
"config": "文本",
"createShow": true,
"descriptionType": "tooltip",
"editShow": true,
"fieldType": "input",
"invalid": false,
"key": "device",
"listFields": true,
"need": true,
"placeholder": "被抓拍设备的编号",
"textContent": "text",
"textType": "input",
"title": "设备编号",
"type": "string"
},
"quality": {
"canOrder": false,
"config": "选择器",
"createShow": true,
"dataType": "string",
"defaultVal": "3",
"descriptionType": "tooltip",
"editShow": true,
"enum1": [
"0",
"1",
"2",
"3",
"4"
],
"enum_title1": [
"流畅",
"高清(720P)",
"4CIF",
"1080P",
"400w"
],
"fieldType": "select",
"invalid": false,
"key": "quality",
"listFields": true,
"metricStore": false,
"need": false,
"numRange": null,
"selectFace": "select",
"selectType": "single",
"title": "图片质量",
"type": "string"
},
"table": {
"canOrder": false,
"config": "文本",
"createShow": true,
"descriptionType": "tooltip",
"editShow": true,
"fieldType": "input",
"invalid": false,
"key": "table",
"listFields": true,
"need": true,
"placeholder": "被抓设备所属设备表的标识",
"textContent": "text",
"textType": "input",
"title": "表标识",
"type": "string"
}
},
"required": [
"table",
"device"
],
"title": "报警抓拍",
"treeKey": "root",
"type": "object"
}
},
"name": "报警抓拍",
"ops": {
"action": "cameraAlarmCapture",
"param": "报警抓拍"
},
"showName": "报警抓拍",
"tag": null,
"writeOut": {
"arrayValue": null,
"defaultValue": null,
"ifRepeat": null,
"mod": null,
"objectValue": null,
"objectValue2": null,
"select": null,
"select2": null,
"tableValue": null,
"tableValue2": null,
"tag": null,
"tagValue": null
},
"writeIn": {
"arrayValue": null,
"ifRepeat": null,
"ioway": "默认写入",
"mod": null,
"objectValue": {
"schema": {
"form": [
"table",
"device",
"quality",
"*"
],
"key": "root",
"listFields": [
"table",
"device",
"quality"
],
"properties": {
"device": {
"canOrder": false,
"config": "文本",
"createShow": true,
"descriptionType": "tooltip",
"editShow": true,
"fieldType": "input",
"invalid": false,
"key": "device",
"listFields": true,
"need": true,
"placeholder": "被抓拍设备的编号",
"textContent": "text",
"textType": "input",
"title": "设备编号",
"type": "string"
},
"quality": {
"canOrder": false,
"config": "选择器",
"createShow": true,
"dataType": "string",
"defaultVal": "3",
"descriptionType": "tooltip",
"editShow": true,
"enum1": [
"0",
"1",
"2",
"3",
"4"
],
"enum_title1": [
"流畅",
"高清(720P)",
"4CIF",
"1080P",
"400w"
],
"fieldType": "select",
"invalid": false,
"key": "quality",
"listFields": true,
"metricStore": false,
"need": false,
"numRange": null,
"selectFace": "select",
"selectType": "single",
"title": "图片质量",
"type": "string"
},
"table": {
"canOrder": false,
"config": "文本",
"createShow": true,
"descriptionType": "tooltip",
"editShow": true,
"fieldType": "input",
"invalid": false,
"key": "table",
"listFields": true,
"need": true,
"placeholder": "被抓设备所属设备表的标识",
"textContent": "text",
"textType": "input",
"title": "表标识",
"type": "string"
}
},
"required": [
"table",
"device"
],
"title": "根对象",
"treeKey": "root",
"type": "object"
}
},
"objectValue2": null,
"select": null,
"select2": null,
"tableValue": null,
"tableValue2": null,
"tag": null,
"tagValue": null,
"type": "object"
}
}
]