Skip to main content

Device Sync Endpoint

Version V1


Partners can retrieve the full list of devices associated with a Molecule site or controller using the Device Sync API. This endpoint returns all downstream devices known to the Molecule controller, along with their types and identifiers.

This is typically used during onboarding, periodic reconciliation, or whenever the partner needs to refresh its internal device registry.


Endpoint

GET https://webhooks.moleculesystems.com/<API version>/api/gateway/<molecule_id>/devicesync

Replace <molecule_id> with the unique identifier for the Molecule site or controller.


Security Requirements

Partners must include their API key:

X-API-Key: <your-api-key>

Access to webhooks.moleculesystems.com is IP-restricted.


Response Payload Structure

The endpoint returns a JSON object containing:

  • The Molecule site/controller ID
  • A list of all devices associated with that site
  • Device type and subtype information

Top-Level Fields

FieldTypeDescription
molecule_idstringUnique identifier for the Molecule site or controller.
devicesarrayList of device objects.

Device Object Fields

FieldTypeDescription
device_idstringUnique identifier for the downstream device.
device_typeintegerType code representing the specific device class (see table below).
namestring (optional)Human-friendly device name.
capabilitiesarray (optional)Supported command or telemetry capabilities.

Device Sub-Type Codes

These values map to the internal Molecule controller device classifications:

Type CodeMeaning
0Unknown
1No control
10Inverter – Battery
11Inverter – PV
12Meter
13Thermostat
14On/Off Switch
30Zigbee Switch
31Zigbee Thermostat
40GPIO Input
41GPIO Output

Sample Response

{
"molecule_id": "fecd0001c031e7e8",
"devices": [
{
"device_id": "20000",
"device_type": 10,
"name": "Battery Inverter 1",
"capabilities": ["charge", "discharge", "telemetry"]
},
{
"device_id": "21000",
"device_type": 14,
"name": "Main Relay",
"capabilities": ["on", "off", "telemetry"]
},
{
"device_id": "22000",
"device_type": 12,
"name": "Grid Meter",
"capabilities": ["telemetry"]
}
]
}

Usage Notes

  • This endpoint is read-only.
  • Partners may call it at startup, periodically, or whenever device configuration changes are expected.
  • Device sub-types allow partners to understand what commands and telemetry each device supports.
  • The list may grow over time as new devices are added to the site.