Skip to content

Quick Start

tatiane edited this page Mar 16, 2021 · 45 revisions

In this 🚀 quick start, we show how to connect an IoT device (Raspberry Pi) and a temperature sensor to the MBP, in order to visualize temperature values in the MBP dashboard. The following steps will be executed:

  1. Registration of the Raspberry Pi

  2. Registration of the operator that extracts temperature sensor values and send it to the MBP

    (As an alternative, it is possible to register an operator that simulates the extraction of temperature values)

  3. Registration of the temperature sensor

  4. Installation of the operator on the Raspberry Pi to visualize temperature values in the MPB

Hardware setup:

  • a Raspberry Pi 3. To enable the MBP to access the Raspberry Pi, it must be configured to be accessed by SSH through a private key or login

  • a LK base board or an arbitrary AD converter

    (not required in case a simulation operator is used in step 2)

  • a LK temperature sensor plugged to the A0 analog input of the LK base board or to the corresponding pins of an arbitrary AD converter

    (not required in case a simulation operator is used in step 2)

Raspberry Pi 3 LK base board LK temperature sensor


Once you installed the MBP, please register a new user and log in the MBP (see How to create users).

1. Registration of the Raspberry Pi

⚠️Important: To enable the MBP to access the Raspberry Pi, configure it to be accessed by SSH through a private key or login. The private key and/or user credentials will be asked by the MBP during the registration of the Raspberry Pi.

After logging in the MBP, press the Devicesbutton in the dashboard to go the devices view. Alternatively, you can reach the devices view also through the navigation on the left: Main Navigation > IoT Hardware > Devices.

press devices in the dashboard

In the devices view, press the ➕ button (2) to add a new device. Fill the properties (inclusive private key or credentials) of the Raspberry Pi and press Register(3).

Device1

After registering your device, the Raspberry Pi should be visible in the list of devices with the state Connected (4). This means the Raspberry Pi can be found in the network and the MBP can connect to it with the provided private key or credentials. If the device has other state, take a look in the device states documentation to find out more about it.

Device2

Here a short demonstration video summarizing the above instructions for you:

device

device

For more details, please see How to register devices.

2. Registration of the extraction operator

An extraction operator is the required software (for example, python scripts) to bind sensors to the MBP. Ready-to-use examples of such operators can be found in the MBP Operators Repository.

In this example we use the operator provided in the repository, which contains the software to read sensor values measured by the LK temperature sensor and to send these values to the MBP.

⚠️ Alternatively, you can register an operator that simulates reading temperature values and send these to the MBP. In this case, you will only need to have the Raspberry Pi as hardware.

⚠️ The MBP is currently unable to work with operator scripts that use Windows line endings (CRLF) instead of Unix line endings (LF). If you are using Windows and opened/edited the scripts, make sure the scripts are saved with Unix line endings.

In the MBP, go to Main Navigation > Operators > Extraction/Control Operators (1). Then, press the ➕ button (2) to add the new operator. Fill the properties (inclusive example operator files) and press Register (3). After registration, the new operator should be visible in the list of registered operators.

Operator

Here a short demonstration video summarizing the above instructions for you: operator

For more details, please see How to register operators.

3. Registration of the temperature sensor

In the MBP, press the Sensors button in the dashboard to reach the sensors view. Alternatively, you can reach the sensors view through: Main Navigation > IoT Hardware > Sensors.

press sensors in the dashboard

In the sensors view, press the ➕ button (2) to add a new sensor. Fill the properties, choose the previously created Operator (3) and Device (4), and press Register(5).

Screenshot 2020-11-09 at 15 39 17

After registration, the sensor should be visible in the list of registered sensors and have the state Ready. If the sensor has other state, take a look in the sensor states documentation to find out more about it.

Here a short demonstration video summarizing the above instructions for you: sensor

For more details, please see How to register sensors.

4. Installation of the operator on the Raspberry Pi

We are almost done 💪 ! In this step we install the operator on device and start it, in order to receive temperature values in the MBP and visualize them.

In the sensors view, click on the registered sensor (6), to go to the sensor detailed view. Then, press the Install operator button (7). After this, the sensor should have the state Installed. If the sensor has other state, take a look in the sensor states documentation to find out more about it.

Screenshot 2020-11-09 at 15 42 18

Screenshot 2020-11-09 at 15 45 53

To start the operator installed on the Raspberry Pi, in the sensor details view, press the Start operator button (8).

Screenshot 2020-11-09 at 15 52 12

Once the operator has started, it will send temperature values to the MBP. The values can be visualized in the diagrams live values and historical values in the sensor details view. The MBP also provide some value statistics, for example the average value from all received temperature values.

Screenshot 2020-11-09 at 15 48 38

Screenshot 2020-11-09 at 15 48 55

🎉 That's it!