Configure Points
Not every point that is discovered needs to push data to Facilio. Configure points command is used to select only the points for which the data should be pushed. For protocols that do not support discovery of points, configuring points means just adding points. The command just passes all the parameters about points and gets back all the configured points as response.
#
Command- Sample
- Schema
{ "agent": "agent-name", "controllerType": 1, "msgid": 1720, "command": 255, "controller": { "name": "controller-name-1" }, "points": [ { "name": "point-name-1" }, { "name": "point-name-2" } ], "timestamp": 1598440113417}
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "agent": { "type": "string", "description": "Name of the agent" }, "command": { "type": "integer", "description": "Command enum", "const": 255 }, "msgid": { "type": "integer", "description": "Message ID , will be used to send the ACKs" }, "controller": { "type": "object", "description":"This Object depends on the type of controller" "properties": { "name": { "type": "string", "description": "Name of the controller" } "required": [ "name" ] }, "points": { "type": "array", "items": [ { "type": "object", "description":"The point object depends on the controller type", "properties": { "name": { "type": "string", "description": "Name of the point" } }, "required": [ "name" ] } ] }, "controllerType": { "type": "integer", "description": "Controller Type enum", "const": 0 }, "publishType": { "type": "integer", "description": "Publish Type enum", "const": 4 } }, "required": [ "agent", "command", "msgid", "controllerType", "points", "publishType" ]}
#
Agent Response- Sample
- Schema
{ "controller": { "name": "controller-name-1" }, "agent": "rmzbangalore", "data": [ { "point-name-1": true, "point-name-2": true } ], "publishType": 1, "controllerType": 0}
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "agent": { "type": "string", "description": "Name of the agent" }, "controller": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the controller" } }, "required": [ "name" ] }, "data": { "type": "array", "items": [ { "type": "object", "description":"The data array should have only one item consisting for points names as keys and boolean as configure status" }, "required": [ "instanceNumber", "instanceType" ] } ] }, "controllerType": { "type": "integer", "description": "Controller Type enum", "const": 0 }, "publishType": { "type": "integer", "description": "Publish Type enum", "const": 1 } }, "required": [ "agent", "controller", "data", "controllerType", "publishType" ]}