IP detector - Amazon IoT Greengrass
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

IP detector

The IP detector component (aws.greengrass.clientdevices.IPDetector) does the following:

  • Monitors the Greengrass core device's network connectivity information. This information includes the core device's network endpoints and the port where an MQTT broker operates.

  • Updates the core device's connectivity information in the Amazon IoT Greengrass cloud service.

Client devices can use Greengrass cloud discovery to retrieve associated core devices' connectivity information. Then, client devices can try to connect to each core device until they successfully connect.

Note

Client devices are local IoT devices that connect to a Greengrass core device to send MQTT messages and data to process. For more information, see Interact with local IoT devices.

The IP detector component replaces a core device's existing connectivity information with the information it detects. Because this component removes existing information, you can either use the IP detector component, or manually manage connectivity information.

Note

The IP detector component detects only IPv4 addresses.

Versions

This component has the following versions:

  • 2.1.x

  • 2.0.x

Type

This component is a plugin component (aws.greengrass.plugin). The Greengrass nucleus runs this component in the same Java Virtual Machine (JVM) as the nucleus. The nucleus restarts when you change this component's version on the core device.

This component uses the same log file as the Greengrass nucleus. For more information, see Monitor Amazon IoT Greengrass logs.

For more information, see Component types.

Operating system

This component can be installed on core devices that run the following operating systems:

  • Linux

  • Windows

Requirements

This component has the following requirements:

  • The Greengrass service role must be associated to your Amazon Web Services account and allow the iot:GetThingShadow and iot:UpdateThingShadow permissions.

  • The core device's Amazon IoT policy must allow the greengrass:UpdateConnectivityInfo permission. For more information, see Amazon IoT policies for data plane operations and Minimal Amazon IoT policy to support client devices.

  • If you configure the core device's MQTT broker component to use a port other than the default port 8883, you must use IP detector v2.1.0 or later. Configure it to report the port where the broker operates.

  • If you have a complex network setup, the IP detector component might not be able to identify the endpoints where client devices can connect to the core device. If the IP detector component can't manage the endpoints, you must manually manage the core device endpoints instead. For example, if the core device is behind a router that forwards the MQTT broker port to it, you must specify the router's IP address as an endpoint for the core device. For more information, see Manage core device endpoints.

  • The IP detector component is supported to run in a VPC.

Dependencies

When you deploy a component, Amazon IoT Greengrass also deploys compatible versions of its dependencies. This means that you must meet the requirements for the component and all of its dependencies to successfully deploy the component. This section lists the dependencies for the released versions of this component and the semantic version constraints that define the component versions for each dependency. You can also view the dependencies for each version of the component in the Amazon IoT Greengrass console. On the component details page, look for the Dependencies list.

2.1.8 – 2.1.9

The following table lists the dependencies for version 2.1.8 and 2.1.9 of this component.

Dependency Compatible versions Dependency type
Greengrass nucleus >=2.2.0 <2.13.0 Soft
2.1.7

The following table lists the dependencies for version 2.1.7 of this component.

Dependency Compatible versions Dependency type
Greengrass nucleus >=2.2.0 <2.12.0 Soft
2.1.6

The following table lists the dependencies for version 2.1.6 of this component.

Dependency Compatible versions Dependency type
Greengrass nucleus >=2.2.0 <2.11.0 Soft
2.1.5

The following table lists the dependencies for version 2.1.5 of this component.

Dependency Compatible versions Dependency type
Greengrass nucleus >=2.2.0 <2.10.0 Soft
2.1.4

The following table lists the dependencies for version 2.1.4 of this component.

Dependency Compatible versions Dependency type
Greengrass nucleus >=2.2.0 <2.9.0 Soft
2.1.3

The following table lists the dependencies for version 2.1.3 of this component.

Dependency Compatible versions Dependency type
Greengrass nucleus >=2.2.0 <2.8.0 Soft
2.1.2

The following table lists the dependencies for version 2.1.2 of this component.

