the smart device specification for remote labs
TRANSCRIPT
THE SMART DEVICE SPECIFICATION
FOR REMOTE LABSChristophe Salzmann, Sten Govaerts,
Wissam Halimi, & Denis GilletAnjo Anjewierden, Lars Bollen, Augustín Caminero, Manuel Castro, German Carro, Gabriel Díaz, Danilo Garbi Zutin, Miguel Latorre, Irene Lequerica Zorrozua, Pablo Orduna, Antonio Robles, Elio San Crístobal, and Simon Schwantzer
AGENDA
• What are Smart Devices?• What do we want to achieve?• The specification• An example• Implementation• Conclusion
SMART DEVICES?
1. communication2. sensing & actuating3. reasoning & learning4. identity & kind5. memory & status tracking
Smart Devices are connected to the internet with some or all of these capabilities:
Thompson, C.W., "Smart devices and soft controllers," Internet Computing, IEEE , 2005.
client server
CLASSIC CLIENT-SERVERclient often tightly linked to server
server updates often require client updates
clients cannot be reused
client server
CLASSIC CLIENT-SERVERclient often tightly linked to server
server updates often require client updates
clients cannot be reused
client server
CLASSIC CLIENT-SERVERclient often tightly linked to server
server updates often require client updates
clients cannot be reused
client serversmart device speci-
fication
data viewer
app
learning analytics
client
metadata repository
SMART DEVICE
client serversmart device speci-
fication
data viewer
app
learning analytics
client
metadata repository
SMART DEVICE
implementation agnostic
THE SPECIFICATION
• services, e.g. to control actuators & sensors
• service description and metadata
…consists of:
and:• internal functionality best practices & guidelines• easily extensible with new services
TECHNOLOGY
WebSocket Swaggerhttp://swagger.io/
https://github.com/go-lab/smart-device-metadata
TECHNOLOGY
WebSocket Swaggerhttp://swagger.io/
https://github.com/go-lab/smart-device-metadata
🔧
TECHNOLOGY
WebSocket Swagger
the specification is programming language agnostic
http://swagger.io/
https://github.com/go-lab/smart-device-metadata
🔧
METADATA CHARACTERISTICS
• lab info & lab owner• concurrency & authorization• provided services & API info
• sensor & actuator metadata is a service
The metadata describes:
…and:
SERVICES & FUNCTIONALITY
getSensorMetadata
getSensorData
getActuatorMetadata
sendActuatorData
getLoggingInfo
getClients
getModels
SERVICES
SERVICES & FUNCTIONALITY
getSensorMetadata
getSensorData
getActuatorMetadata
sendActuatorData
getLoggingInfo
getClients
getModels
SERVICES FUNCTIONALITY
SERVICES & FUNCTIONALITY
getSensorMetadata
getSensorData
getActuatorMetadata
sendActuatorData
getLoggingInfo
getClients
getModels
SERVICES FUNCTIONALITYauthentication
self and known state*
security and local control*
logging and alarms
local simulation
AN EXAMPLEclient smart device
Hey! What can you do?http://serverIP/metadata
{ name…, “services”: […], …}Here is what I do!
… …
AN EXAMPLEclient smart device
Hey! What can you do?http://serverIP/metadata
{ name…, “services”: […], …}Here is what I do!
services=[…]
… …
AN EXAMPLEclient smart device
Hey! What can you do?http://serverIP/metadata
{ name…, “services”: […], …}Here is what I do!
Which sensors do you have?{“method”: “getSensorMetadata”}
services=[…]
… …
AN EXAMPLEclient smart device
Hey! What can you do?http://serverIP/metadata
{ name…, “services”: […], …}Here is what I do!
Which sensors do you have?{“method”: “getSensorMetadata”}
services=[…]
{“method”:“getSensorMetadata”, “sensors": [ { "sensorId": “disc pos”, "values": [
{…"rangeMinimum": 0, "rangeMaximum": 10,…} ],…}
These are my sensors:
… …
AN EXAMPLEclient smart device
Hey! What can you do?http://serverIP/metadata
{ name…, “services”: […], …}Here is what I do!
Which sensors do you have?{“method”: “getSensorMetadata”}
services=[…]
{“method”:“getSensorMetadata”, “sensors": [ { "sensorId": “disc pos”, "values": [
{…"rangeMinimum": 0, "rangeMaximum": 10,…} ],…}
These are my sensors:sensors=[{ id:“disc pos”,min:0,max:10}]; … …
AN EXAMPLE CONTINUED
clientWhich actuators do you have?
{“method”: “getActuatorMetadata”}
… …
smart device
AN EXAMPLE CONTINUED
clientWhich actuators do you have?
{“method”: “getActuatorMetadata”}
{“method”:“getActuatorMetadata”, “actuators": [{ ”actuatorId": “motor”, …"values": [
{…"rangeMinimum": -5, "rangeMaximum": 5,…} ]}
These are my actuators:
… …
smart device
AN EXAMPLE CONTINUED
clientWhich actuators do you have?
{“method”: “getActuatorMetadata”}
{“method”:“getActuatorMetadata”, “actuators": [{ ”actuatorId": “motor”, …"values": [
{…"rangeMinimum": -5, "rangeMaximum": 5,…} ]}
These are my actuators:actuators=[{id:“motor”,min:-5,max:5}];
… …
smart device
AN EXAMPLE CONTINUED
clientWhich actuators do you have?
{“method”: “getActuatorMetadata”}
{“method”:“getActuatorMetadata”, “actuators": [{ ”actuatorId": “motor”, …"values": [
{…"rangeMinimum": -5, "rangeMaximum": 5,…} ]}
These are my actuators:actuators=[{id:“motor”,min:-5,max:5}];
Yay! I can make a UI!
… …
smart device
AN EXAMPLE CONTINUED
clientWhich actuators do you have?
{“method”: “getActuatorMetadata”}
{“method”:“getActuatorMetadata”, “actuators": [{ ”actuatorId": “motor”, …"values": [
{…"rangeMinimum": -5, "rangeMaximum": 5,…} ]}
These are my actuators:actuators=[{id:“motor”,min:-5,max:5}];
Yay! I can make a UI!
motor:
disc pos:
… …
smart device
AN EXAMPLE CONTINUED
clientWhich actuators do you have?
{“method”: “getActuatorMetadata”}
{“method”:“getActuatorMetadata”, “actuators": [{ ”actuatorId": “motor”, …"values": [
{…"rangeMinimum": -5, "rangeMaximum": 5,…} ]}
These are my actuators:actuators=[{id:“motor”,min:-5,max:5}];
Yay! I can make a UI!
motor:
disc pos:
… …
Give me the current disc pos…{“method”:“getSensorData”, “sensorId”: “disc pos”}
smart device
AN EXAMPLE CONTINUED
client
… …
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[6.2], “lastMeasured”:[“18:28”]…}
smart device
AN EXAMPLE CONTINUED
client
… …
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[6.2], “lastMeasured”:[“18:28”]…}motor:
disc pos:6.2
smart device
AN EXAMPLE CONTINUED
client
… …
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[6.2], “lastMeasured”:[“18:28”]…}
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[7.1], “lastMeasured”:[“18:30”]…}
motor:
disc pos:6.2
smart device
AN EXAMPLE CONTINUED
client
… …
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[6.2], “lastMeasured”:[“18:28”]…}
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[7.1], “lastMeasured”:[“18:30”]…}
motor:
disc pos:6.2
motor:
disc pos:7.1
smart device
AN EXAMPLE CONTINUED
client
… …
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[6.2], “lastMeasured”:[“18:28”]…}
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[7.1], “lastMeasured”:[“18:30”]…}
motor:
disc pos:6.2
motor:
disc pos:7.1
…
smart device
AN EXAMPLE CONTINUED
client
… …
Set the motor to 3{“authToken”:”42FE36”, method”:“sendActuatorData”,
“actuatorId”: “motor”,…“data”:[3], …}
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[6.2], “lastMeasured”:[“18:28”]…}
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[7.1], “lastMeasured”:[“18:30”]…}
motor:
disc pos:6.2
motor:
disc pos:7.1
…
smart device
AN EXAMPLE CONTINUED
client
… …
Set the motor to 3{“authToken”:”42FE36”, method”:“sendActuatorData”,
“actuatorId”: “motor”,…“data”:[3], …}
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[6.2], “lastMeasured”:[“18:28”]…}
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[7.1], “lastMeasured”:[“18:30”]…}
motor:
disc pos:6.2
motor:
disc pos:7.1
…
smart device
AN EXAMPLE CONTINUED
client
… …
Set the motor to 3{“authToken”:”42FE36”, method”:“sendActuatorData”,
“actuatorId”: “motor”,…“data”:[3], …}
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[6.2], “lastMeasured”:[“18:28”]…}
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[7.1], “lastMeasured”:[“18:30”]…}
motor:
disc pos:6.2
motor:
disc pos:7.1
…
auth
entic
ate(
42FE
36)
smart device
AN EXAMPLE CONTINUED
client
… …
Set the motor to 3{“authToken”:”42FE36”, method”:“sendActuatorData”,
“actuatorId”: “motor”,…“data”:[3], …}
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[6.2], “lastMeasured”:[“18:28”]…}
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[7.1], “lastMeasured”:[“18:30”]…}
motor:
disc pos:6.2
motor:
disc pos:7.1
…
auth
entic
ate(
42FE
36)
YES!
smart device
AN EXAMPLE CONTINUED
client
… …
Set the motor to 3{“authToken”:”42FE36”, method”:“sendActuatorData”,
“actuatorId”: “motor”,…“data”:[3], …}
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[6.2], “lastMeasured”:[“18:28”]…}
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[7.1], “lastMeasured”:[“18:30”]…}
motor:
disc pos:6.2
motor:
disc pos:7.1
…
auth
entic
ate(
42FE
36)
set motor to 3
YES!
smart device
BUT…IS IT A SMART DEVICE?
1. communication2. sensing & actuating3. reasoning & learning4. identity & kind5. memory & status tracking
Smart Devices are connected to the internet with some or all of these capabilities:
BUT…IS IT A SMART DEVICE?
1. communication2. sensing & actuating3. reasoning & learning4. identity & kind5. memory & status tracking
Smart Devices are connected to the internet with some or all of these capabilities:
✔
BUT…IS IT A SMART DEVICE?
1. communication2. sensing & actuating3. reasoning & learning4. identity & kind5. memory & status tracking
Smart Devices are connected to the internet with some or all of these capabilities:
✔✔
BUT…IS IT A SMART DEVICE?
1. communication2. sensing & actuating3. reasoning & learning4. identity & kind5. memory & status tracking
Smart Devices are connected to the internet with some or all of these capabilities:
✔
✘✔
BUT…IS IT A SMART DEVICE?
1. communication2. sensing & actuating3. reasoning & learning4. identity & kind5. memory & status tracking
Smart Devices are connected to the internet with some or all of these capabilities:
✔
✘✔
✔
BUT…IS IT A SMART DEVICE?
1. communication2. sensing & actuating3. reasoning & learning4. identity & kind5. memory & status tracking
Smart Devices are connected to the internet with some or all of these capabilities:
✔
✘✔
✔✔✘
…WHAT IF YOU DO NOT WANT TO REIMPLEMENT YOUR LAB?
then go with Gateway4Labs!
https://github.com/gateway4labs
client legacy lab server
…WHAT IF YOU DO NOT WANT TO REIMPLEMENT YOUR LAB?
then go with Gateway4Labs!
https://github.com/gateway4labs
client legacy lab server
smart gateway
…WHAT IF YOU DO NOT WANT TO REIMPLEMENT YOUR LAB?
then go with Gateway4Labs!
https://github.com/gateway4labs
client legacy lab server
smart gateway
…WHAT IF YOU DO NOT WANT TO REIMPLEMENT YOUR LAB?
then go with Gateway4Labs!
https://github.com/gateway4labs
client legacy lab server
smart gateway
acts as a smart device!
CONCLUSION• the Smart Device specification decouples client-
server through well-defined services & metadata, creating:• interoperability between clients and other Smart Devices• a machine readable specification that allows
the generation of simple client UIs
• platform agnostic & implementationsare available
STANDARDISATION• the specification is taken up by the IEEE working
group P1876 as a candidate for the final spec.
http://ieee-sa.centraldesktop.com/1876public/
2
slides will appear on http://www.slideshare.net/stengovaertsslides will appear on http://www.slideshare.net/stengovaerts 22
contact: [email protected]