In the Web of Things (WoT), a Binding provides guidance for implementing a specific IoT protocol/platform by defining vocabulary terms that can be used in a TD and rules describing how WoT operations map to protocol interactions. This document proposes a binding for LoRaWAN, defining vocabulary and rules for describing interactions with LoRaWAN end devices and gateways via a LoRaWAN “network-facing interface” (typically a local Network Server, gateway bridge, or compatible service endpoint).

More specifically, this document defines a set of vocabulary terms that can be used inside a Thing Description or Thing Model document, and associated rules which allow to describe WoT operations using Lorawan over the network. Additionally, relevant examples are provided to showcase different vocabulary terms and the associated behavior.

Introduction

LoRaWAN is commonly used in asynchronous telemetry scenarios: devices emit uplinks periodically or on change, while downlinks are scheduled (often with delivery constraints). This proposed binding therefore emphasizes observeproperty/subscribeevent for uplinks and invokeaction/writeproperty for downlinks. A TD using this LoRaWAN binding conforms if:

This document is a work in progress

URI format

This binding defines these URI schemes:

Device and gateway identification are expressed in forms via vocabulary terms (Section 4.1), rather than being forced into the URL path.

LoRaWAN Vocabulary

This section defines vocabulary terms usable inside TDs.

URI terms

Vocabulary term Description Assignment Type
lorawan:deviceEui LoRaWAN Device EUI (end device identifier) required string
lorav:gatewayModel LoRaWAN Gateway identifier (e.g., configured ID) required string
lorav:appKey Application identifier within the endpoint. required string

Form terms

Vocabulary term Description Assignment Type
lorav: mostSignificantByte When true, it describes that the byte order of the data in the Modbus message is the most significant byte first (i.e., Big-Endian). When false, it describes the least significant byte first (i.e., Little-Endian). optional boolean
lorav:bitmask Bitmask masking the returned device byte blob to extract the value optional hex string
lorav:multiplier Multiplier to multiply the returned device byte blob with to extract the true value optional float
msgtype Must be “router_config” required (router config only) string
NetID Network identifier required (router config only) Array of integers
JoinEui Range of join EUIs accepted by the router required (router config only) 2-dimensional Array of integers
region Region code required (router config only) string
hwspec Chip type and version required (router config only) string
freq_range Frequency range of the region required (router config only) Array of integers
DRs Data rates array containing [spreading factor, bandwidth and downlink flag] triples required (router config only) 2-dimensional Array of integers
<chipName>_conf region-specific radio frequencies for a specific LoRaWAN transceiver chip required (router config only) Array
nocca Disable Clear Channel Assessment flag required (router config only) boolean
nodc Disable duty-cycle limitations flag required (router config only) boolean
nodwell Disable dwell time limitations flag required (router config only) boolean

Payload DataType

The PayloadDataType class within a LoRaWAN binding instance serves as value for the modv:type property to specify the expected data types of payload content in LoRaWAN messages. It offers a set of terms taken from XML Schema [[XMLSCHEMA11-2-20120405]] to cover the most common data types used in LoRaWAN messages. Note that the PayloadDataType entity is designed for describing established conventions in the LoRaWAN ecosystem; future development might remove this functionality or add new terms. Currently, the PayloadDataType class contains the following data types:

Mappings

This section describes the strategies and default values to use protocol specific concepts within the WoT Interaction model.

Default mappings

Map WoT Interaction model verbs to default values if any

Operation Default Binding

Possible mappings

TODO: This section should describe other mappings that can be used by TD designers. It is meant to be informative but it provides guidelines for implementers.

Examples

