<s>
The	O
Thing	B-Device
Description	I-Device
(	O
TD	O
)	O
(	O
or	O
W3C	O
WoT	O
Thing	B-Device
Description	I-Device
(	O
TD	O
)	O
)	O
is	O
a	O
royalty-free	O
,	O
open	O
information	O
model	O
with	O
a	O
JSON	B-General_Concept
based	O
representation	O
format	O
for	O
the	B-Operating_System
Internet	I-Operating_System
of	I-Operating_System
Things	I-Operating_System
(	O
IoT	B-Operating_System
)	O
.	O
</s>
<s>
A	O
TD	O
provides	O
a	O
unified	O
way	O
to	O
describe	O
the	O
capabilities	O
of	O
an	O
IoT	B-Operating_System
device	O
or	O
service	O
with	O
its	O
offered	O
data	O
model	O
and	O
functions	O
,	O
protocol	O
usage	O
,	O
and	O
further	O
metadata	O
.	O
</s>
<s>
Using	O
Thing	B-Device
Descriptions	I-Device
help	O
reduce	O
the	O
complexity	O
of	O
integrating	O
IoT	B-Operating_System
devices	O
and	O
their	O
capabilities	O
into	O
IoT	B-Operating_System
applications	O
.	O
</s>
<s>
The	O
TD	O
originated	O
from	O
the	O
Web	B-Device
of	I-Device
Things	I-Device
(	O
WoT	O
)	O
initiative	O
of	O
the	O
international	O
standards	O
organization	O
of	O
the	O
W3C	O
which	O
has	O
the	O
intention	O
to	O
increase	O
the	O
interoperability	O
in	O
the	O
IoT	B-Operating_System
.	O
</s>
<s>
Since	O
April	O
2020	O
,	O
the	O
Thing	B-Device
Description	I-Device
is	O
a	O
W3C	O
recommendation	O
(	O
W3C	O
WoT	O
Thing	B-Device
Description	I-Device
1.0	O
)	O
.	O
</s>
<s>
In	O
January	O
2023	O
,	O
the	O
W3C	O
published	O
a	O
candidate	O
recommendation	O
for	O
Thing	B-Device
Description	I-Device
1.1	O
.	O
</s>
<s>
The	O
major	O
principle	O
of	O
the	O
Thing	B-Device
Description	I-Device
is	O
to	O
provide	O
a	O
human-readable	O
and	O
machine-interpretable	O
interface	O
description	O
of	O
an	O
IoT	B-Operating_System
device/Thing	O
.	O
</s>
<s>
In	O
that	O
context	O
,	O
the	O
WoT	O
Thing	B-Device
Description	I-Device
is	O
to	O
the	O
IoT	B-Operating_System
what	O
index.html	O
is	O
to	O
a	O
website	O
:	O
it	O
can	O
be	O
considered	O
as	O
the	O
entry	O
point	O
of	O
a	O
physical	O
or	O
virtual	O
Thing/device	O
.	O
</s>
<s>
Thing	B-Device
Description	I-Device
are	O
not	O
limited	O
to	O
a	O
specific	O
communication	O
protocol	O
,	O
rather	O
it	O
provides	O
a	O
framework	O
called	O
a	O
WoT	O
Binding	O
Template	O
.	O
</s>
<s>
Such	O
a	O
Protocol	O
Binding	O
defines	O
the	O
mapping	O
from	O
an	O
Interaction	O
Affordance	O
to	O
concrete	O
messages	O
of	O
a	O
specific	O
IoT	B-Operating_System
protocol	O
such	O
as	O
MQTT	B-Application
,	O
HTTP	B-Protocol
,	O
CoAP	B-Device
,	O
Modbus	B-Protocol
or	O
OPC	O
UA	O
.	O
</s>
<s>
The	O
WoT	O
Thing	B-Device
Description	I-Device
defines	O
3	O
kinds	O
of	O
Interaction	O
Affordances	O
,	O
named	O
Property	O
,	O
Action	O
and	O
Event	O
:	O
</s>
<s>
An	O
Interaction	O
Affordance	O
that	O
exposes	O
state	O
of	O
an	O
IoT	B-Operating_System
device	O
.	O
</s>
<s>
An	O
Interaction	O
Affordance	O
that	O
allows	O
to	O
invoke	O
a	O
function	O
of	O
an	O
IoT	B-Operating_System
device	O
,	O
which	O
manipulates	O
state	O
(	O
e.g.	O
,	O
toggling	O
a	O
lamp	O
on	O
or	O
off	O
)	O
or	O
triggers	O
a	O
process	O
on	O
the	O
device	O
(	O
e.g.	O
,	O
dim	O
a	O
lamp	O
over	O
time	O
)	O
.	O
</s>
<s>
In	O
general	O
,	O
the	O
Thing	B-Device
Description	I-Device
is	O
designed	O
to	O
reuse	O
and	O
rely	O
on	O
established	O
Internet	O
and	O
Web	O
standards	O
,	O
this	O
includes	O
:	O
</s>
<s>
Serialization	O
:	O
The	O
JSON	B-General_Concept
serialization	O
of	O
the	O
TD	O
information	O
model	O
is	O
aligned	O
with	O
the	O
syntax	O
of	O
JSON-LD	B-Protocol
1.1	O
.	O
</s>
<s>
JSON-LD	B-Protocol
opens	O
the	O
opportunity	O
of	O
context	O
extension	O
and	O
enrich	O
the	O
Thing	B-Device
Description	I-Device
instances	O
with	O
additional	O
(	O
e.g.	O
,	O
domain-specific	O
)	O
semantics	O
such	O
as	O
from	O
Schema.org	B-Application
.	O
</s>
<s>
Security	O
:	O
The	O
Thing	B-Device
Description	I-Device
comes	O
with	O
a	O
framework	O
that	O
allows	O
to	O
provide	O
metadata	O
to	O
follow	O
existing	O
security	O
scheme	O
such	O
as	O
OAuth2	O
or	O
Digest	O
Access	O
Authentication	O
.	O
</s>
<s>
Due	O
to	O
the	O
context	O
extension	O
concept	O
of	O
the	O
Thing	B-Device
Description	I-Device
specific	O
security	O
schemes	O
can	O
be	O
imported	O
.	O
</s>
<s>
For	O
defining	O
such	O
kind	O
of	O
relations	O
the	O
Thing	B-Device
Description	I-Device
relies	O
on	O
the	O
well	O
know	O
Web	O
Linking	O
concept	O
.	O
</s>
<s>
Data	O
Schema	O
:	O
For	O
modeling	O
the	O
Thing	O
's	O
data	O
that	O
can	O
be	O
exchanged	O
,	O
the	O
concept	O
of	O
JSON	B-General_Concept
schema	O
is	O
embedded	O
in	O
the	O
Thing	B-Device
Description	I-Device
.	O
</s>
<s>
As	O
protocol	O
identification	O
and	O
addressing	O
method	O
URI	B-Protocol
Identifier	O
are	O
used	O
.	O
</s>
<s>
For	O
announcing	O
the	O
serialization	O
encoding	O
(	O
e.g.	O
,	O
JSON	B-General_Concept
,	O
CBOR	B-Protocol
,	O
XML	B-Protocol
,	O
Efficient	B-Language
XML	I-Language
Interchange	I-Language
)	O
of	O
the	O
payload	O
that	O
is	O
specified	O
by	O
the	O
data	O
schema	O
,	O
Media	O
Type	O
assignment	O
is	O
applied	O
in	O
the	O
Thing	B-Device
Description	I-Device
.	O
</s>
<s>
Below	O
is	O
an	O
example	O
TD	O
serialized	O
in	O
JSON-LD	B-Protocol
format	O
,	O
which	O
has	O
one	O
property	O
,	O
one	O
action	O
and	O
one	O
event	O
.	O
</s>
<s>
The	O
IoT	B-Operating_System
device	O
represented	O
by	O
this	O
TD	O
uses	O
the	O
HTTP	B-Protocol
protocol	I-Protocol
but	O
a	O
TD	O
can	O
represent	O
any	O
protocol	O
with	O
a	O
URI	B-Protocol
scheme	O
,	O
as	O
shown	O
in	O
the	O
example	O
below.This	O
TD	O
represents	O
an	O
Internet	O
connected	O
lamp	O
,	O
which	O
could	O
be	O
thought	O
as	O
a	O
simple	O
version	O
of	O
a	O
Philips	O
Hue	O
lamp	O
.	O
</s>
<s>
In	O
addition	O
,	O
information	O
is	O
provided	O
in	O
lines	O
13-14	O
that	O
this	O
Property	O
is	O
readable	O
with	O
an	O
HTTP	B-Protocol
GET	O
request	O
to	O
the	O
URI	B-Protocol
https://mylamp.example.com/status	O
,	O
and	O
will	O
return	O
a	O
string-based	O
status	O
value	O
.	O
</s>
<s>
In	O
a	O
similar	O
manner	O
,	O
an	O
Action	O
affordance	O
is	O
specified	O
to	O
toggle	O
the	O
switch	O
status	O
using	O
the	O
POST	O
method	O
on	O
the	O
https://mylamp.example.com/toggle	O
resource	O
.	O
</s>
<s>
Here	O
,	O
a	O
subscription	O
to	O
be	O
notified	O
upon	O
a	O
possible	O
overheating	O
event	O
of	O
the	O
lamp	O
can	O
be	O
obtained	O
by	O
using	O
HTTP	B-Protocol
with	O
its	O
long	O
polling	O
subprotocol	O
on	O
https://mylamp.example.com/oh	O
.	O
</s>
<s>
It	O
can	O
be	O
seen	O
that	O
the	O
HTTP	B-Protocol
methods	O
are	O
defined	O
using	O
the	O
"	O
htv:methodName	O
"	O
vocabulary	O
terms	O
.	O
</s>
<s>
This	O
vocabulary	O
terms	O
for	O
HTTP	B-Protocol
are	O
included	O
in	O
the	O
TD	O
vocabulary	O
that	O
is	O
found	O
in	O
the	O
"	O
@context	O
"	O
value	O
.	O
</s>
<s>
In	O
combination	O
with	O
the	O
use	O
of	O
the	O
HTTP	B-Protocol
this	O
example	O
demonstrates	O
the	O
use	O
of	O
Basic	B-Protocol
access	I-Protocol
authentication	I-Protocol
.	O
</s>
<s>
Below	O
is	O
the	O
same	O
connected	O
lamp	O
but	O
using	O
MQTT	B-Application
protocol	I-Application
and	O
no	O
security.Differently	O
from	O
the	O
last	O
TD	O
,	O
here	O
the	O
forms	O
include	O
MQTT	B-Application
protocol	I-Application
as	O
specified	O
by	O
the	O
WoT	O
Binding	O
Templates	O
.	O
</s>
<s>
For	O
example	O
,	O
instead	O
of	O
HTTP	B-Protocol
GET	O
and	O
longpoll	O
subprotocol	O
to	O
observe	O
the	O
overheating	O
event	O
,	O
a	O
client	O
can	O
subscribe	O
to	O
this	O
event	O
using	O
the	O
MQTT	B-Application
protocol	I-Application
.	O
</s>
<s>
Furthermore	O
,	O
a	O
WoT	O
device	O
with	O
MQTT	B-Application
protocol	I-Application
can	O
be	O
both	O
a	O
publisher	O
and	O
a	O
subscriber	O
.	O
</s>
<s>
For	O
the	O
property	O
and	O
event	O
affordances	O
,	O
it	O
would	O
publish	O
the	O
values	O
,	O
whereas	O
for	O
action	O
affordances	O
it	O
would	O
subscribe	O
to	O
the	O
action	O
topics	O
that	O
other	O
MQTT	B-Application
publishers	O
can	O
trigger	O
by	O
publishing	O
to	O
these	O
topics	O
.	O
</s>
