I'm doing this tutorial to use Orion Context Broker in an IoT system. However, he does not explain how he created the sensors. Any idea how to do this?
Asked
Active
Viewed 109 times
1 Answers
0
A previous FIWARE tutorial explains how measures and commands can be sent from/to an IoT device over HTTP using the Ultralight payload. The basic Ultralight requests for various transports (HTTP, MQTT etc.) can be found here - this is how the existing dummy devices work.
You can simulate a dummy IoT device measurement using any HTTP request. For example you can pretend to be a Temperature Sensor device temperature001
using Ultralight over HTTP by making the following request
curl -L -X POST 'http://localhost:7896/iot/d?k=4jggokgpepnvsb2uv4s40d59ov&i=temperature001' \
-H 'Content-Type: text/plain' \
--data-raw 't|3'
Where:
http://localhost:7896
is the SouthPort of your IoT Agent (in this case the IoT Agent for Ultralighti
(device ID): Device ID (unique for the API Key).k
(API Key): API Key for the service the device is registered on.t
(timestamp): Timestamp of the measure. Will override the automatic IoT Agent timestamp (optional).
Obviously for a real device you would need to do the same thing using a device which has an available HTTP library - for example an Arduino, as discussed in this question here
The full details of the Ultralight protocol can be found within the documentation

Jason Fox
- 5,115
- 1
- 15
- 34