Kii

Introduction

Kii Cloud is an MBaaS (Mobile Backend as a Service) and an IoT (Internet of Things) cloud platform provided by Kii Corporation.

Kii offers a cloud service that provides various server-side functions as versatile APIs for mobile apps and IoT solutions. By leveraging these APIs, the user can provide services making mobile apps and things Internet-ready without the server-side implementations and operations.

To learn more about the advantages of using the Kii Cloud see this page:

http://docs.kii.com/en/starts/merits

In order to make it easier for developers and system integrators to use these APIs, Kii offers a set of SDKs (http://docs.kii.com/en/references) for multiple platforms.

Internet of Things (IoT)

For IoT scenarios Kii offers the Thing-IF SDK (https://docs.kii.com/en/guides/thingifsdk). Thing Interaction Framework (Thing-IF https://docs.kii.com/en/starts/iot-functions/basic_function) is a framework positioned above the Kii Cloud SDK. It is a combination of selected features of the Kii Cloud SDK to accelerate IoT solutions.

Devices which are part of IoT solutions are called things in the Kii Cloud environment.

Connector basics

The Kii Cloud connector runs on Meshlium as an agent/daemon that periodically checks the local database for incoming sensor data (eg. frames coming from remote Waspmotes). The Meshlium unit itself is registered as a gateway against the Kii Cloud and the nodes sending sensor data are dynamically registered as end-nodes of the gateway. The sensor data itself provided by the nodes is sent to the Kii Cloud as Thing-IF states (http://docs.kii.com/en/functions/thingifsdk/thingifsdk/model/states) which reflect a node's sensor data snapshot at a specific point in time.

Once the nodes are sending states on the Kii Cloud you could for example browse the node's current and historical sensor values on a mobile application by using the Thing-IF SDK for Android (https://docs.kii.com/en/guides/thingifsdk/android) or iOS (https://docs.kii.com/en/guides/thingifsdk/ios).

Connector configuration and operation

You can configure the Kii Cloud connector in the tab of the Meshlium Manager System. Click on Basic Cloud Partner and select Kii.

Then fill in the fields as follows:

  • Server Location: Enter server location of your app (either US, JP, EU, CN3 or SG) created at developer.kii.com. For more info on creating an app see this page.

  • App ID: Enter the App Id of your app created at developer.kii.com. For more info on creating an app see this page.

  • App Key: Enter the App Key of your app created at developer.kii.com. For more info on creating an app see this page.

  • Gateway Vendor ID: Enter a unique name for this gateway (Meshlium). It will be created if it does not exist on the Kii cloud.

  • Gateway Password: Enter a password for this gateway (Meshlium). If the gateway already exists on the Kii cloud, the password must match the previous registration.

  • Owner Username: Enter a username to define which Kii user will own the gateway and nodes. It will be created on the Kii cloud if it does not exist.

  • Owner Password: Enter a password for the user you specified above. If the user already exists on the Kii cloud, the password must match the previous registration.

  • Update Interval: Enter the frequency in which the Kii agent queries the local database for new sensor data (frames). Minimum and default is 60 seconds.

  • Maximum Frames per Update: Enter the maximum number of frames to fetch from the local database per update cycle. Default is 50, maximum is 200. Only frames not previously synchronized will be fetched. As a general rule of thumb we advise you at least allow for 1 second per frame in order to allow the daemon to keep up (eg. if you choose 200 frames, select an interval of at least 200 seconds).

  • Log Level: Enter the log level. From fewer to more details, the levels are: OFF, ERROR, INFO, DEBUG, REPORT. Default is OFF.

You can start and stop the service by using the "Start/Stop" button in the Manager System plugin:

How to verify that the Kii Cloud Connector is working properly

You can manually verify that the Kii Cloud Connector is working properly doing a visual inspection of the devices and sent data at our developer console. These are the steps:

  • Go to developer.kii.com and sign in with the same credentials you used to create the app as described in the previous section of this document.

  • Select the app you created before. You will see a set of icons representing the different services provided by Kii.

  • Click on the Things icon (the cube), then click on the Console tab and make sure you can see the Meshlium (and the nodes that you tested to submit data) in the list.

  • Click on the Objects icon (the cylinder), then click on the Data Browser tab. In the combo box select Normal bucket and then click on Application scope. Now click on states. Make sure you see a row that when expanded shows the data from one frame (this is fine, you can see them all here). Make sure the version column shows a number equal to the number of frames you sent (if you click on Refresh on the top left, this number should increase on each interval time by the number of maximum frames that you configured on the connector configuration page).

  • Click again on the Objects icon (the cylinder), then click on the Data Browser tab. In the combo box select Time series bucket and then click on Thing scope. In the second combo box select Vendor Thing ID and in the text box below, type the name of the node you want to verify. A pop-up box will appear with the node and you must click on it. Now click on ts_history and you will see a list of sensor entries for that node. Click on each of them to verify the sensor data.

Last updated