Trend Log
The CMS data logging service is available to clients using the IAP/REST API. You can configure it using the Datapoint Properties widget and also access it through the BACnet client workstations using the SmartServer BACnet Server Trend Log object.
The BACnet Trend Log object is created for each datapoint instance index of the specified datapoint in BTM. The BTM file Trend Log column specifies whether the Trend Log object is needed.
The BACnet Trend Log object requires access to data log records where a data log contains historical data for a single datapoint. Each Trend Log object has its own data log with a unique data_log_id.
When a new Trend Log object is created, the CMS automatically enables monitoring and logging.
URI Definition
Method | URI and Fields |
---|---|
POST | /iap/log/data/{data_log_id}/devs/{device_id}/if/{block}/{block_index}/{datapoint_name} |
Creates the data log. | |
PUT | /iap/log/data/{data_log_id}/state {Enabled} |
Sets the current state to Enabled for the specified data log. | |
/iap/log/data/{data_log_id}/state {Disabled} | |
Sets the current state to Disabled for the specified data log. | |
iap/ldevTypes/{device_type}/if{block_name}/{block_index}/{datapoint_name}/dla/logInterval1 {value} | |
Updates the Log Interval value. You can only read (not modify) the values for Record Count and Total Record Count. | |
GET | /iap/log/data/{data_log_id}/state |
Gets the current state (Enabled or Disabled) of the data log. | |
/iap/devTypes/{deviceType}/if/{block_name}/{block_index}/{datapoint_name} /dla | |
Gets the poll interval of the specified datapoint. ExampleResponse 0: id: 714 protocol: lon deviceTypeName: 6kEvbMultiSensor fullDpName: Switch/0/nvoSwitch dpType: SNVT_switch dpTypeRef: SNVT_switch dpCategory: out monitored: true logged: true alarmed: false monitoringMethod: POLLED pollInterval: 60 publishInterval: null expectedUpdateInterval: null publishMinDeltaTime: null publishMinDeltaValue: null initialValue: null provisionInitialValue: null logInterval1: 60 logInterval2: 60 logInterval3: 60 expectedLogInterval1: 60 expectedLogInterval2: 60 expectedLogInterval3: 60 logRetention1: 14 logRetention2: 60 logRetention3: 730 logMultiply1: 1 logMultiply2: 1 logMultiply3: 1 logMinDeltaTime: null logMinDeltaValue: null alarmTypeName: null alarmDetails: null highWarning: null lowWarning: null highAlarm: null lowAlarm: null localizedHighWarning: null localizedLowWarning: null localizedHighAlarm: null localizedLowAlarm: null visible: true property: false profilePrincipalMember: nvoValue presets: null localization: null | |
iap/ldevTypes/{device_type}/if{block_name}/{block_index}/{datapoint_name}/dla/logInterval1 | |
Gets the Log Interval value. | |
/iap/log/data/{data_log_id}/totalCount | |
Gets the Total Count value. | |
/iap/log/data/{data_log_id}/count | |
Gets the Record Count value. | |
You can read the data log by position, by sequence number, or by time. %3D%3E represents => %3D%3C represents =< ExamplesBy position (positive count) GET /iap/log/data/{data_log_id}/records/+position%3D%3E{‘Reference Index’} &count=={‘Count’} By position (negative count) GET /iap/log/data/{data_log_id}/records/+position%3D%3C{‘Reference Index’’} &count=={‘Count’} By sequence number (positive count) GET /iap/log/data/{data_log_id}/records/+seqNum%3D%3E{‘Sequence Number’ }&count=={‘Count’} By sequence number (negative count) GET /iap/log/data/{data_log_id}/records/+seqNum%3D%3C{‘SequenceNumber’}&count=={‘Count’} By time (positive count) GET /iap/log/data/{data_log_id}/records/+timestamp%3D%3E{‘Reference Time’ }& count=={‘Count’} By time (negative count) GET /iap/log/data/{data_log_id}/records/+timestamp%3D%3C{‘Reference Time’)}& count=={‘Count’} |