@@ -49,8 +49,8 @@ tutorial:
4949- A ** Bell** can be sent a command to activate and ring for a short period
5050- A ** Motion Sensor** will activate and send a count when someone is nearby
5151- A ** Smart Lamp** can be switched on or off remotely. It can also report on its current state (` ON ` or ` OFF ` ). When
52- switched on, a Motion Sensor within the device checks to see if light is needed and will dim if no- one is nearby.
53- Furthermore the device can be report on the current luminosity of the bulb.
52+ switched on, a Motion Sensor within the device checks to see if light is needed and will dim if no one is nearby.
53+ Furthermore the device can report the current luminosity of the bulb.
5454
5555As you can see, the ** Bell** is an example of a pure actuator, as it only reacts to the given commands. Meanwhile, the
5656** Motion Sensor** is an example of a pure sensor, since it will only report on the state of the world as it sees it. The
7373<key>|<value>|<key>|<value>|<key>|<value> etc..
7474```
7575
76- For example a payload such as:
76+ For example a payload such as
7777
7878``` text
7979t|15|k|abc
8080```
8181
82- Contains two attributes, one named "t" with value "15" and another named "k" with value "abc" are transmitted . Values in
83- Ultralight 2.0 are not typed (everything is treated as a string).
82+ contains two attributes, one named "t" with value "15" and another named "k" with value "abc". Values in Ultralight 2.0
83+ are not typed (everything is treated as a string).
8484
85- Ultralight 2.0 defines a payload describing measures and commands to share between devices and servers but, does not
85+ Ultralight 2.0 defines a payload describing measurements and commands to share between devices and servers but, does not
8686specify a single transport protocol. Instead, different transport protocol bindings (such as HTTP, MQTT and AMQP) can be
8787used for different scenarios. For this tutorial we will be using HTTP as a transport protocol.
8888
8989## Southbound Traffic (Commands)
9090
91- HTTP requests generated by the form the Context Broker and passed downwards towards an IoT device (via an IoT agent ) are
92- known as southbound traffic. Southbound traffic consists of ** commands** made to actuator devices which alter the state
93- of the real world by their actions. For example a command to alter the state of a lamp to ` ON ` would switch on the lamp
94- in real life. This in turn could alter the readings of other sensors nearby.
91+ HTTP requests generated by the Context Broker and passed downwards towards an IoT device (via an IoT Agent ) are known as
92+ southbound traffic. Southbound traffic consists of ** commands** made to actuator devices which alter the state of the
93+ real world by their actions. For example a command to alter the state of a lamp to ` ON ` would switch on the lamp in real
94+ life. This in turn could alter the readings of other sensors nearby.
9595
9696### Push Command using HTTP POST
9797
@@ -103,18 +103,18 @@ the endpoint supplied by the device. The body of the POST request holds the comm
103103The payload for Ultralight commands has the following format:
104104
105105``` text
106- <device name >@<command>|<param|<param>
106+ <device_name >@<command>|<param|<param>
107107```
108108
109109Where ` <device_name> ` is the entity ` id ` as held in the context broker, ` <command> ` is one of the supported commands and
110- any additional required values are passed in subsequent parameters for example
110+ any additional required values are passed in subsequent parameters, for example
111111
112112```
113113urn:ngsi-ld:Robot:001@turn|left|30
114114```
115115
116- Will tell a device _ "I am known as ` id="urn:ngsi-ld:Robot:001" ` within the Context Broker. I would like the device
117- listening on this endpoint to perform the ` turn ` command. I have supplied the parameters ` left ` and ' ` 30 ` (degrees) as
116+ will tell a device _ "I am known as ` id="urn:ngsi-ld:Robot:001" ` within the Context Broker. I would like the device
117+ listening on this endpoint to perform the ` turn ` command. I have supplied the parameters ` left ` and ` 30 ` (degrees) as
118118required for the device to be able to perform the maneuver"_ .
119119
120120The defined Northbound response to an IoT Agent is as follows:
@@ -123,7 +123,7 @@ The defined Northbound response to an IoT Agent is as follows:
123123urn:ngsi-ld:Robot:001@turn|Turn ok
124124```
125125
126- Which is saying _ "I have complied with a request from the entity known as ` id="urn:ngsi-ld:Robot:001" ` within the
126+ which is saying _ "I have complied with a request from the entity known as ` id="urn:ngsi-ld:Robot:001" ` within the
127127Context Broker. The command I have performed was a ` turn ` command. The result was ` Turn ok ` "_ .
128128
129129As you can see, because the Southbound command defines the ` id ` used within the interaction, and the same data is also
@@ -135,11 +135,11 @@ beyond the scope of this tutorial.
135135
136136## Northbound Traffic (Measurements)
137137
138- Requests generated from an IoT device and passed back upwards towards the Context Broker (via an IoT agent ) are known as
138+ Requests generated from an IoT device and passed back upwards towards the Context Broker (via an IoT Agent ) are known as
139139northbound traffic. Northbound traffic consists of ** measurements** made by sensor devices and relays the state of the
140140real world into the context data of the system. For example a measurement from a humidity sensor could be relayed back
141141into the context broker to indicate that the moisture level of the entity has changed. A subscription could be made to
142- be informed of such changes and there provoke further actions (such as turning on a sprinkler)
142+ be informed of such changes and there provoke further actions (such as turning on a sprinkler).
143143
144144### Measurement using HTTP GET
145145
@@ -159,7 +159,7 @@ For example the request:
159159<iot-agent>/iot/d?i=motion001&d=c|12
160160```
161161
162- Would indicate that the device ` id=motion001 ` wishes to inform the IoT Agent that is has made a real-world measurement
162+ would indicate that the device ` id=motion001 ` wishes to inform the IoT Agent that is has made a real-world measurement
163163` c ` with the value ` 12 ` . This would eventually be passed up into the Context Broker.
164164
165165### Measurement using HTTP POST
@@ -170,15 +170,15 @@ mandatory:
170170
171171- ` i ` (device ID): Device ID (unique for the API Key).
172172- ` k ` (API Key): API Key for the service the device is registered on.
173- - ` t ` (timestamp): Timestamp of the measure. Will override the automatic IoTAgent timestamp (optional).
173+ - ` t ` (timestamp): Timestamp of the measure. Will override the automatic IoT Agent timestamp (optional).
174174
175175Once again the ` i ` and ` k ` parameters are mandatory.
176176
177177#### Device Monitor
178178
179179For the purpose of this tutorial, a series of dummy IoT devices have been created, which will eventually be attached to
180- the context broker. The state of each device can be seen on the UltraLight device monitor web page found at:
181- ` http://localhost:3000/device/monitor `
180+ the context broker. The state of each device can be seen on the UltraLight device monitor web page found at
181+ [ ` http://localhost:3000/device/monitor ` ] ( http://localhost:3000/device/monitor ) .
182182
183183![ FIWARE Monitor] ( https://fiware.github.io/tutorials.IoT-Sensors/img/device-monitor.png )
184184
@@ -285,14 +285,14 @@ of dummy devices using Ultralight 2.0 syntax
285285
286286<h4>Device Monitor</h4>
287287
288- The device monitor can be found at : ` http://localhost:3000/device/monitor`
288+ The device monitor can be found at [ `http://localhost:3000/device/monitor`](http://localhost:3000/device/monitor).
289289
290290Within this tutorial you will be playing the role of the missing IoT Agent component, making Southbound commands to the
291291attached IoT devices and receiving Northbound measurements as the environment changes within the store. All the commands
292292are made as HTTP POST requests using Ultralight syntax and therefore are very simple. It is worthwhile keeping an eye on
293293the device monitor page as it shows all the Northbound traffic generated by the devices themselves.
294294
295- > **Note:** In addition to user interactions, All dummy devices will periodically register a heartbeat message
295+ > **Note:** In addition to user interactions, all dummy devices will periodically register a heartbeat message
296296
297297# # Bell Commands
298298
@@ -330,7 +330,7 @@ If you are viewing the device monitor page, you can see the state of the bell ch
330330# # Smart Lamp Commands
331331
332332The **Smart Lamp** can be switched on and off remotely - it also registers luminosity. It contains a Motion Sensor
333- within it and will slowly dim as time passes (provided no movement is detected)
333+ within and will slowly dim as time passes (provided no movement is detected)
334334
335335Measurements will be sent to the IoT Agent as the state and/or luminosity changes.
336336
0 commit comments