Page 1
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
Page 2
AGENDA
• What are Smart Devices?• What do we want to achieve?• The specification• An example• Implementation• Conclusion
Page 3
SMART DEVICES?
Internet of Things
Page 4
SMART DEVICES?
Internet of Things
Page 5
SMART DEVICES?
Internet of Things
Page 6
SMART DEVICES?
Internet of Things
Page 7
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.
Page 8
…we extended this idea for remote labs.
Page 9
client server
CLASSIC CLIENT-SERVER
Page 10
client server
CLASSIC CLIENT-SERVERclient often tightly linked to server
Page 11
client server
CLASSIC CLIENT-SERVERclient often tightly linked to server clients cannot
be reused
Page 12
client server
CLASSIC CLIENT-SERVERclient often tightly linked to server
server updates often require client updates
clients cannot be reused
Page 13
client server
CLASSIC CLIENT-SERVERclient often tightly linked to server
server updates often require client updates
clients cannot be reused
Page 14
client server
CLASSIC CLIENT-SERVERclient often tightly linked to server
server updates often require client updates
clients cannot be reused
Page 15
client server
SMART DEVICE
Page 16
client server
SMART DEVICE
Page 17
client serversmart device speci-
fication
SMART DEVICE
Page 18
client serversmart device speci-
fication
SMART DEVICE
Page 19
client serversmart device speci-
fication
data viewer
app
SMART DEVICE
Page 20
client serversmart device speci-
fication
data viewer
app
learning analytics
client
SMART DEVICE
Page 21
client serversmart device speci-
fication
data viewer
app
learning analytics
client
metadata repository
SMART DEVICE
Page 22
client serversmart device speci-
fication
data viewer
app
learning analytics
client
metadata repository
SMART DEVICE
implementation agnostic
Page 24
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
Page 25
TECHNOLOGY
WebSocket Swaggerhttp://swagger.io/
https://github.com/go-lab/smart-device-metadata
Page 26
TECHNOLOGY
WebSocket Swaggerhttp://swagger.io/
https://github.com/go-lab/smart-device-metadata
🔧
Page 27
TECHNOLOGY
WebSocket Swagger
the specification is programming language agnostic
http://swagger.io/
https://github.com/go-lab/smart-device-metadata
🔧
Page 28
METADATA CHARACTERISTICS
• lab info & lab owner• concurrency & authorization• provided services & API info
• sensor & actuator metadata is a service
The metadata describes:
…and:
Page 29
SERVICES & FUNCTIONALITYSERVICES
Page 30
SERVICES & FUNCTIONALITY
getSensorMetadata
getSensorData
getActuatorMetadata
sendActuatorData
getLoggingInfo
getClients
getModels
SERVICES
Page 31
SERVICES & FUNCTIONALITY
getSensorMetadata
getSensorData
getActuatorMetadata
sendActuatorData
getLoggingInfo
getClients
getModels
SERVICES FUNCTIONALITY
Page 32
SERVICES & FUNCTIONALITY
getSensorMetadata
getSensorData
getActuatorMetadata
sendActuatorData
getLoggingInfo
getClients
getModels
SERVICES FUNCTIONALITYauthentication
self and known state*
security and local control*
logging and alarms
local simulation
Page 33
AN EXAMPLEclient smart device
… …
Page 34
AN EXAMPLEclient smart device
Hey! What can you do?http://serverIP/metadata
… …
Page 35
AN EXAMPLEclient smart device
Hey! What can you do?http://serverIP/metadata
{ name…, “services”: […], …}Here is what I do!
… …
Page 36
AN EXAMPLEclient smart device
Hey! What can you do?http://serverIP/metadata
{ name…, “services”: […], …}Here is what I do!
services=[…]
… …
Page 37
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=[…]
… …
Page 38
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:
… …
Page 39
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}]; … …
Page 40
AN EXAMPLE CONTINUED
client
… …
smart device
Page 41
AN EXAMPLE CONTINUED
clientWhich actuators do you have?
{“method”: “getActuatorMetadata”}
… …
smart device
Page 42
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
Page 43
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
Page 44
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
Page 45
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
Page 46
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
Page 47
AN EXAMPLE CONTINUED
client
… …
smart device
Page 48
AN EXAMPLE CONTINUED
client
… …
Here is the current position:{“method”:“getSensorData”, “sensorId”: “disc pos”,
“data”:[6.2], “lastMeasured”:[“18:28”]…}
smart device
Page 49
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
Page 50
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
Page 51
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
Page 52
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
Page 53
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
Page 54
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
Page 55
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
Page 56
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
Page 57
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
Page 58
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:
Page 59
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:
✔
Page 60
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:
✔✔
Page 61
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:
✔
✘✔
Page 62
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:
✔
✘✔
✔
Page 63
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:
✔
✘✔
✔✔✘
Page 64
IMPLEMENTATION
https://github.com/go-lab/smart-device
Page 65
IMPLEMENTATION
https://github.com/go-lab/smart-device
Page 66
IMPLEMENTATION
https://github.com/go-lab/smart-device
Page 67
http
://go
labz.e
u
Page 68
http
://go
labz.e
u
Page 69
http
://go
labz.e
u
Page 70
http
://go
labz.e
u
Page 71
http
://go
labz.e
u
Page 72
…WHAT IF YOU DO NOT WANT TO REIMPLEMENT YOUR LAB?
client legacy lab server
Page 73
…WHAT IF YOU DO NOT WANT TO REIMPLEMENT YOUR LAB?
then go with Gateway4Labs!
https://github.com/gateway4labs
client legacy lab server
Page 74
…WHAT IF YOU DO NOT WANT TO REIMPLEMENT YOUR LAB?
then go with Gateway4Labs!
https://github.com/gateway4labs
client legacy lab server
smart gateway
Page 75
…WHAT IF YOU DO NOT WANT TO REIMPLEMENT YOUR LAB?
then go with Gateway4Labs!
https://github.com/gateway4labs
client legacy lab server
smart gateway
Page 76
…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!
Page 77
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
Page 78
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/
Page 79
2
slides will appear on http://www.slideshare.net/stengovaertsslides will appear on http://www.slideshare.net/stengovaerts 22
contact: [email protected]