OKdo cloud platform
The first step in this section as part of prerequisites is to create account on the OKdo cloud – so go to OKdo and sing up.
After you login go to the “Playground” what we must do is to create two devices. The first device will be used to supply data from the Raspberry Pi and second device will be used to read data using Riverdi IoT Display.
So, let’s first create the “Raspberry Pi” device by selecting a box with the same name and providing the exact “Raspberry Pi” as a name for the device. After that, the new device with the name you have provided during creation will appear in the top left corner next to the side bar.
Each device can have more assets. For this purpose, we will provide the CPU temperature and CPU load as measurements to the Cloud. So, let’s create two assets for the Raspberry Pi device, both of sensor type where the first one will be named cpu_temperature and second cpu_load.
Now let’s create the second device by selecting “Your own device” box from the list and providing “Riverdi IoT Display” as the device name. Compared to first case, we will create two assets of actuator type but keeping the names for assets as for the previous device. As a result, we have two devices now with the same asset names but different types of assets.
As the final step in the setup, we should create a rule that will create a mirror between these two devices.
Go back to the “Playground” dashboard and click RULES button on the side menu. Then click NEW RULE button and drag and drop “Raspberry Pi” device to TRIGGERS and select cpu_load assets checkbox. Then drag and drop the “Riverdi IOT Device” to the ACTIONS and select the same assets checkbox. What this means is that on each change of the cpu_load asset value on the “Raspberry Pi” device, the value will be copied to the cpu_load asset of the “Riverdi IoT Display” device. Now create a new rule for the cpu_temprature asset.
When we have finished the setup, we can check which ID and Token is generated by the platform for both devices. Click the SETTINGS button on the top right corner, then go to the AUTHENTICATION tab and there you will find the keys which are in relation to our device and which should be provided by the Raspberry Pi and Riverdi IoT Display applications.
You can continue exploring other options on the OKdo but for us this is enough to establish a connection between Raspberry Pi and OKdo.