Skip to main content

Set Up and Configure the Kepware IoT Gateway

availability
Feature availability by platform, plan type, and user type
Platform:AvailableWebNot availableMobile
Plan Type:Not availableBasicNot availableEssentialAvailablePremiumAvailableEnterprise
User Type:Not availableRequesterNot availableFull UserAvailableAdministrator

The Kepware agent transmits metric tags from your Kepware ServerEx6 to the MaintainX® platform.

Before you begin, review the requirements for your Kepware installation and your MaintainX account.

Create a Connector and an Access Token​

To configure the Kepware connector, you need an access token. The token authenticates Kepware's REST API request with the MaintainX platform. For security purposes, every Kepware instance must have its own token.

danger

Keep your token secure. Do not share it with unauthorized users.

  1. Log into MaintainX as an Administrator.
  2. From the sidebar, select Settings. Under Organization Settings, select Integrations.
  3. On the Integrations page, go to the Connectors tab.
  4. Navigate to the Kepware tile, and select Connect. The Kepware dialog appears.
  5. Select + Create New Instance.
  6. Follow the steps to create a new instance until the Token appears.
  7. Copy the Token and save it for later use.
info

The Token is only displayed once when you create the Kepware instance. If you lose the token for a Kepware instance, you can revoke it and create a new one. For more information, see Revoke and Regenerate a Kepware Access Token.

Choose Your Region​

The MaintainX platform operates in multiple regions. When you configure the Kepware agent, you must point it at the agent endpoint for your organization's region.

RegionAgent Endpoint
US1 (United States)https://agent.maintainx.com
EU1 (Europe)https://agent.eu1.maintainx.com

To identify your region:

Your region is assigned when your MaintainX organization is created. To find it, check your MaintainX login URL:

  • Organizations that log in at app.getmaintainx.com are on US1.
  • Organizations that log in at app.eu1.maintainx.com are on EU1.

If you're unsure which region your organization is on, contact MaintainX Support.

Configure the Kepware Agent​

note

These are the recommended settings to provide the best experience. If you choose to use different settings, you might encounter issues with the integration such as rate limiting.

  1. From the KepwareServerEx6 Configuration screen, right-click on the IoT Gateway and select New Agent.

  2. In the Name field, enter the MaintainX REST Agent.

  3. Select Rest Client from the Type dropdown, then Next.

  4. On the Rest Client - Endpoint Page, enter the following information:

    • URL: Enter the agent endpoint for your region followed by /agent/kepware/sensorReadings. For more information, see Choose Your Region to determine which endpoint applies to your organization.

      RegionURL
      US1https://agent.maintainx.com/agent/kepware/sensorReadings
      EU1https://agent.eu1.maintainx.com/agent/kepware/sensorReadings
    • Method: Select POST.

    • Rate (ms): 60000.

    • Timeout (s): 30.

    • Narrow Format: Ensure this option is selected.

    • Max events per: 1000.

    warning

    Anything above 1000 will be rejected by the MaintainX platform.

    Definition of the fields in Rest Client - Endpoint Page:

    FieldDescription
    URLThe endpoint to which the REST client will send data.
    MethodThe HTTP method used for the request (e.g., GET, POST).
    Rate (ms)The frequency, in milliseconds, at which data is sent to the endpoint.
    Timeout (s)The duration, in seconds, the client waits for a response before timing out.
    Wide FormatProduces an output that includes all enabled tags in the agent with every scan.
    Narrow FormatProduces output based on tags that have changed value or quality.
    Max events perThe maximum number of events to include in each data transmission.
  5. Select Next.

  6. On the Rest Client - Headers Page, enter the following information:

    Content-Type: application/json; charset=utf-8
    Authorization: <MaintainX-Connector-Token>

    Definition of the fields in Rest Client - Headers Page:

    FieldDescription
    MaintainX-Connector-TokenAccess token you copied when you created a new Kepware instance. It is used for authentication to the MaintainX platform.
  7. Select Finish.

warning

The MaintainX Kepware connector only supports the default message format. Modifying the message template will cause errors.

After the Kepware agent is created, add the tags you want to monitor. For more information, see Add Tags to the Kepware Agent.

Revoke and Regenerate a Kepware Access Token​

The access token for a Kepware instance is only displayed once, when you first create the instance. If you lose the token, you can revoke it and generate a new one.

To revoke and regenerate a token:

  1. Log into MaintainX as an Administrator.

  2. From the sidebar, select Settings. Under Organization Settings, select Integrations.

  3. On the Integrations page, go to the Connectors tab.

  4. Navigate to the Kepware connector, and select Manage.

  5. In the Kepware dialog, go to the Instances list and select the instance whose token you want to revoke.

  6. In the Manage Instance dialog, select Revoke Token.

    The instance's Status changes to Disconnected, and in the Token field it shows Revoked.

  7. Select Generate New Token.

  8. Copy the new token from the Token field.

  9. On the Kepware IoT Gateway Rest client for MaintainX, edit the HTTP Header property and replace the old token with the new one.

Troubleshooting​

Contact the MaintainX Support Team​

If you continue to experience trouble with configuring the Kepware connector, contact the MaintainX Support team.

Resources​