{
  "@context": [
    "https://www.w3.org/2022/wot/td/v1.1"
  ],
  "id": "urn:dragino-lht-65n-e3",
  "securityDefinitions": {
    "nosec_sc": {
      "scheme": "nosec"
    }
  },
  "security": [
    "nosec_sc"
  ],
  "@type": [
    "Thing"
  ],
  "name": "Dragino LHT65N-E3 A84041B98D5CB233",
  "base": "lorawan://A84041B98D5CB233/569F632C48146DBB92E7ECA0859F12A7/device",
  "title": "Dragino LHT65N-E3",
  "properties": {
    "batteryLevel": {
      "type": "number",
      "uav:mapToNodeId": "s=A84041B98D5CB233_BatteryLevel",
      "readOnly": true,
      "observable": true,
      "forms": [
        {
          "href": "A84041B98D5CB233/0?quantity=2",
          "type": "xsd:short",
          "lorav:mostSignificantByte": true,
          "lorav:bitmask": "0x3FFF",
          "lorav:multiplier": 0.001
        }
      ]
    },
    "temperature": {
      "type": "number",
      "uav:mapToNodeId": "s=A84041B98D5CB233_Temperature",
      "readOnly": true,
      "observable": true,
      "forms": [
        {
          "href": "A84041B98D5CB233/2?quantity=2",
          "type": "xsd:short",
          "lorav:mostSignificantByte": true,
          "lorav:multiplier": 0.01
        }
      ]
    },
    "humidity": {
      "type": "number",
      "uav:mapToNodeId": "s=A84041B98D5CB233_Humidity",
      "readOnly": true,
      "observable": true,
      "forms": [
        {
          "href": "A84041B98D5CB233/4?quantity=2",
          "type": "xsd:short",
          "lorav:mostSignificantByte": true,
          "lorav:multiplier": 0.1
        }
      ]
    },
    "extTemperature": {
      "type": "number",
      "uav:mapToNodeId": "s=A84041B98D5CB233_ExternalTemperature",
      "readOnly": true,
      "observable": true,
      "forms": [
        {
          "href": "A84041B98D5CB233/7?quantity=2",
          "type": "xsd:short",
          "lorav:mostSignificantByte": true,
          "lorav:multiplier": 0.01
        }
      ]
    }
  }
}
        
{
  "@context": [
    "https://www.w3.org/2019/wot/td/v1"
  ],
  "id": "urn:dev:ops:lorawan:router:eu868:sx1301",
  "securityDefinitions": {
    "nosec_sc": {
      "scheme": "nosec"
    }
  },
  "security": [
    "nosec_sc"
  ],
  "@type": [
    "Thing"
  ],
  "name": "SX1301 EU868 2CCF67FFFEFB3C8F",
  "base": "lorawan://2CCF67FFFEFB3C8F/SX1301EU/routerconfig",
  "title": "LoRaWAN Router Config - EU868 SX1301",
  "properties": {
    "routerConfig": {
      "type": "object",
      "uav:mapToNodeId": "s=2CCF67FFFEFB3C8F_RouterConfig",
      "readOnly": true,
      "forms": [
        {
          "msgtype": "router_config",
          "NetID": [ 1 ],
          "JoinEui": [ [ 0, -1 ] ],
          "region": "EU863",
          "hwspec": "sx1301/1",
          "freq_range": [ 863000000, 870000000 ],
          "DRs": [
            [ 12, 125, 0 ],
            [ 11, 125, 0 ],
            [ 10, 125, 0 ],
            [ 9, 125, 0 ],
            [ 8, 125, 0 ],
            [ 7, 125, 0 ],
            [ 7, 250, 0 ]
          ],
          "sx1301_conf": [
            {
              "radio_0": {
                "enable": true,
                "freq": 867500000
              },
              "radio_1": {
                "enable": true,
                "freq": 868500000
              },
              "chan_FSK": {
                "enable": true,
                "radio": 1,
                "if": 300000
              },
              "chan_Lora_std": {
                "enable": true,
                "radio": 1,
                "if": -200000,
                "bandwidth": 250000,
                "spread_factor": 7
              },
              "chan_multiSF_0": {
                "enable": true,
                "radio": 1,
                "if": -400000
              },
              "chan_multiSF_1": {
                "enable": true,
                "radio": 1,
                "if": -200000
              },
              "chan_multiSF_2": {
                "enable": true,
                "radio": 1,
                "if": 0
              },
              "chan_multiSF_3": {
                "enable": true,
                "radio": 0,
                "if": -400000
              },
              "chan_multiSF_4": {
                "enable": true,
                "radio": 0,
                "if": -200000
              },
              "chan_multiSF_5": {
                "enable": true,
                "radio": 0,
                "if": 0
              },
              "chan_multiSF_6": {
                "enable": true,
                "radio": 0,
                "if": 200000
              },
              "chan_multiSF_7": {
                "enable": true,
                "radio": 0,
                "if": 400000
              }
            }
          ],
          "nocca": true,
          "nodc": true,
          "nodwell": true
        }
      ]
    }
  }
}
        
Deploys by Netlify