Local Connect ™

The Ayla IoT platform provides many connectivity possibilities. This guide provides information on the Local Connect™ feature of the Ayla IoT Platform. In general, Local Connect™ is an optimization of the standard remote communication method. However, it applies only to the exchange of device property datapoints.

Using local communication is advantageous in scenarios where monitoring and control of IoT devices is required in the absence of internet service. On the other hand, it adds complexity in designing an IoT solution due to increased manageability tasks, some of which may impact the end customer. It also adds a delay during switching between each connection type which can impact the responsiveness of a product. Keep these drawbacks in mind when determining the requirements for each device.

At the application level, handling of a property datapoint is the same for both remote and local connections. Irrespective of connection type, specifying a list of managed properties is highly recommended to keep a key subset of properties required by the mobile application. Specifying a managed properties list will let the mobile SDK automatically keep these property datapoints up-to-date regardless of the current connection type.

The following image shows an example of how the changes in device properties’ values are propagated to and from the cloud, and to other LAN and BLE clients connected to the device.

1082

Local Connect™ Types

The Ayla IoT Platform provides two types of local communication:

  • LAN Connect: LAN Connect establishes a secure peer-to-peer connection between an IoT device and a mobile phone when they are on the same Local Area Network (LAN). The Ayla Mobile SDK (mSDK) transparently initiates a secure LAN session with an IoT device. Typically, no end customer involvement is required.

    • This commonly uses Wi-Fi technology to connect users’ mobiles to the IoT devices.
    • Monitoring and controlling of the IoT devices is supported even in the absence of internet service via Offline LAN Connect™.
    • It provides a scalable and routable solution.
    • It is completely seamless to the end customer requiring no configuration.
  • BLE Connect: BLE Connect provides a direct connection between an IoT device and a mobile phone Personal Area Network (PAN). The Ayla Mobile SDK (mSDK) initiates a BLE Local Control session with an IoT device after the end customer successfully completes BLE pairing.

    • BLE works without a Wi-Fi router.

    • Monitoring and controlling of the IoT devices is supported in the absence of Internet services.

      Limitations of BLE Connect:

      • A maximum of 5 active connections to IoT devices per mobile phone is permitted.
      • BLE Connect is not a suitable solution where scalability and routing are required.
      • Each device allows up to 3 simultaneous connections.
      • The end customer must complete a pairing process (not a transparent process).

NOTE: The BLE Local Control is an optional feature and is not required to support the Wi-Fi configuration and registration feature.

Why Use Local Connect™?

The connection type of an IoT device should be set based on the usage requirements of the device. Using the standard remote connection is sufficient for most IoT devices. This is particularly true of devices that change infrequently such as sensors, de/humidifiers, air purifiers, etc. A local connection is best reserved for devices that are used very frequently by its users such as lights and wall plugs.

Reasons to choose LAN Connect:

  • There is no restriction on number of devices.
  • It works in the absence of Internet service (called Offline LAN Connect).
  • Supports a larger size data transfer.
  • It is completely seamless to the end customer

Reasons to choose BLE Connect:

  • Devices are in a remote locations away from Wi-Fi coverage.
  • When service technicians need temporary access to your devices (for installation, upgrade, or troubleshooting).

Supported Platforms

  • On the device side, the Local Connect™ feature is provided in the integrated agent running on ESP32.
  • On the mobile side, the Local Connect™ feature is supported for both the Android and iOS platforms.
    • All the existing mSDKs support LAN Communication.
    • BLE Local Connect is supported in the following mSDK version:
      • mSDK v6.8.1 and later for iOS
      • mSDK v6.8.02 and later for Android

Local Connect™ Settings

As this is an Ayla IoT Platform feature, it is enabled and disabled via settings. If it is determined that users of the device need local connection capabilities, configure local connection type(s) in the Ayla Developer Dashboard. This will add the capability at the platform level.

Ayla Developer Dashboard:

Connection settings are specified in the Templates tab (Figure 1).

  • Developers can select the preferred connection mode(s) under the Connects supported on Device section.
  • The connection priority for a device can be selected under the Priority of Connects section. Once configured and associated with a device, the mSDK tries to establish local connection(s) based on the priority specified. If a local connection cannot be established between the phone and the device, a remote connection is attempted.
2124

Figure 1: Ayla Developer Dashboard - Templates tab

Ayla OEM Dashboard:

In the Available Connections tab, developers can view and temporarily configure the connection related settings for a selected device. This should be used only during the development and testing phases as the configuration is set for all devices in the device template. The OEM dashboard only allows one device at a time to be changed.

2880

Figure 2: Ayla OEM Dashboard - Available Connects tab

Connectivity Use Cases

The following use cases describe scenarios where a remote and/or local connection should be used. Note that in almost all scenarios where a local connection is required, LAN Connect is the preferred option. This is because it is seamless / transparent to the end customer and supports many devices in a mobile application. BLE Connect requires user configuration, only supports a handful of devices simultaneously, and has severe range limitations.

  • Remote Connection - Example use case

    The following use case describes an example scenario where a local connection is not needed.

An end customer buys an air fragrance device. The device is located centrally in the house with excellent Wi-Fi connectivity. The device is on all the time and only needs to notify the end customer when the fragrance canister is low.

  • LAN Connect - Example use case

    The following use case describes an example scenario where a LAN connection should be used.

An end customer, after purchasing a light bulb, places it in their living room where there is excellent Wi-Fi coverage. The light is turned on and off frequently using the mobile application. It is important that the light be responsive even when internet connectivity from the ISP is down.

  • BLE Connect - Example use case

    The following use case describes an example scenario where a BLE connection should be used.

An end customer after purchasing a smart barbeque grill machine will be placing it in his yard where the Wi-Fi coverage is not available. As there is no reliable Wi-Fi connectivity, the machine is expected to work only on BLE. Note, the user must perform initial onboarding and registration activities using the Wi-Fi connection. Once complete, the machine can be placed in the yard and operated using BLE Connect. The user can now use their mobile application to control and monitor the device without Wi-Fi connectivity. It is important to note that the application is still required to connect and authenticate to the Ayla IoT Platform.