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

gn:act_getIIoTLoRaStatus(MGIIOT26)

Description
Action that reads the LoRa status from the IIoT device
Default value: -1

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 LoRa status

[gn:act_getIIoTLoRaStatus]|[source,target,callbackWidgetId,callbackEvent]
Parameter Description
source source from where the device MAC address will be get
target target where the config hash 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/loraStatusNumber - target
@+id/getIIoTLoRaStatus - callbackWidgetId
gn:act_set1 - callbackEvent
[gn:act_getIIoTLoRaStatus]|[@variable/deviceMacClicked,@variable/loraStatusNumber,@+id/getIIoTLoRaStatus,gn:act_set1]