Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

All information collected from sensor board should be available as via a CoRE resourceCoAP server, mapped as below.This , and using simple json responses. This mapping is created after the mote identifies the sensor board and starts to collect sensor data. 

Well knows REST resources

 

GET /.well-known/core


DescriptionResponse
List of parameters as a link list interface</d>;rt="simple.dev";if="core.ll",
List of sensors parameters as a batch interface</s>;rt="simple.sen";if="core.b"

 

Parameters (link list)

 

GET /d

 
 

...

Possible Answer
Sensor Board information/d
Sensor Data/s

 

Parameters

 

DescriptionExampleRequestPossible AnswersAnswer
Sensor Board Identification (summary)
GET /d
{ "itfvv": "123", "modelm":"model_name", 
   "id": "sensor_board_ID", "npts":10 }
{ "v": "undefined" }
{ }
Interface Version
GET /d/itfvver
{ "itfvver": "123" }
{ "ver": "undefined" }
{ }
Model Name
GET /d/model
{ "model": "model_name" }
Manufacturer Name
GET /d/manuf
{ "manuf": "manufacturer name" }
Sensor Board ID
GET /d/id
{ "id": "sensor_board_ID" }
Hardware Revision
GET /d/hw_rev
{ "hw_rev": "hardware_revision" }
Display Capability
GET /d/has_dsp
{ "has_dsp": "yes" }
Battery Capability
GET /d/has_bat
{ "has_bat": "no" }
Number of Points
GET /d/npts
{ "npts": 10 }
Point Description(1)(2)
GET /d/pt/n
{ "n": "point_name", 
  "t": 2, "u": 3, 
"ar": 1, "s": 10 }
Sensor Board Status
GET /d/brd_status
{ "status": 1 }
Sensor board Command (send)
PUT /d/cmd/cmd_id
{ "status": "status_result" }
Sensor board Command (answer)
GET /d/cmd
{ "result": "cmd_result" } 
Battery Status
GET /d/bat_status
{ "status": "Discharging" }
Battery Charge (0 to 100%)
GET /d/bat_charge
{ "charge": "75" }
Wireless Status
GET /d/wl_status
{ "status": "Connected" }
Wireless Strength
GET /d/wl_strength
{ "strength": "-10dBm" }
Display(3)
PUT /d/dsp/line1line
PUT /d/dsp/line1line/line2line
{ "result": 1 }

...

(1) Replace n by point index, starting at 0

(2) See this page for proper values in unit, right access and scan (sampling time)

(3) Each display line must be separated by slashes

Sensors parameters

...

 

DescriptionResourceRequestPossible Answer
Get all sensor values 
GET /s
[ {"idx": 0, "sensor1v": val1val_1 },  
{ "sensor2idx": val2 }1, { "sensor3v": val3val_2 }
[{ }]
Get sensor1sensor(1)
GET /s/sensor1n
{ "valv": val1value } 
{ }
Put sensor1sensor(1)(2)
PUT /s/sensor1n/val1{ "result": 0 }value
 

(1) Replace n by point index, starting at 0

(2) Replace value by the desired value

References


...