From wiki.ginstr.com
Jump to: navigation, search

gn:act_getIIoTApiKey(MGIIOT26)

Description
Action that reads IIoT API key from the IIoT device
Default value: ""

Important

To be able to use this action, the bleIIoT service must be started!
This action establishes connection to IIoT device which is persistent. Small number of connections to different devices should be established and it is desirable that gn:act_disconnectIIoTDevice is executed if connection is not needed anymore.
Action returns
void

Action signatures

Get IIoT API key

[gn:act_getIIoTApiKey]|[source,target,callbackWidgetId,callbackEvent]
Parameter Description
source source from where the device MAC address will be get
target target where the API key will be stored
callbackWidgetId id of the widget where the callback event will be executed
  • Valid callbackWidgetId:
    • hardcoded
callbackEvent name of the widget event that will be executed
  • Valid callbackEvent:
    • hardcoded

Example

@variable/deviceMacClicked - source
@variable/apiKeyText - target
@+id/getIIoTApiKey - callbackWidgetId
gn:act_set1 - callbackEvent
[gn:act_getIIoTApiKey]|[@variable/deviceMacClicked,@variable/apiKeyText,@+id/getIIoTApiKey,gn:act_set1]