不会飞的章鱼

熟能生巧,勤能补拙;念念不忘,必有回响。

edgex 快速开始

运行 EdgeX

1
2
3
4
# ARM 架构
$ curl https://raw.githubusercontent.com/edgexfoundry/edgex-compose/v3.0/docker-compose-no-secty-arm64.yml -o docker-compose.yml; docker compose up -d
# x86 架构
$ curl https://raw.githubusercontent.com/edgexfoundry/edgex-compose/v3.0/docker-compose-no-secty.yml -o docker-compose.yml; docker compose up -d

访问localhost:4000

运行成功!

已连接设备

控制设备

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
"apiVersion":"v3",
"statusCode":200,
"event":{
"apiVersion":"v3",
"id":"dbdb46d1-c949-442d-bcd6-ddd56e9aae61",
"deviceName":"Random-Integer-Device",
"profileName":"Random-Integer-Device",
"sourceName":"Int16",
"origin":1695348707346917735,
"readings":[
{
"id":"10a280c6-f09d-4c0d-a5d7-af85213da9c0",
"origin":1695348707346917735,
"deviceName":"Random-Integer-Device",
"resourceName":"Int16",
"profileName":"Random-Integer-Device",
"valueType":"Int16",
"value":"-25263"
}
]
}
}

修改

1
2
curl -X PUT -d '{"Int16":"42", "EnableRandomization_Int16":"false"}' http://localhost:59882/api/v3/device/name/Random-Integer-Device/WriteInt16Value
{"apiVersion":"v3","statusCode":200}

再查询

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
"apiVersion":"v3",
"statusCode":200,
"event":{
"apiVersion":"v3",
"id":"949347ab-4a09-486d-a384-ba5aa876d31e",
"deviceName":"Random-Integer-Device",
"profileName":"Random-Integer-Device",
"sourceName":"Int16",
"origin":1695349035680589580,
"readings":[
{
"id":"36b60e13-06ea-4550-90a5-9d2c0982ee9c",
"origin":1695349035680589580,
"deviceName":"Random-Integer-Device",
"resourceName":"Int16",
"profileName":"Random-Integer-Device",
"valueType":"Int16",
"value":"42"
}
]
}
}
------ 本文结束------
如果本篇文章对你有帮助,可以给作者加个鸡腿~(*^__^*),感谢鼓励与支持!