device-bacnet-c v4.0.2 配置说明文档
device-bacnet-c 配置说明文档一、配置文件类型与格式文件类型格式目录说明主配置configuration.yamlYAMLres/服务主配置唯一格式设备 ProfileJSON或YAMLProfilesDir两种格式均支持SDK 优先扫描.yaml再扫描.json设备实例JSONDevicesDir仅支持 JSONProvision WatcherJSONProvisionWatchersDir仅支持 JSON二、主配置文件configuration.yaml完整配置模板Writable:LogLevel:INFOInsecureSecrets:{}Telemetry:Interval:30sPublishTopicPrefix:edgex/telemetryMetrics:EventsSent:falseReadingsSent:falseReadCommandsExecuted:falseSecuritySecretsRequested:falseSecuritySecretsStored:falseService:Host:127.0.0.1Port:59980RequestTimeout:5sStartupMsg:BACnet device service startedHealthCheckInterval:10sServerBindAddr:MaxRequestSize:0CORSConfiguration:EnableCORS:falseCORSAllowCredentials:falseCORSAllowedOrigin:https://localhostCORSAllowedMethods:GET, POST, PUT, PATCH, DELETECORSAllowedHeaders:Authorization, Accept, Accept-Language, Content-Language, Content-Type, X-Correlation-IDCORSExposeHeaders:Cache-Control, Content-Language, Content-Length, Content-Type, Expires, Last-Modified, Pragma, X-Correlation-IDCORSMaxAge:3600Device:DataTransform:trueDiscovery:Enabled:trueInterval:0MaxCmdOps:0MaxEventSize:0Labels:[]ProfilesDir:./res/profilesDevicesDir:./res/devicesProvisionWatchersDir:./res/provision_watchersEventQLength:0AllowedFails:0DeviceDownTimeout:0UpdateLastConnected:falseClients:core-metadata:Host:127.0.0.1Port:59881core-command:Host:127.0.0.1Port:59882MessageBus:Disabled:falseType:mqttProtocol:tcpHost:127.0.0.1Port:1883BaseTopicPrefix:edgexAuthMode:noneSecretName:Optional:ClientId:device-bacnetQos:0KeepAlive:60Retained:falseCertFile:KeyFile:SkipCertVerify:falseRegistry:Type:keeperHost:127.0.0.1Port:59890SecretStore:Type:vaultHost:127.0.0.1Port:8200Protocol:httpPath:device-bacnet/RootCaCertPath:ServerName:TokenFile:/tmp/edgex/secrets/device-bacnet/secrets-token.jsonAuthentication:AuthType:X-Vault-TokenSecretsFile:DisableScrubSecretsFile:falseDriver:# BACnet/IPBBMD_ADDRESS:BBMD_PORT:# BACnet/MSTPDefaultDevicePath:/dev/ttyUSB0配置项说明Writable — 运行时可动态修改路径类型默认值Writable/LogLevelstringINFOWritable/InsecureSecretsmap{}Writable/Telemetry/Intervalstring30sWritable/Telemetry/PublishTopicPrefixstringedgex/telemetryWritable/Telemetry/Metrics/EventsSentboolfalseWritable/Telemetry/Metrics/ReadingsSentboolfalseWritable/Telemetry/Metrics/ReadCommandsExecutedboolfalseWritable/Telemetry/Metrics/SecuritySecretsRequestedboolfalseWritable/Telemetry/Metrics/SecuritySecretsStoredboolfalseService — 服务基本配置路径类型默认值Service/Hoststring主机名Service/Portint59999Service/RequestTimeoutstring5sService/StartupMsgstringService/HealthCheckIntervalstringService/ServerBindAddrstringService/MaxRequestSizeint0Service/CORSConfiguration/EnableCORSboolfalseService/CORSConfiguration/CORSAllowCredentialsboolfalseService/CORSConfiguration/CORSAllowedOriginstringhttps://localhostService/CORSConfiguration/CORSAllowedMethodsstringGET, POST, PUT, PATCH, DELETEService/CORSConfiguration/CORSAllowedHeadersstringAuthorization, Accept, Accept-Language, Content-Language, Content-Type, X-Correlation-IDService/CORSConfiguration/CORSExposeHeadersstringCache-Control, Content-Language, Content-Length, Content-Type, Expires, Last-Modified, Pragma, X-Correlation-IDService/CORSConfiguration/CORSMaxAgeint3600Device — 设备管理配置路径类型默认值Device/DataTransformbooltrueDevice/Discovery/EnabledbooltrueDevice/Discovery/Intervalint0Device/MaxCmdOpsint0Device/MaxEventSizeint0Device/Labels[]string[]Device/ProfilesDirstringDevice/DevicesDirstringDevice/ProvisionWatchersDirstringDevice/EventQLengthint0Device/AllowedFailsint0Device/DeviceDownTimeoutint0Device/UpdateLastConnectedboolfalseClients — 依赖服务地址路径类型默认值Clients/core-metadata/Hoststring—Clients/core-metadata/Portint0Clients/core-command/Hoststring—Clients/core-command/Portint0环境变量覆盖CLIENTS_CORE_METADATA_HOST、CLIENTS_CORE_METADATA_PORT、CLIENTS_CORE_COMMAND_HOST、CLIENTS_CORE_COMMAND_PORTMessageBus — 消息总线路径类型默认值MessageBus/DisabledboolfalseMessageBus/TypestringmqttMessageBus/ProtocolstringMessageBus/HoststringlocalhostMessageBus/Portint0MessageBus/BaseTopicPrefixstringedgexMessageBus/AuthModestringnoneMessageBus/SecretNamestringMessageBus/Optional/ClientIdstringMessageBus/Optional/Qosint0MessageBus/Optional/KeepAliveint60MessageBus/Optional/RetainedboolfalseMessageBus/Optional/CertFilestringMessageBus/Optional/KeyFilestringMessageBus/Optional/SkipCertVerifyboolfalseRegistry — 注册中心路径类型默认值Registry/Typestring—Registry/Hoststring—Registry/Portint—SecretStore — 密钥存储路径类型默认值SecretStore/TypestringvaultSecretStore/HoststringlocalhostSecretStore/Portint8200SecretStore/ProtocolstringhttpSecretStore/Pathstringsvcname/SecretStore/RootCaCertPathstringSecretStore/ServerNamestringSecretStore/TokenFilestring/tmp/edgex/secrets/svcname/secrets-token.jsonSecretStore/Authentication/AuthTypestringX-Vault-TokenSecretStore/SecretsFilestringSecretStore/DisableScrubSecretsFileboolfalseDriver — 设备驱动BACnet专用路径适用模式类型默认值Driver/BBMD_ADDRESSBACnet/IPstringDriver/BBMD_PORTBACnet/IPstringDriver/DefaultDevicePathBACnet/MSTPstring/dev/ttyUSB0三、设备 ProfileJSON / YAML支持两种格式存放在Device/ProfilesDir目录。SDK 先扫描.yaml再扫描.json。{name:BAC-5901CE,manufacturer:KMC,model:BAC-5901CE,labels:[B-AAC],description:KMC BAC-5901 BACnet General Purpose Controller,apiVersion:v3,deviceResources:[{name:Temperature,description:Get the current temperature,attributes:{type:analog-input,instance:1,property:present-value,index:4294967295},properties:{valueType:Float32,readWrite:R,units:Degrees Fahrenheit,defaultValue:0,minimum:,maximum:,mask:0,shift:0,scale:1,offset:0,base:0,assertion:,mediaType:},tags:{}}],deviceCommands:[{name:ActiveSetpoints,readWrite:RW,resourceOperations:[{deviceResource:ActiveCoolingSetpoint,defaultValue:,mappings:{}}],tags:{}}]}deviceResource 字段字段类型必填说明namestring是资源名称descriptionstring否资源描述attributesmap是BACnet 特定属性attributes/typestring | int是BACnet 对象类型attributes/instanceint是BACnet 对象实例号attributes/propertystring | int否默认present-valueBACnet 属性attributes/indexint否默认无索引数组属性索引properties/valueTypestring是数据类型properties/readWritestring是R/RW/Wproperties/unitsstring否单位properties/defaultValuestring否默认值properties/minimumstring否最小值properties/maximumstring否最大值properties/maskstring否位掩码默认0表示不启用properties/shiftstring否位移properties/scalestring否缩放因子默认1properties/offsetstring否偏移量默认0properties/basestring否基数默认0properties/assertionstring否断言表达式properties/mediaTypestring否二进制媒体类型tagsmap否资源标签BACnet type 字符串映射analog-input/analog-output/analog-value/binary-input/binary-output/binary-value/device。其他类型用数字。BACnet property 字符串映射present-value/object-name。其他属性用数字。valueType 支持Bool/String/Uint8/Uint16/Uint32/Int8/Int16/Int32/Float32/Float64。不支持 Uint64、Int64、Enum、OctetString、Date、Time。deviceCommands 字段字段类型必填说明namestring是命令名称readWritestring是R/RW/WresourceOperations[]object是操作的资源列表resourceOperations[]/deviceResourcestring是引用的 deviceResource 名称resourceOperations[]/defaultValuestring否默认值resourceOperations[]/mappingsmap否值映射表tagsmap否命令标签四、设备实例JSON存放在Device/DevicesDir目录。仅支持 JSON。支持单个对象或对象数组。{name:KMC-BAC-5901CE,profileName:BAC-5901CE,serviceName:device-bacnet,description:KMC BAC-5901CE Device,adminState:UNLOCKED,operatingState:UP,labels:[KMC BAC 5901CE Device],tags:{},protocols:{BACnet-IP:{DeviceInstance:52,Port:0xBAC0}},autoEvents:[{sourceName:Temperature,interval:30s,onChange:false,onChangeThreshold:0.0}]}字段说明字段类型必填说明namestring是设备名称profileNamestring是关联的 Profile 名称serviceNamestring否所属服务名非必填服务自动填充descriptionstring否设备描述adminStatestring否LOCKED/UNLOCKEDoperatingStatestring否UP/DOWNlabels[]string否设备标签tagsmap否设备标签protocolsmap是协议配置autoEvents[]object否自动事件配置protocols — BACnet/IP字段类型必填默认值BACnet-IP/DeviceInstancestring是—BACnet-IP/Portstring否0xBAC0(47808)protocols — BACnet/MSTP字段类型必填默认值BACnet-MSTP/DeviceInstancestring是—BACnet-MSTP/Pathstring否服务默认路径autoEvents字段类型必填说明sourceNamestring是deviceResource 或 deviceCommand 名称intervalstring是采集间隔如30s、1m、1honChangebool否默认false仅在值变化时上报onChangeThresholdfloat否默认0.0变化阈值浮点类型五、Provision WatcherJSON存放在Device/ProvisionWatchersDir目录。仅支持 JSON。{name:BACnet-Watcher,adminState:UNLOCKED,identifiers:{Protocol:BACnet.*},blockingIdentifiers:{},discoveredDevice:{profileName:SimpleServer,adminState:UNLOCKED,autoEvents:[{sourceName:analog-output-0,interval:10s,onChange:false}]}}字段说明字段类型必填说明namestring是Watcher 名称adminStatestring否Watcher 自身状态identifiersmap是匹配规则key 为属性名value 为正则表达式blockingIdentifiersmap否阻止匹配的标识符列表discoveredDevice/profileNamestring是匹配到的设备使用的 ProfilediscoveredDevice/adminStatestring否设备初始 adminStatediscoveredDevice/autoEvents[]object否自动配置的 AutoEvent六、命令行参数参数说明-cd, --configDir dir配置文件目录-p, --profile name配置文件名-r, --registry启用注册中心-i, --instance name服务实例名后缀-h, --help帮助信息Docker 默认启动参数/device-bacnet-ip/device-bacnet-c\-cpkeeper://127.0.0.1:59890\--registry\--confdir/res七、配置优先级配置合并顺序高优先级覆盖低优先级C SDK 代码默认值config.c→edgex_common_config_defaultsedgex_private_config_defaults本项目main.c中 Driver 默认值BBMD_ADDRESS、BBMD_PORT、DefaultDevicePathconfiguration.yaml文件环境变量覆盖格式key 中/替换为_全大写。如Service/Host→SERVICE_HOSTClients 专用环境变量CLIENTS_CORE_METADATA_HOST等注册中心配置--registry时configuration.yaml仅作为 fallback八、Docker Host 网络模式最小配置Writable:LogLevel:INFOService:Host:127.0.0.1Port:59980Device:ProfilesDir:./res/profilesDevicesDir:./res/devicesClients:core-metadata:Host:127.0.0.1Port:59881core-command:Host:127.0.0.1Port:59882MessageBus:Type:mqttProtocol:tcpHost:127.0.0.1Port:1883Optional:ClientId:device-bacnetDriver:{}

