Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

[Device] value attribute  #280

Open
Open
@dherykw

Description

Hello all,

We are working closely with this data model and it is very difficult for us to deal with the value attribute, maybe it is a good moment to split the data model into more specific structures.

Allow me to make a brief description of my proposal.

Current data model representation example:

Device Datamodel:
{
"id": "device-9845A",
"type": "Device",
"category": ["sensor"],
"controlledProperty": ["humidity","temperature"],
"controlledAsset": ["wastecontainer-Osuna-100"],
"ipAddress": ["192.14.56.78"],
"mcc": "214",
"mnc": "07",
"batteryLevel": 0.75,
"serialNumber": "9845A",
"refDeviceModel": "myDevice-wastecontainer-sensor-345",
"value": "h=65;t=21.2",
"deviceState": "ok",
"dateFirstUsed": "2014-09-11T11:00:00Z",
"owner": ["http://person.org/leon"]
}

Proposed data model representation example:

Device Datamodel
{
"id": "device-9845A",
"type": "Device",
"controlledAsset": ["wastecontainer-Osuna-100"],
"ipAddress": ["192.14.56.78"],
"mcc": "214",
"mnc": "07",
"batteryLevel": 0.75,
"serialNumber": "9845A",
"refDeviceModel": "myDevice-wastecontainer-sensor-345",
"deviceState": "ok",
"dateFirstUsed": "2014-09-11T11:00:00Z",
"owner": ["http://person.org/leon"]
}

Sensor Datamodel
{
"id": "temperature-9845A",
"refDevice": "device-9845A",
"characteristic": ["readable"],
"target": "temperature",
"type": "Sensor",
"metric": "ºC",
"value": "28.5"
}

{
"id": "humidity-9845A",
"refDevice": "device-9845A",
"characteristic": ["readable"],
"target": "humidity",
"type": "Sensor",
"metric": "%",
"value": "68"
}

Going a little further it would interesting even extract the communication protocol, leaving to the device data model the only responsibility of representing a device itself.

Best regards and thanks for your contributions. 👍

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions