Send command (application + cloud platform layers)

To send a command the application will use cloud platform APIs and JWTs from the previous steps.

Different commands could have slightly different message formats.

For Sentience 1.0 there are two different use cases:

  1. "Native" Commands include: Point Read, Point Write, Multipoint Read, Multipoint Write: http://159.99.24.36:8082/?url=https://t01atqacloudapp.testqa-cbp.honeywell.com/api/swagger/public#!/SystemPoints
  2. System Command: http://159.99.24.36:8082/?url=https://t01atqacloudapp.testqa-cbp.honeywell.com/api/swagger/public#!/SystemCommand
 IMPORTANT: Only System Commands are supported with "secured execution" on the stations. 

System Command should have a particular format to be executed on the station:

Image

ACTION: Building and Sending a System Command

Use the Sentience System Command API with application token.

Form a correct SystemCommand using user token received from Application IP.

 NOTE: In generating the JSON payload to be included in a command to be sent through Sentience to a station, it is important to trim any whitespace that may exist before sending.  In addition to consuming additional bandwidth to send unimportant characters, it will cause the extra characters to be included in the station's logs, making observation of the log data more difficult.  Whitespace trimming is readily available with most JSON serialization libraries. 
 CAUTION: It is important to perform proper input validation of any data to be sent to the station through System Commands. Any field that may be received by your application from a user or another application, which is then inserted into the command to go to the station, should be assumed to potentially contain invalid or malicious content. It is important to understand that a user may enter anything into a freeform text field, even if your application is expecting to use it in a fixed purpose. Always validate the incoming data , and reject anything that is outside of expected bounds