相关新闻

海外短剧项目 50 条落地实操建议,一套云微海外短剧系统打通全运营闭环

海外短剧项目 50 条落地实操建议,一套云微海外短剧系统打通全运营闭环

海外短剧项目 50 条落地实操建议,一套云微海外短剧系统打通全运营闭环 问题描述 海外短剧项目在推进中,团队常遇到内容水土不服、投放成本失控、版权边界模糊、支付链路不稳定等问题。这些问题没有标准答案,但有一些共通的实操经验值得参考…

2026/10/27 22:12:21 阅读更多 →
ASTM D4169模拟运输测试等级怎么选?简单对号入座

ASTM D4169模拟运输测试等级怎么选?简单对号入座

一、三个保证等级核心区别ASTM D4169 划分 I、II、III 三档测试强度,数字越小,测试严苛程度越高,核心逻辑:货物运输风险越高,对应选用更高标准等级。I 级:最高强度,模拟运输中低概率、高破坏力的…

2026/10/28 3:21:44 阅读更多 →
3个简单步骤掌握OBS Studio音频混音:打造专业级直播音效的完整指南

3个简单步骤掌握OBS Studio音频混音:打造专业级直播音效的完整指南

3个简单步骤掌握OBS Studio音频混音:打造专业级直播音效的完整指南 【免费下载链接】obs-studio OBS Studio - Free and open source software for live streaming and screen recording 项目地址: https://gitcode.com/GitHub_Trending/ob/obs-studio 你是否…

