Structure of Applications
You control the gateway and end nodes which connect to it from mobile apps on devices such as smartphones. Gateway vendors and end node vendors develop mobile apps for respective components. Let us call them "gateway app" and "end node app" respectively.
Gateway App
The gateway app consists of a mobile app and an application on Kii Cloud to manage the gateway.
The gateway app manages the thing information of the gateway and keeps the list of end node apps which use the geteway.
You need to develop a gateway app even though the gateway app currently cannot have any special functionality. It is assumed that the list of end node apps stored in a gateway app on Kii Cloud will be used to replace gateway hardware when Kii Cloud supports the hardware replacement feature in future. The list will be used to update the gateway information on each end node app.
End Node App
The end node app consists of a mobile app and an application on Kii Cloud to manage and operate end nodes.
The end node app provides management functions such as adding/deleting endnodes to/from the gateway and operational functions such as sending/receiving commands to use end nodes.
Both apps consists of a pair of a mobile app and an application on Kii Cloud to provide features.
Gateway vendors can develop a single mobile app which can manage a gateway and also operate end nodes provided by the gateway vendors. End node vendors can develop a single end node app which can operate multiple types of devices and/or separate end node app per device type.
Example of Applications
In this example, three different vendors provide gateway components.
- The gateway vendor provides the "Home Gateway" app as a gateway app. This app manages the gateway device.
- Vendor A provides the "Lighting" app as an end node app which operates smart LED lighting units. This app can manage (add and delete) and operate (turn on and off) such units.
- Vendor B provides the "Security Camera" app as an end node app which operates security cameras. This app can manage (add and delete) and operate (record and play) such cameras.
Each vendor creates an application on Kii Cloud and uses it from a gateway app or an end node app.
The icons of these three mobile apps are on the home screen of the user device. While these apps are developed by different vendors, smart lighting units and security cameras as end nodes are connected to Thing Interaction Framework and receive commands via the gateway.
The current version of Kii Cloud does not support interaction among end node apps and assumes end nodes are operated independently.
Things on Application
The gateway app and end node apps manage these objects:
Thing on Gateway App
Only the gateway will be registered to the gateway app while the end nodes will not be registered to the gateway app.
Things on End Node Apps
The gateway and end nodes which connect to the gateway will be registered to the end node app.
Note these points:
- The gateway will be registered to both gateway app and end node apps. The same vendorThingID will be used for it across the applications but different thingIDs will be assigned for it in each application.
- Things will be registered to different applications depending on the object type managed by application. In the below figure, smart LED lighting units are registered to the "Lighting" app (End node app 1) while security cameras are registered to the "Security Camera" app (End node app 2). Things which connect to the same gateway are not necessarily registered to the same application.
- Things are registered to end node apps per managed unit. In the below figure, one KiiThing is created for each of the two smart LED lighting units and two security cameras.