This section the integration steps and requirements that partners need to follow for integration with the Futurehome public API, both for receiving data from Futurehome and sending commands to Futurehome devices.

Overview

Futurehome Partner Platform integrates with external partners using HTTP for both flow directions (sending data to partners and accepting data). These directions will be described as streaming (Futurehome → Partner) and

ingestion (Partner → Futurehome). Although they are correlated, different processes happen that require action items from both Futurehome and the integrating partner.

Streaming

Futurehome delivers data produced by devices in its system to external partner using the HTTP POST methods and JSON as data format. Wrapped in the JSON message are a series of events and request metadata (request id), so partner APIs can use request ids issued by Futurehome for debugging and fault finding purposes. Before data can be sent to a partner, onboarding has to be performed. The following example format describes the onboarding format and highlights data required from the integrating partner.

{
  "partnerCode": "examplePartner", -- issued by Futurehome
  "name": "Partner", 
  "description": "Partner HTTP integration",
  "integrationType": "HTTP",
  "integrationConfig": {
    "authentication": {
      "type": "OAuth2ClientCredentials", 
      "tokenEndpoint": "<https://partner.com/oauth2/token>", -- required from the partner
      "credentials": {
        "clientId": "xxxxxx-xxxx-xxxxxx", -- required from the partner
        "clientSecret": "yyyy-yyyy-yyy-yyy-y-y-y", -- required from the partner
        "scope": "client_credentials_scope_1 client_credentials_scope_2 scope3", -- required from the partner
        "grantType": "client_credentials",
      }
    },
    "authorization": {
      "type": "HeaderBearerToken", -- required from the partner
      "key": "" -- required from the partner, if not Authorization Bearer
    },
    "batchSize": 150, -- configured by Futurehome
    "streamEndpoint": "<https://partner.com/streamEndpoint>" -- required from the partner
  },
  "allowedServices": [
    "meter_elec",
    "out_lvl_switch",
    "out_bin_switch"
  ] -- configured by Futurehome
}

Onboarding format

Constraints

All partners that want to receive data from Futurehome via HTTPS (with a few notable exceptions - i.e. Google) need to follow these onboarding guidelines