Repository navigation
v0.8.5
[0.8.5] - 2026-11-21
新增
- 物模型属性独立页与属性级控制下发:属性从模型抽屉独立为页面(
/industrial/thing-model/:id/properties,支持按标识符/名称筛选、点位抽屉与「控制下发」入口)。一个属性可绑定多台设备的点位,属性控制页按设备分行、逐台确认写入;实时页与属性页共用写入弹窗(ControlWriteDialog)。 - 物模型菜单开关:运行开关新增
ui.thingModelMenu.enabled(default.yaml的ui段,热读)。关闭只隐藏左侧「物模型」菜单,路由、数据与采集均不受影响。 - 开放接口点位对象补充属性字段:4.3 批量点位标签与 4.4/4.5 点位对象统一返回
propertyId/propertyIdentifier/propertyName/propertyModelId/propertyModelName(未绑定为空串);新增listAllThingModelProperties跨模型属性下拉,并镜像到/agentApi。 - Apache IoTDB 2.x 推送通道:新增
iotdb-v2时序通道,经官方 Go 原生客户端(Thrift RPC,纯 Go 免 CGO,默认 6667)写入 IoTDB 2.x 树模型。每个(设备, 点位)映射为设备路径{database}.{device}_{address}_{hash},value 按kind落到value_bool/value_int/value_float/value_str测量列,quality与物模型/属性编码逐行写入;支持单机与集群(nodes)、TLS、RPC 压缩、攒批与断网缓存补发。序列依赖服务端enable_auto_create_schema=true(2.x 默认)。
变更
- 物模型不再绑定设备:移除
deviceIds与设备页的物模型选择(device.model_id列仅保留旧库兼容),属性通过addressIds直接绑定任意设备的点位,单次上限仍为 200。采集记录的thingModelCode改由点位绑定的属性所属模型推导。开放接口配置同步支持点位级modelCode,设备级modelCode仅作默认命名空间;设备导入模板由 6 列减为 5 列(去掉「物模型」)。物模型删除保护改为仅看属性是否仍被点位绑定(41005)。 - 推送按「设备 + 采集组 + 物模型」拆帧:同一设备的点位绑定不同模型时拆成多帧,保证帧内
thingModelCode一致、主题模板不串。 - 接口调整:移除
listThingModelDeviceOptions、listThingModelDevices与物模型列表的deviceCount;listThingModelPointOptions改为返回全部设备点位;设备点位对象补充propertyModelId/propertyModelName;属性分页新增keyword(同时匹配标识符与名称)。菜单与文档中的「设备地址标签」统一更名为「设备点位」。 - 时序入库组件独立为可复用 Go 模块:新增仓库内模块
github.com/Ellisata/iot-gateway/tsdb,集中通用记录模型、Writer/Sink契约、投递层(非阻塞队列、断网缓存、补发与最近写入观测)及 TDengine / InfluxDB / IoTDB 后端;backend/push以适配器与类型别名沿用原通道 API,MQTT / HTTP / Kafka / OPC UA 通道无需改动。Docker 构建纳入tsdb/作为本地replace目标。
Added
- Standalone property page and property-level control: properties move out of the model drawer into their own page (
/industrial/thing-model/:id/properties, with identifier/name search, a point drawer and a control entry). One property may bind points across devices; the property control page lists devices separately and confirms each write per device. The realtime page and the property control page share one write dialog (ControlWriteDialog). - Thing-model menu switch: runtime config gains
ui.thingModelMenu.enabled(uisection ofdefault.yaml, hot-read). Turning it off only hides the sidebar entry; routes, data and collection are unaffected. - OpenAPI point objects gain property fields: batch point labels (4.3) and point objects (4.4/4.5) now return
propertyId/propertyIdentifier/propertyName/propertyModelId/propertyModelName(empty when unbound). AddslistAllThingModelPropertiesfor a cross-model property picker, mirrored to/agentApi. - Apache IoTDB 2.x push channel: a new
iotdb-v2time-series channel writes to the IoTDB 2.x tree model through the official Go native client (Thrift RPC, pure Go, CGO-free, port 6667). Each(device, point)maps to a device path{database}.{device}_{address}_{hash}; values land invalue_bool/value_int/value_float/value_strmeasurements bykind, withqualityand thing-model/property codes written row by row. Supports standalone and cluster (nodes), TLS, RPC compression, batching and offline spool replay. Time-series auto-creation relies on the server'senable_auto_create_schema=true(the 2.x default).
Changed
- Thing models no longer bind devices:
deviceIdsand the device-page model picker are removed (device.model_idis kept only for old databases). Properties bind points of any device throughaddressIds, still capped at 200 per request.thingModelCodein collection records is derived from the model owning the point's bound property. OpenAPI config sync supports point-levelmodelCodewith device-levelmodelCodeas the default namespace; the device import template drops from six columns to five (no "thing model" column). Model deletion is now blocked only when its properties are still bound to points (41005). - Push frames are bucketed by device + group + thing model: points tied to different models on one device are split into separate frames so
thingModelCodestays consistent per frame and topic templates never cross models. - API changes:
listThingModelDeviceOptions,listThingModelDevicesand the model list'sdeviceCountare removed;listThingModelPointOptionsnow returns points from all devices; device point objects gainpropertyModelId/propertyModelName; property paging gainskeyword(matches identifier and name). "Device address label" is renamed to "device point" across menus and docs. - Time-series ingestion extracted into a reusable Go module: a new in-repo module
github.com/Ellisata/iot-gateway/tsdbhouses the neutral record model, theWriter/Sinkcontracts, the delivery layer (non-blocking queue, offline spool, replay and recent-write observation) and the TDengine / InfluxDB / IoTDB backends.backend/pushkeeps its channel API through an adapter and type aliases, so MQTT / HTTP / Kafka / OPC UA channels are untouched. The Docker build includestsdb/as the localreplacetarget.
Full Changelog: v0.8.4...v0.8.5