Properties for OPC-UA Nodes

The discovery report has detailed information on the OPC-UA nodes that we can use to define the properties on our thing schema (extract of the report):
"Dynamic": { 
"BrowseName": "Dynamic", 
"Class": "Object", 
"Description": "", 
"DisplayName": "Dynamic", 
"NodeID": "ns=2;s=Demo.Dynamic", 
"Float": { 
  "BrowseName": "Float", 
  "Class": "Variable",   
  "DataType": "float32", 
  "Description": "",   
  "DisplayName": "Float", 
  "NodeID": "ns=2;s=Demo.Dynamic.Float", 
  "Writable": false 
  }, 
"Int32": { 
  "BrowseName": "Int32", 
  "Class": "Variable", 
  "DataType": "int32", 
  "Description": "", 
  "DisplayName": "Int32", 
  "NodeID": "ns=2;s=Demo.Dynamic.Int32", 
  "Writable": false 
}, 

You will use the ns=2;s=Demo.Dynamic.Float and ns=2;s=Demo.Dynamic.Int32 nodes from this report. The resulting properties are:

"ns=2;s=Demo.Dynamic.Float": { 
  "@type": "float64", 
  "readOnly": true, 
  "title": "RandomFloat", 
  "type": "number" 
}, 
"ns=2;s=Demo.Dynamic.Int32": { 
  "@type": "int32", 
  "readOnly": true, 
  "title": "RandomInt32", 
  "type": "integer" 
}

The complete NodeID should be used at the property key of the Thing description.

The @type is the DataType returned in the report.

The readOnly should be set to true if Writable is false (and vice versa).

The type can be determined from the DataType where available options are number, integer, string, etc (see the Web-of-Things Modelling section).

For more information see the OPC-UA Driver section.