Samsung ARTIK Cloud is an open data exchange platform designed to bring order to the chaos, break down the silos, and empower you to bring about the promise of IoT. With easy-to-use open APIs and tools, you can collect, store and act on any data from any device or cloud service.
Reekoh has developed 2 new plugins that will allow you to integrate your ARTIK devices to any other hardware or platform — the Samsung ARTIK Device Sync and Stream Plugins.
The Samsung ARTIK Stream plugin enables fetching of device data from the Samsung’s ARTIK Cloud and ingest them into Reekoh for processing and integration. On the other hand, the Samsung ARTIK Device Sync plugin enables device inventory synchronisation between the ARTIK Cloud and Reekoh. Both plugins make use of ARTIK Cloud Applications and REST API.
Let’s go through the guide below to see how these plugins work.
First off, you need to sign up for a Samsung ARTIK account by going to the ARTIK Cloud Developers portal. Once your account is ready, create a new application by navigating to Applications > New Application on your ARTIK dashboard. Complete the wizard that comes next.
Once your application has been created, take note of the Client ID and Secret since this will be used when you configure the ARTIK Stream and Device Sync plugins.
Another requirement when you configure your plugins is the User ID. To get this, go to the ARTIK Cloud API Console and then navigate to Users > Get /users/self > Try it. Scroll down the page to locate the Response Body section. You should be able to see your user id which will be used when you configure your ARTIK Stream and Device Sync plugins.
Next is to set up your device type by navigating to Device Types > New Device Type on your ARTIK dashboard. Complete the wizard that follows.
Once your device type has been created, create a manifest that will describe the data your device type can send. Navigate to Manifest > New Manifest and then complete the wizard that follows. Once all fields are complete. Click Activate Manifest.
Next is to add devices to your device type by going to the ARTIK Cloud Devices portal. Click Add Another Device.
Type the name of the device type you’ve created, and then provide the desired name for your device. Click Connect Device.
Once your devices are connected, navigate to Permissions > Set Permissions of your application and then click Set Permissions for a Specific Device. Look up the device type you want to permit, and then tick the corresponding box(es). To set permission for another device type, click Add Device Type. Click Save to keep the changes made.
Type this link in the address bar — https://accounts.artik.cloud/authorize?client_id=(client id of your application)&response_type=code, and then click Allow to grant access to your application to read and/or write data to your device type(s). You should be directed to the URL you’ve provided upon setting your application.
After you’ve completed your ARTIK Cloud settings, you need to sync your devices from ARTIK to Reekoh. To do this, install and configure the ARTIK Device Sync plugin in your Reekoh instance. You may refer to our Plugin and Device Sync documents for more info.
After you’ve configured your plugin, the Device Sync will run on the schedule you’ve set upon configuration of your device sync. For example, if you’ve set the schedule to 10 minutes, it will sync devices from ARTIK to Reekoh every 10 minutes. If you want to manually sync devices to Reekoh, navigate to Devices > Sync > All Device Syncs and then click the SYNC button of your ARTIK device sync.
Once your devices are synced, next is to install and configure these plugins in your Reekoh Pipeline — For this demo, we’ll be using the ARTIK Stream and HTTP Webhooks Connector (this will integrate your Reekoh instance to any HTTP endpoint to POST and synchronize device data).
After you’ve installed the plugins, navigate to Pipeline Studio and then key-in the desired name for your pipeline. Locate the Streams category on the right pane, and then drag & drop the ARTIK plugin to the blank workspace.
To configure, double-click the plugin and then complete the wizard that follows. Click Save.
Do the same procedure for HTTP Webhooks, but this time, locate the Connectors category.
After you’ve configured both plugins, connect them by dragging the output terminal of ARTIK Stream to the input terminal of HTTP Webhooks. Click Save & Deploy to run your pipeline.
Once your pipeline is running, Reekoh will start fetching device data from ARTIK and then send it to Webhooks. Note that fetching of data will depend on the interval schedule you’ve set upon configuration of your plugin. Also, make sure that your device is able to simulate data which can be done using the ARTIK Cloud Device Simulator. Device data to be sent should be similar to the settings you’ve defined in your Manifest. You may refer to the ARTIK Cloud Documentation for the procedure.
To verify if data has been received, go to the Webhook URL you’ve provided upon configuration of your HTTP Webhooks Connector plugin, and then add ?inspect. For example, http://requestb.in/pkwgstpl?inspect. You should be able to see the transmitted data under Raw Body.
For more info on how to customise your Reekoh pipeline, you can check out our Starter Guides in the Reekoh Help Center.