Registering IOT Edge: example of Raspberry Pi, total security

×

Warning message

You can't delete this newsletter because it has not been sent to all its subscribers.
  1. Suppose you have a raspberry pi with node-red preinstalled and want to connect to the services offered by the platform Snap4City.
  2. If node-red has not already been started, this can be done by opening a terminal and executing the command:

node-red-start

  1. At this point it is possible to connect in two ways to the node-red interface:
    1. Directly from a browser within the Raspberry Pi at http://localhost:1880
    2. From a browser within a computer located in the same subnet as the raspberry pi at http://[IP of RPI]:1880

  1. When you connect to the interface you must install the nodes of the snap4city platform by going to the menu under "Manage Palette".

     

  2. Inside the tab "Install" looking for the string "snap4city" appear the nodes of the platform and you can install them by clicking on the buttons on the right.
  3. You make your flow that reads data from sensors that are connected to the Raspberry Pi and you want to send that data to the platform broker

  4. This can be done through the "fiware orion out" node (the lowest node in the image that has no exit points)
  5. Then we add the node to the flow and open the configuration tab clicking twice on the node

  6. At this point to send the data to the broker we must register on the platform (http://www.snap4city.org) and add the device to those in our possession. We will be provided with the necessary information to complete the configuration.
  7. After login, it is possible to click on “My IoT Devices”:

  8. Next click on “Add New Device”:

  9. The name of the device model is selected. The other fields will be filled in automatically

  1. Pressing the "Submit Device" button displays a message indicating the success of the recording operation

  1. And our device will be visible in the list of our devices

     

  1. Now you will have to download the certificates (or alternatively copy the k1, k2 values) and mark the name of the device you entered and the type of device (usually Ambiental)

  1. Clicking on the button with the red dot it is possible to upload the certificates:

  2. And deploying the flow it sends data to the orion broker:

  1. The blue nodes on the left are just two of the nodes that can be installed on the Raspberry Pi, with an easy configuration tab.
  2. On IOT applications developed into Node-RED in the Raspberry, you can access to MicroServices for direct exploiting Raspberry features such as: GPIO, Camera, Keyboards, MOuse, Led, SenseHat DHT11 AdaFruit, DHT22 AdaFruit, etc. etc.