2026/10/25 8:39:58 阅读更多 →

最新新闻

Electron桌面应用开发实战:从环境搭建到打包发布全流程

Electron桌面应用开发实战:从环境搭建到打包发布全流程

做前端这些年,我大部分时间都在跟浏览器标签页打交道,直到第一次把桌面应用跑起来,才发现原来自己一直被限制在地址栏和刷新按钮围起来的框框里。Electron这个词,最开始是在某段时间频繁出现在同事的讨论里,一个用HTML…

2026/10/27 17:33:32 阅读更多 →
滑盖智能锁T109深度解析:结构原理、安装调试与故障排查

滑盖智能锁T109深度解析:结构原理、安装调试与故障排查

简介:亚太天能T109滑盖智能锁产品说明书是一份PDF格式的官方技术文档,主要面向智能锁安装人员、终端用户及售后维护者,帮助快速掌握产品安装、配置与常见故障处理。全包仅1个PDF文件,大小4.37MB,内容结构清晰&#xff…

2026/10/28 7:28:00 阅读更多 →
PMSM弱磁控制原理与Simulink建模:高速AGV驱动系统设计指南

PMSM弱磁控制原理与Simulink建模:高速AGV驱动系统设计指南

上个月我在调试一台高速AGV的驱动系统,整车要求空载跑到8m/s,电机转速已经拉到额定点,驱动器的输出电压也顶到了母线电压极限附近。再往上踩速度指令,转速纹丝不动,三相电流反而开始震荡。那会儿我的第一反应就是&…

