Validate schema definition
When developing a ConnectFor app for Planon IoT, solution developers must provide:
• The data points that will be measured by the connected device, such as temperature, humidity, or occupancy.
• A schema definition that describes the structure of the incoming sensor payload and maps the payload data to a format that Planon can understand and process.
| A payload is the JSON-formatted message sent by an external device or vendor system to Planon. It contains device information and the values collected by the device. |
Preconditions
Before validating a schema definition, ensure that:
• The ConnectFor app is active.
• Planon IoT is active.
If these preconditions are not met, the Validate schema definition action is unavailable.
Validating a schema definition
A Validate schema definition action is available in the IoT Gateway settings. This action allows solution developers to verify that the schema correctly interprets the JSON payload received from a vendor system.
1. Open IoT Gateway settings.
2. Select Validate schema definition.
3. In the validation dialog, paste the JSON payload received from the vendor system into the input field.
4. Select OK to start the validation.
The validation results are displayed and include:
• Whether the payload was parsed successfully.
• The number of data points defined in the schema.
• The number of data points detected in the payload.
Validation Results
Validation Successful If the number of data points defined in the schema matches the number of data points detected in the payload, the schema definition is correct and can successfully process the payload.
Validation Issues If the number of data points differs, the schema definition is incomplete or incorrect. The validation results indicate which elements of the schema require review or correction.
JSON Syntax Errors If the payload contains invalid JSON syntax, an error message is displayed indicating the exact location of the error in the JSON document. This enables you to quickly identify and correct the issue before revalidating the schema.