Skip to content

Integrations

Connexa gives you the ability to easily integrate device data into your own applications and cloud services. Currently these features are in Beta availability and available to all users, though they should not be relied upon for mission critical business logic.

Cloud Platforms

AWS

The AWS integration publishes device data into an SNS topic. This can be used to trigger other AWS services such as Lambda functions, allowing you to easily store your data or perform actions based on alerts. Learn more about SNS here.

Prerequisits

  1. Create an SNS topic

    • Login to your account and navigate to the SNS resource. SNS Screencap
    • Click Create Topic and name it Create Topic
  2. Define the access policy

    • Select the Basic access policy and give publish access to Only the specified AWS accounts
    • Insert the account 940497413619 into the text entry box Access Policy
  3. Click Create Topic. New Topic

Enabling the Integration

  1. Open the AWS integration tab and select the edit icon. AWS Init

  2. Once the edit form is opened, you will need the following information to complete enabling the integration:

  3. Objects

  4. Topic Arn
    • The full arn string for your SNS topic, for example: arn:aws:sns:us-east-2:393221637266:MainSolarData
  5. Region
    • The region of your AWS account, for example: us-east-2

Enter the information in the corresponding fields on the form.

AWS Edit

  1. Press 'Submit' and you're done! Your integration is now active and each time yoload the dashboard page we will display the most recent triggers and any associated success/error codes.

GCP

The GCP integration publishes device data into a Pub/Sub topic. This can be used to trigger Cloud Functions or be processed using App Engine. Learn more about Pub/Sub here.

Prerequisits

  1. Create a Pub/Sub topic

    • Login to your account, select the project you are working with, and navigate to the Pub/Sub resource. Pub/Sub Screencap
  2. Create a new topic New Topic

  3. Add pubsub-publisher@cesp-ui-staging.iam.gserviceaccount.com as a member with the Pub/Sub Publisher role. Click save. Add Member

Enabling the Integration

  1. Open the GCP integration tab and select the edit icon. GCP Init

  2. Once the edit form is opened, you will need the following information to complete enabling your integration:

  3. Objects

  4. Project ID
    • The id string for your project, not the project name.
  5. Topic
    • The full PubSub topic string, for example projects/test-project/topics/MainSolarData

Enter the information in the corresponding fields on the form.

GCP Edit

  1. Press 'Submit' and you're done! Your integration is now active and each time yoload the dashboard page we will display the most recent triggers and any associated success/error codes.

Completed Integration

Once you have set up your integration and it begins publishing data, you will see a tab that looks like this. Completed Integration

The table will have data similar to the following.

Success Completed At Published Data Integration Data Topic/Arn
true 6/28/22 03:20:37 {'published_at':'2022-06-28T08:20:29.502Z','device_id':'5300520006504b5957343920','data':12.117188,'integration_id':'FFjU28MMaL3W9B9hhhhH','sampled_at':'2022-06-28T08:20:29Z','object':'adc_vbterm','slave':'PS-PWM-30M','cc_firmware':'v01.04.06','fw_version':'PSPWM 1.0.10'} {'device':'5300520006504b5957343920','messageId':'4985640066378276'} projects/test-env/topics/push
  • Success
    • boolean
    • Whether or not the integration ran without an error.
  • Completed At
    • Timestamp
    • The local time that the integration completed.
  • Published Data
    • Object
    • The data that should have been published through the integration, with the following fields:
      • published_at the UTC time the data was published from the device
      • device_id the id of the device the data originated from
      • data the actual object data that triggered the event
      • integration_id the id of the integration the data was submitted to
      • sampled_at the UTC time that the data was sampled on the device
      • object the object name that the data is referring to
      • slave the slave device that the data originated from
      • cc_firmware the firmware running on the slave device
      • fw_version the firmware running on the NOI that collected the data
  • Integration Data
    • Object
    • Data from the integration. On success this will contain the following:
      • device the device that triggered the integration
      • messageId the id for the pubsub message (if using GCP)
      • error (on failure) the error code from the integration. For example:
        • AuthorizationError: User: arn:aws:iam::940497413619:user/CXASubCloudPush is not authorized to perform: SNS:Publish on resource: arn:aws:sns:us-east-2:393221637266:MainSolar because no resource-based policy allows the SNS:Publish action
  • Topic/Arn
    • String
    • The corresponding topic/arn that the data was published to, helpful if you have recently changed it.