2026/10/28 9:02:11 阅读更多 →
C++核心知识点:从内存管理到STL的实战指南

C++核心知识点:从内存管理到STL的实战指南

C 这门语言我前前后后折腾了十几年,用它写过嵌入式驱动、做过游戏服务端,也搭过基础组件库。每次看到新人一头扎进"C 核心知识点"这个搜索词,我其实挺感慨的——这门语言的难点从来不是语法多,而是知识点之间的耦合太深…

2026/10/27 18:20:50 阅读更多 →
T109滑盖智能锁怎么装?安装调试与故障排查全攻略

T109滑盖智能锁怎么装?安装调试与故障排查全攻略

简介:亚太天能T109滑盖智能锁产品说明书以PDF格式发布,适合智能锁用户、安装人员与售后维修人员阅读。内容围绕T109系列指纹密码刷卡锁展开,先介绍前面板、后面板、锁体、机械钥匙、电池盒盖等部件名称与功能,再给出完整安装步骤&…

2026/10/28 9:00:54 阅读更多 →
LLM知识降熵:从信息垄断到理解权下放

LLM知识降熵:从信息垄断到理解权下放

你有没有过这种经历:翻开源码注释、论文摘要或者一份专业报告,每个字都认识,连在一起却像天书。想找人聊聊,身边要么没人懂,要么懂的懒得跟你解释。后来我试着把同一段内容丢给一个大语言模型,几秒钟之后&a…

2026/10/28 7:29:02 阅读更多 →

日新闻

周新闻

月新闻

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/27 13:55:19 阅读更多 →
Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/28 9:01:47 阅读更多 →
黑夜航拍船只数据集训练YOLOV5模型全流程解析

黑夜航拍船只数据集训练YOLOV5模型全流程解析

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/27 19:19:37 阅读更多 →