Giter Club home page Giter Club logo

Comments (3)

KevinKao809 avatar KevinKao809 commented on September 27, 2024

Zack, Owen and Cain,

有些欄位重複出現, 我依據目前 Table 欄位重新區分, 如下:

另外, Phase 2, Edge 只會送出 General 的 Properties, 不會有 Network. FYI.

此外, 這些內容, 除了 Restful API 會回傳外, Reported Properties 也會出現在 SignalR 的 Payload. (Refer to next comments).

{
"tenantId": "65af94c4-07e4-43d7-abad-3cb5f295550b",
"deviceUUID": "4b4f1ab2-18ac-483e-aedd-2aaeb2dabd59",
"group": "MOXA-ISD",
"modelName": "UC-8112-LX-CG",
"deviceType": "IIoT Gateway",
"connectionStatus": "online",
"allowConnection": true,
"imageURL": "http://123.456.net/xxx/xxx.jpg",
"logoURL": "http://123.456.net/xxx/xxx.jpg",
"lastRebootTime": "2018-08-12T20:17:46.384Z",
"lastRebootReason": "Remote Reboot on ThingsPro Server by XXX",
"reportedProperties": [
{
"id": 1,
"type": "general",
"name": "deviceName",
"description": "Device Name",
"value": "Demo Device 01"
},
{
"id": 2,
"type": "general",
"name": "firmwareVersion",
"description": "Firmware Version",
"value": "1.8.1"
},
{
"id": 3,
"type": "general",
"name": "configVersion",
"description": "Config Version",
"value": "3.1.2"
},
{
"id": 4,
"type": "network",
"name": "eth0",
"description": "Ethernet 0",
"value": [
{
"id": 1,
"name": "ipAddress",
"description": "IP Address",
"value": "192.168.3.21"
},
{
"id": 2,
"name": "mask",
"description": "Subnet Mask",
"value": "255.255.255.0"
},
{
"id": 3,
"name": "gateway",
"description": "Default Gateway",
"value": "192.168.3.254"
},
{
"id": 4,
"name": "dhcp",
"description": "DHCP",
"value": true
},
{
"id": 5,
"name": "primaryDns",
"description": "Primary DNS",
"value": "192.168.3.254"
},
{
"id": 6,
"name": "secondaryDns",
"description": "Secondary DNS",
"vaule": "10.29.11.121"
}
]
}
],
"desiredProperties": [
{
"id": 1,
"type": "general",
"name": "deviceName",
"description": "Device Name",
"value": "Demo Device 01"
},
{
"id": 2,
"type": "general",
"name": "firmwareVersion",
"description": "Firmware Version",
"value": "1.8.1"
},
{
"id": 3,
"type": "general",
"name": "configVersion",
"description": "Config Version",
"value": "3.1.2"
},
{
"id": 4,
"type": "network",
"name": "eth0",
"description": "Ethernet 0",
"value": [
{
"id": 1,
"name": "ipAddress",
"description": "IP Address",
"value": "192.168.3.21"
},
{
"id": 2,
"name": "mask",
"description": "Subnet Mask",
"value": "255.255.255.0"
},
{
"id": 3,
"name": "gateway",
"description": "Default Gateway",
"value": "192.168.3.254"
},
{
"id": 4,
"name": "dhcp",
"description": "DHCP",
"value": true
},
{
"id": 5,
"name": "primaryDns",
"description": "Primary DNS",
"value": "192.168.3.254"
},
{
"id": 6,
"name": "secondaryDns",
"description": "Secondary DNS",
"vaule": "10.29.11.121"
}
]
}
],
"reportedLastUpdatedAt": "2018-08-12T20:17:46.384Z",
"desiredLastUpdatedAt": "2018-08-12T20:17:46.384Z",
"createdAt": "2018-08-12T20:17:46.384Z",
"updatedAt": "2018-08-12T20:17:46.384Z"
}

from oapi-doc.

KevinKao809 avatar KevinKao809 commented on September 27, 2024

Zack, SignalR 裡, 會主動提供 SystemProperties 更新的資料, payload 如下:

{
"tenantId": "65af94c4-07e4-43d7-abad-3cb5f295550b",
"deviceUUID": "4b4f1ab2-18ac-483e-aedd-2aaeb2dabd59",
"dataSource": "systemProperties",
"group": "MOXA-ISD",
"connectionStatus": "online",
"allowConnection": true,
"lastRebootTime": "2018-08-12T20:17:46.384Z",
"lastRebootReason": "Remote Reboot on ThingsPro Server by XXX",
"reportedProperties": [
{
"id": 1,
"type": "general",
"name": "deviceName",
"description": "Device Name",
"value": "Demo Device 01"
},
{
"id": 2,
"type": "general",
"name": "firmwareVersion",
"description": "Firmware Version",
"value": "1.8.1"
},
{
"id": 3,
"type": "general",
"name": "configVersion",
"description": "Config Version",
"value": "3.1.2"
},
{
"id": 4,
"type": "network",
"name": "eth0",
"description": "Ethernet 0",
"value": [
{
"id": 1,
"name": "ipAddress",
"description": "IP Address",
"value": "192.168.3.21"
},
{
"id": 2,
"name": "mask",
"description": "Subnet Mask",
"value": "255.255.255.0"
},
{
"id": 3,
"name": "gateway",
"description": "Default Gateway",
"value": "192.168.3.254"
},
{
"id": 4,
"name": "dhcp",
"description": "DHCP",
"value": true
},
{
"id": 5,
"name": "primaryDns",
"description": "Primary DNS",
"value": "192.168.3.254"
},
{
"id": 6,
"name": "secondaryDns",
"description": "Secondary DNS",
"vaule": "10.29.11.121"
}
]
}
]
}

from oapi-doc.

KevinKao809 avatar KevinKao809 commented on September 27, 2024
  1. 修正 group => deviceGroup, 以及他會是 Array
  2. 拆分 Desired and Reported Properties 到其他 EndPoint
  3. SignalR device systemProperties 加入 reportedLastUpdatedAt 欄位.
    DevicePayloadSpec.zip

from oapi-doc.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.