We use proprietary and third party´s cookies to improve your experience and our services, identifying your Internet Browsing preferences on our website; develop analytic activities and display advertising based on your preferences. If you keep browsing, you accept its use. You can get more information on our Cookie Policy
Cookies Policy
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

hi,

As the Raspberry Pi is a device that can speak FIWARE NGSI directly, the easiest way would be to use a Python script to obtain the data coming from the Raspberry Pi Sensors and then use the NGSIv2 API to publish the data offered by the sensors connected to the Raspberry on a Orion Context Broker.

You can deploy your own Orion Context Broker instance, on your laptop, for instance using Docker

docker run fiware/orion

You can pre-create the entity you are going to use to store the sensor data, for instance:

POST /v2/entities

{ "id": "MyObservation-RaspberryPi-890", "type": "Observation" }

Then every time a new sensor measurement is obtained from the Raspberry Pi you can

POST /v2/entities/MyObservation-RaspberryPi-890/attrs

{ "temperature": { "value": 23.5 } }

Of course, your laptop and the Raspberry Pi have to be on the same network.

Other architectures more complicated could make use of IoT Agents but in this case it is not even needed.

I hope this helps

best

hi,

As the Raspberry Pi is a device that can speak FIWARE NGSI directly, the easiest way would be to use a Python script to obtain the data coming from the Raspberry Pi Sensors and then use the NGSIv2 API to publish the data offered by the sensors connected to the Raspberry on a Orion Context Broker.

You can deploy your own Orion Context Broker instance, on your laptop, for instance using Docker

docker run fiware/orion

You can pre-create the entity you are going to use to store the sensor data, for instance:

POST /v2/entities

{ "id": "MyObservation-RaspberryPi-890", "type": "Observation" }

Then every time a new sensor measurement is obtained from the Raspberry Pi you can

POST /v2/entities/MyObservation-RaspberryPi-890/attrs

{ "temperature": { "value": 23.5 } }

You can get the temperature value by getting your entity data as follows:

GET /v2/entities/MyObservation-RaspberryPi-890?options=keyValues and you will get something like

{ "id": "MyObservation-RaspberryPi-890", "type": "Observation", "temperature": 23.5 }

Of course, your laptop and the Raspberry Pi have to be on the same network.

Other architectures more complicated could make use of IoT Agents but in this case it is not even needed.

I hope this helps

best