
actility/iot-flow-driversThingpark X standalone IoT Flow Drivers API 镜像提供了物联网设备数据编解码的REST API服务。该镜像从公共仓库下载驱动并存储在本地内存中,通过暴露8095端口提供API访问,方便用户实现物联网设备数据的编码(下行链路)与解码(上行链路)功能。
适用于需要与物联网设备进行数据交互的场景,例如:
通过以下命令拉取Docker镜像:
bashdocker pull actility/iot-flow-drivers
运行容器时需暴露8095端口以访问API服务:
bashdocker run -d -p 8095:8095 actility/iot-flow-drivers
容器运行后,可通过以下URL访问Swagger UI,查看完整API文档及使用示例:
http://localhost:8095/v1/swagger-ui
通过GET请求获取所有可用驱动列表:
bashcurl -X GET http://localhost:8095/v1/drivers
示例响应:
json[ { "id": "{driverId}", "producerId": "example", "moduleId": "myDriver", "version": "1" } ]
将业务数据编码为设备可识别的二进制载荷:
bashcurl -X POST \ http://localhost:8095/v1/encode \ -H 'Content-Type: application/json' \ -d '{ "direction": "downlink", "meta": { "driverId": "${driverId}", "lorawan": { "fPort": 15 } }, "message": { "temperature": 23.5, "humidity": 65.0 } }'
示例响应:
json{ "direction": "downlink", "meta": { "driverId": "${driverId}" }, "message": { "temperature": 23.5, "humidity": 65.0 }, "raw": { "binary": "{payload_in_hexadecimal}" } }
其中{payload_in_hexadecimal}为驱动生成的十六进制原始载荷。
将设备原始二进制载荷解码为业务数据:
bashcurl -X POST \ http://localhost:8095/v1/decode \ -H 'Content-Type: application/json' \ -d '{ "direction": "uplink", "meta": { "driverId": "${driverId}" }, "raw": { "binary": "{payload_in_hexadecimal}" } }'
示例响应:
json{ "direction": "uplink", "meta": { "driverId": "${driverId}" }, "thing": { "points": { "temperature": { "records": [{ "eventTime": "2019-01-01T10:00:00+01:00", "value": 23.5 }], "unitId": "Cel", "type": "double" }, "humidity": { "records": [{ "eventTime": "2019-01-01T10:00:00+01:00", "value": 65.0 }], "unitId": "%RH", "type": "double" } } }, "raw": { "binary": "{payload_in_hexadecimal}" }, "message": { "temperature": 23.5, "humidity": 65.0 } }
其中message字段为解码后的业务数据。
支持同时解码多个设备的原始数据,可使用不同驱动:
bashcurl -X POST \ http://localhost:8095/v1/decode \ -H 'Content-Type: application/json' \ -d '[ { "id": "correlationId1", "input": { "direction": "uplink", "meta": { "driverId": "${driverId1}" }, "raw": { "binary": "${payload_in_hexadecimal1}" } } }, { "id": "correlationId2", "input": { "direction": "uplink", "meta": { "driverId": "${driverId2}" }, "raw": { "binary": "${payload_in_hexadecimal2}" } } } ]'
示例响应包含每个请求的解码结果,通过id字段关联原始请求。

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务