Dependency Compatible versions Dependency type
Greengrass nucleus >=2.2.0 <2.7.0 Soft
2.1.1

The following table lists the dependencies for version 2.1.1 of this component.

Dependency Compatible versions Dependency type
Greengrass nucleus >=2.2.0 <2.6.0 Soft
2.1.0 and 2.0.2

The following table lists the dependencies for versions 2.1.0 and 2.0.2 of this component.

Dependency Compatible versions Dependency type
Greengrass nucleus >=2.2.0 <2.5.0 Soft
2.0.1

The following table lists the dependencies for version 2.0.1 of this component.

Dependency Compatible versions Dependency type
Greengrass nucleus >=2.2.0 <2.4.0 Soft
2.0.0

The following table lists the dependencies for version 2.0.0 of this component.

Dependency Compatible versions Dependency type
Greengrass nucleus >=2.2.0 <2.3.0 Soft

For more information about component dependencies, see the component recipe reference.

Configuration

This component provides the following configuration parameters that you can customize when you deploy the component.

2.1.x
defaultPort

(Optional) The MQTT broker port to report when this component detects IP addresses. You must specify this parameter if you configure the MQTT broker to use a different port than the default port 8883.

Default: 8883

includeIPv4LoopbackAddrs

(Optional) You can enable this option to detect and report IPv4 loopback addresses. These are IP addresses, such as localhost, where a device can communicate with itself. Use this option in test environments where the core device and client device run on the same system.

Default: false

(Optional) You can enable this option to detect and report IPv4 link-local addresses. Use this option if the core device's network doesn't have Dynamic Host Configuration Protocol (DHCP) or statically assigned IP addresses.

Default: false

2.0.x
includeIPv4LoopbackAddrs

(Optional) You can enable this option to detect and report IPv4 loopback addresses. These are IP addresses, such as localhost, where a device can communicate with itself. Use this option in test environments where the core device and client device run on the same system.

Default: false

(Optional) You can enable this option to detect and report IPv4 link-local addresses. Use this option if the core device's network doesn't have Dynamic Host Configuration Protocol (DHCP) or statically assigned IP addresses.

Default: false

Local log file

This component uses the same log file as the Greengrass nucleus component.

Linux
/greengrass/v2/logs/greengrass.log
Windows
C:\greengrass\v2\logs\greengrass.log
To view this component's logs
  • Run the following command on the core device to view this component's log file in real time. Replace /greengrass/v2 or C:\greengrass\v2 with the path to the Amazon IoT Greengrass root folder.

    Linux
    sudo tail -f /greengrass/v2/logs/greengrass.log
    Windows (PowerShell)
    Get-Content C:\greengrass\v2\logs\greengrass.log -Tail 10 -Wait

Changelog

The following table describes the changes in each version of the component.

Version

Changes

2.1.9

Bug fixes and improvements
  • Adjusts the IP acquired step to only send logs at the debug log level.

2.1.8

Version updated for Greengrass nucleus version 2.12.0 release.

2.1.7

Version updated for Greengrass nucleus version 2.11.0 release.

2.1.6

Version updated for Greengrass nucleus version 2.10.0 release.

2.1.5

Version updated for Greengrass nucleus version 2.9.0 release.

2.1.4

Version updated for Greengrass nucleus version 2.8.0 release.

2.1.3

Version updated for Greengrass nucleus version 2.7.0 release.

2.1.2

Bug fixes and improvements
  • Improves error messages that this component logs in certain scenarios.

  • Version updated for Greengrass nucleus version 2.6.0 release.

2.1.1

Version updated for Greengrass nucleus version 2.5.0 release.

2.1.0

Improvements
  • Adds the defaultPort parameter, which enables you to use a non-default MQTT broker port.

  • Updates to make log messages more clear.

2.0.2

Version updated for Greengrass nucleus version 2.4.0 release.

2.0.1

Version updated for Greengrass nucleus version 2.3.0 release.

2.0.0

Initial version.