英語 での To thing interaction framework の使用例とその 日本語 への翻訳
{-}
-
Colloquial
-
Ecclesiastic
-
Computer
-
Programming
Register a thing to Thing Interaction Framework.
The air conditioner reports the current room temperature andhumidity to Thing Interaction Framework.
Requests to Thing Interaction Framework are sent via HTTPS, and the push notifications are received via MQTT.
In this case, we will register the following trait to Thing Interaction Framework.
The thing regularly registers its status to Thing Interaction Framework as a state. Users will check the state from their mobile apps.
The command sent from themobile app is first delivered to Thing Interaction Framework.
For example, the following data will be uploaded to Thing Interaction Framework if a sensor-equipped fuel tank is registering the current water level as its state:.
Command details can beregistered when a command is sent to Thing Interaction Framework.
For example, the following data will be uploaded to Thing Interaction Framework if the air conditioner is registering the current room temperature and humidity as its state:.
Requests sent from each end node will be aggregated by the gateway andwill be sent to Thing Interaction Framework.
When the thing reports the command result to Thing Interaction Framework, the Cloud will send a notification to the mobile app with the command ID.
Define features the thing supports as a trait and register the trait to Thing Interaction Framework.
The things return the result of the command execution to Thing Interaction Framework. The result can be browsed by other devices(e.g., mobile applications and web applications).
It associates the owner with the device registration ID of JPush andregisters it to Thing Interaction Framework by calling mApi.
For example, the following data will be uploaded to Thing Interaction Framework if a sensor-equipped fuel tank is registering the current water level as its state: You can freely define the data format of the state.
When the thing updates its state,it will upload the state to Thing Interaction Framework in the JSON format.
The following figure shows an example of data sent to Thing Interaction Framework when we send the command"Turn the power of the air conditioner on, set the preset temperature to 25 degrees, and set the fan speed to 5.
If it returns KII_FALSE, the SDK will not execute the state updating(i.e.,will not upload the latest state to Thing Interaction Framework).
Step 6: Browse the command resultWhen the thing reports the command result to Thing Interaction Framework, the Cloud will send a notification to the mobile app with the command ID.
For example, the following data will be uploaded to Thing Interaction Framework if the air conditioner is registering the current room temperature and humidity as its state: You can freely define the data format of the state, but the data format needs to be defined as the thing schema.
The thing program ofHello Thing-IF sends state information to Thing Interaction Framework at one-minute intervals.
The following figure shows an example of data sent to Thing Interaction Framework when we send the command"Turn the power of the air conditioner on, set the preset temperature to 25 degrees, and set the fan speed to 5". The figure illustrates the data send to Thing Interaction Framework.
When the device is installed, the owner specified upon creating the ThingIFAPI will be associated with the device token andregistered to Thing Interaction Framework.
When registering a thing to Thing Interaction Framework, you will need to present the thing password(shown as"thingPassword" in the figure) with the vendorThingID. You can let the user define this password at the initial launch of the thing while you can assign it like the vendorThingID(i.e., it can be hard-coded before the shipment).
The Thing-IF SDK creates this dedicated thread to call the state handler with a certain interval in order to send state information to Thing Interaction Framework.
The trait(LiquidLevelMeter version 1) at the left of the figure defines the actions and state mentioned above.We assume that the trait is registered to Thing Interaction Framework in advance.
It will communicate with the converter in the MQTT protocol, translate the data in MQTT protocol into the REST API of Thing Interaction Framework, and send it to Thing Interaction Framework via the Internet.
For example, that the things you want to control only support Bluetooth or ZigBee. They have no capability to connect to the Internet, so they cannot connect to Thing Interaction Framework by themselves.