Procedure for Uploading/Transmission of Continuous...

25
Procedure for Uploading/Transmission of Continuous Monitoring data of Emission (CEMS) Effluent (EQMS) and Ambient (AAQMS) monitoring system to Kerala State Pollution Control Board The following are the steps required to upload the data to KSPCB Central Server for Online Monitoring. Step 1 : Visit the KSPCB website and read all the documents with respect to Uploading/Transmission of Continuous Monitoring data of Emission (CEMS) Effluent (EQMS) and Ambient (AAQMS) monitoring system to Kerala State Pollution Control Board Step 2: Register the Industry details at the following URL for your Industry http://keralapcb.glensserver.com/KSPCB/registration.html In-case of any doubts or clarification required while filling the Industry details please call us at +91 9739103723. Ensure you have provided correct email id and contact details to receive the reply from KSPCB. Step 3 : KSPCB will provide you the connectivity credentials and other details for establishing connectivity. Use this credentials and work with any of the approved Open API Client Software providers of KSPCB Central Server Software to upload the data to KSPCB Central Server. Step 4: Ensure the data is uploading continuously to KSPCB Central Server and send email to KSPCB [email protected] about connectivity establishment and completion of this activity.

Transcript of Procedure for Uploading/Transmission of Continuous...

Page 1: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Procedure for UploadingTransmission of Continuous Monitoring data of

Emission (CEMS) Effluent (EQMS) and Ambient (AAQMS) monitoring system to

Kerala State Pollution Control Board

The following are the steps required to upload the data to KSPCB Central Server

for Online Monitoring

Step 1 Visit the KSPCB website and read all the documents with respect to

UploadingTransmission of Continuous Monitoring data of Emission (CEMS)

Effluent (EQMS) and Ambient (AAQMS) monitoring system to Kerala State

Pollution Control Board

Step 2 Register the Industry details at the following URL for your Industry

httpkeralapcbglensservercomKSPCBregistrationhtml

In-case of any doubts or clarification required while filling the Industry details

please call us at +91 9739103723 Ensure you have provided correct email id and

contact details to receive the reply from KSPCB

Step 3 KSPCB will provide you the connectivity credentials and other details for

establishing connectivity Use this credentials and work with any of the approved

Open API Client Software providers of KSPCB Central Server Software to upload

the data to KSPCB Central Server

Step 4 Ensure the data is uploading continuously to KSPCB Central Server and

send email to KSPCB kspcbglensgmailcom about connectivity establishment

and completion of this activity

Client Side Software Requirement

1 The data collection and transmission module should directly connect

to the installed analyser and fetch the data directly from the analyser

without any intermediatory software or conversions The

software should have no editing provision for alteringcorrecting the

data at the industry side

2 No data shall be accepted as an output from OPC of Server or DCS

or any other intermediate software at Industry side

3 The data collection and transmission module should encrypt the data

with unique client specific encryption key to ensure authentic data

transfer from the industry to the central server Only encrypted and

authenticated data shall be received by the Central Server Module

4 During internet connectivity failure or a communication issue with

the central server the data collection and transmission module

should store the encrypted data locally and retransmit when the

transmission can be restored Any such delayed transmission should

be identifieable at the regulator side using data quality codes

5 The data collection and transmission module should wait for

acknowledgement from the server and should retransmit the data if

no acknowledgement is received within the timeout period

6 The data collection and transmission module should support remote

analyser configuration The data collection and transmission module

should accept remote analyser configuration commands and update

the analyser configurations with the set value

7 Each measurement should be associated with the data quality code

infered while data collection and the data quality code should be

transmitted along with the data The data quality code should

indicate analyser failures analyser communication failures etc

8 Software should support reading analyser configuration and report

the configuration changes to the central server Any configuration

changes done at the site should have audit trial and reported to the

regulator for approval in the form of workflow

9 The data collection and transmission module should accept

commands for calibration (auto and manual) and able to perform

calibration of the analyser locally

10 The data collection and transmission module should be able to

collect the data directly from the analyser with a minimum scan

interval of 10 seconds

11 Data collection and transmission shall be minimum 15 min or other

mean average period selectable by user

12 The data collection and acquisition software should be able to

collect and encrypt the data locally on the industry site The data

should archive the data locally on the client machine for a period of

1 year

13 The data collection and transmission module should communicate

the status periodically to the central server even when no analyser

is connected or when analyser is faulty with appropriate data

quality code

14 The data collection and transmission module should auto-restart on

failure or machine reboots

15 The data collection and transmission module should be able to

transmit the data over BroadbandLANwifigprsgsm etc

16 The data collection and transmission module should support any

analyser make and model based on the configuration and protocol

specific extensions(analyser suppliers should be open enough

to share their analyser output protocol for easy data

transmission digitally)

17 The data collection and transmission module should be

customizable to support any specific protocol required

18 Data collection and transmission module should be able to support

protocol extension hooks and API

19 The Central Server should publish an open Application

Programming Interface (API) to support different clientside

software Any vendor supplying the data collection and

transmission module should comply to the API The clientside

software requirement shall be demonstarted at Kerala State

Pollution Control Board (KSPCB) Data transmitted only from such

demonstrated and proven client software will be accepted by the

Central Server Module

Central Server Software Open API August 5 2016

Open API Version No 30 dated 5th August 2016

Overview

This Open API document will be used for integrating Industry CEMSEQMSAAQMS

Data from Industry Monitoring Stations to Kerala State Pollution Control Boards Central

Server Software All communication between Central Server and acquisition clients (at

Industry site) are all managed through HTTP-based REST API All the API are authenticated

and should follow proper authentication models Any approved software client complying

with the specified open API can upload the data to the Central Server

Supported Operations in Version 30 The following are the operations supported in Version 30 of the Open API All clients should support full integration with all these operations

Real Time Data Upload Delayed Data Upload Remote Analyser Configuration Remote Analyser Calibration Analyser Diagnostic Fetch

Key Concepts

The following are the key concepts to be followed while working with the Open API

Site ID Unique Site ID identifying the specific industry

Monitoring ID Each Site has multiple monitoring stations Each monitoring station will be assigned a unique monitoring ID relative to the Site

Analyser ID Each analyser make and model will be assigned a unique Analyser ID

Parameter ID Each monitored parameter will have a common unified ID across all industries

Client Side Software Requirement

Each client software implementing the API should also comply with ldquoClient Side Software Requirement published by Kerala State Pollution Control Boardldquo

Key API Requirements

Each site client software has to collect the data from the analyser based on the poll

frequency defined Ideal frequency for data sampling from analyser is 10 second Data

transmission to the Central Server should be at 1 minute frequency The raw data and

Central Server Software Open API August 5 2016

linearized data should be transmitted to the server along with the data quality code and

captured timestamp

The captured data should be transmitted to the Server immediately after encrypting the

data with the digital private key This digital private key should be kept safe and shouldnrsquot be

tampered with or disclosed to others The Client Software should provide a mechanism for

using industry specific digital signature to establish the data connectivity with Central Server

Software Industry should procure the Digital Signature as soon as possible provide the

details of the Digital Signature and use that for data encryption to ensure authentic tamper

proof data transmission

The transmitted data should be encrypted zipped data in ISO-7168 All API request data

transfer should be using a REST Service over HTTP protocol

The client site software should wait for successful upload and also read subsequent

instructions (Remote calibration Configuration update Diagnostics information etc) from

the Central Server Software

On receiving instructions on Remote calibrations or Configuration update the site client

software should invoke the Remote Calibration or Configuration update services to

download the corresponding configurations

In-case of any communication failure or any delayed data transmitted beyond a period 15

minutes site software should store the data the locally and upload to the Delayed Data

Upload URL and not to the Real Time upload URL This is to ensure that the delayed data is

captured separately at the Central Server and can be tracked for any integrity issues

All client should transmit data captured directly from the analyser from the site location Any

data transmission from different location will be rejected by the server

All the requests from the client to the server should be authenticated requests only Any

unauthenticated requests will be discarded or not processed

The details of authentication will be provided to Industry once the registration process for

the industry is completed

Basic Organization of API

httpltipaddressportgtGLensServer

Resource Description Route Request type

Data upload

This is for uploading data to the central server from the client Any authenticated client with proper credentials can upload data to the server using this api Only real time data (delay of max 2 min) will be accepted through realtimeupload URL and any delayed data should be uploaded using delayedUpload URL

realtimeUpload delayedUpload

POST

Configuration Download

This is for downloading the configuration from the server Any approved client software can download the configuration from the server using this API

getConfig POST

Central Server Software Open API August 5 2016

Fetch Client Configuration

When the ConfigurationUpdateFlag is set to ldquoTruerdquo in the response of the Realtime Upload or Delayed Upload client needs to provide the current configurations set at the Analyser

uploadConfig POST

Acknowledge Configuration

Download

When the ConfigurationDownloadFlag flag is set to ldquoTruerdquo in the response of the Realtime Upload or Delayed Upload the client software should use the getConfig URL to download the configuration from the Central Server Once the configuration is updated in the Analyser the client should update the Central Server with the status of the configuration update Till the status is updated to success client will be asked continuously to update the configuration by setting the ConfigurationDownload flag to ldquoTruerdquo

completedConfig POST

Calibration download service

When the RemoteCalibrationUpdateFlag is set to ldquoTruerdquo the client software should using this URL for downloading the configuration required for calibration The remote calibration data and sequence should be updated to the Calibrator locally

getcalibrationconfig POST

Calibration Update

Acknowledgement

After successful download of the Remote Calibration Configuration and updating the local calibrator or analyser who will be performing the calibration the client software should acknowledge the status of calibration status using this URL

updatecalibrationconfig POST

Diagnostic Upload service

When the DiagnosticUpdateFlag is set to ldquoTruerdquo the client software should using this URL for uploading the diagnostic information including any internal state of the analyser as per the analyser make and model Each Client should send the diagnostic upload every 15 minutes even if the diagnostic flag is not set to ldquoTruerdquo

uploadDiagnosticInfo POST

Central Server Software Open API August 5 2016

Authentication Mechanism for the API

Each API request header should have the following information

A Timestamp

B Authorization Encrypted data from the site which has the authentication digest Each request

should send authentication digest with the following encrypted data

site_key Unique Site Key provided by the Kerala State Pollution Board for each site for

authentication

software_version_id Software version set by the Central Server

time_stamp_data Timestamp when the data was encrypted

The authentication digest is decrypted using the Site Private Key The timestamp is ensured to be not

more than 15 minutes (configurable) from the current timestamp The software version is verified against the

registered software version with the Central Server Software This ensures the data is encrypted just before

transmission and the client program have access to Site Private Key and the current registered software

version The registered software version will be updated from Central Server Software time to time and hence

is not depend on client software version

Data Upload

The standard response format is described below Any approved client software with proper

credentials can send data to the central server using this API

Data Upload Format The API supports ISO-7168 data format for data upload The data upload follows an ISO-

7168 format zip file The zip file upload to the server will be multipartform-data format The data should be sent in

zip format The uploaded zip file will have two files namely 1 Data File 2 Metadata File The Data file should be encrypted using the Site Private Key The zip file should be uploaded to the server with proper authentication using the key Else the response with HTTP 401 with ldquoAuthentication Failure will be returned The metadata file will specify the file formats (ISO-7168) etc and the data file should comply

with the same

However all files has to follow the basic guidelines

1 Data should encrypted

2 File should zipped

3 Metadata file should provide the file specification and format

4 Header should have the encryption digest for decryption of the data

Request Details Upload data to Central Server This method uploads data to the server The requests will be authenticated and hence should have the authentication header as described in section ldquoAuthentication Mechanism for the APIrdquo

httpipaddressportKSPCBGLensServerrealtimeUpload OR

httpipaddressport KSPCBGLensServerdelayedUpload

Path realtimeUpload or delayedUpload

Central Server Software Open API August 5 2016

Method POST Parameters The file to be uploaded should be send as the parameter

Returns Response JSON which contains the status as either success or failure

Note realtimeUpload URL will take only data that is captured from the analyser during the last

poll frequency defined by regulator Anything delayed should be uploaded to delayedUpload URL

If the upload is success the following response will be obtained

status Success

serverConfigLastUpdatedTime lttimegt

ConfigurationDownloadFlag ltFlaggt

ConfigurationUpdateFlag ltFlaggt

RemoteCalibrationUpdateFlag ltFlaggt

DiagnosticUpdateFlag ltFlaggt

statusMessage file uploaded successfully

Where the lttimegt is the last updated time of server configurations and ltFlaggt is a Boolean value

depending upon whether the site configuration is updated or not

Flag can have values ldquoTruerdquo or ldquoFalserdquo

Eg

status Success

serverConfigLastUpdatedTime 2015-02-24T132119Z

ConfigurationDownloadFlag True

ConfigurationUpdateFlag False

RemoteCalibrationUpdateFlag True

DiagnosticUpdateFlag False

statusMessage file uploaded successfully

If the upload is a failure the following response will be obtained

Central Server Software Open API August 5 2016

status Failed

statusMessage No files were uploaded

Configuration Download from server

The configuration download request helps the client software understand the format and

parameters which should be transferred to the server This request enables the client software to

download the entire configuration for the monitoring station This configuration should be

synchronized with the analyser

This method download the configuration from the server

httpipaddressport KSPCBGLensServergetConfig

Path getConfig

Method POST

Parameters The site id will be passed as the parameter

Returns The response json contains the configuration in case of success or failure message

in case of failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

If the configuration download request is success the following response will come Any approved client software with proper credentials can download the configurations from the central server using this api Software with improper credentials will be blocked The request should have the valid authenticated headers

Request Format The request for site configuration update will be in the following format

siteId ldquosite_108rdquo

monitoringid ldquoETP_PLANTrdquo

Response Format

status Success

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

Central Server Software Open API August 5 2016

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

If the configuration request status is failed the response will be

status Failed

Fetch Configuration From Client This method will be invoked by the client to upload the current configuration in the analyser to the

Central Server Software when the ConfigurationUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadConfig

Path uploadConfig

Method POST

Parameter The configuration of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure

Request body

Command ConfigFetch

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

Central Server Software Open API August 5 2016

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Response for the Request will be Success status

status Success

configUpdateStatus Received Site configuration successfully

Failure status

status Failed

configUpdateStatus Failed to receive Site Configuration Please

retry

Configuration Update Acknowledgement

Whenever the site client software has received the configuration from the Central Server

Software and successfully update the site configuration the client software should provide

acknowledgement to the Central Server to ensure that server doesnrsquot request for

configuration update again

This method gives the status of calibration

httpipaddressport KSPCBGLensServercompletedConfig

Path completedConfig

Method POST

Central Server Software Open API August 5 2016

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoConfigUpdatedrdquo ldquoTruerdquo

Response to Configuration acknowledgement received by client software

Success Response

status Success

calibrationUpdateStatus Server and Site Configuration Synchronized

Failure response

status Failed

calibrationUpdateStatus Failed to update Configuration status

Remote Calibration Service This method download the configuration required for calibration

httpipaddressportGLensServergetCalibrationConfig

Path getCalibrationConfig

Method POST

Parameter The site id monitoring id CalibrationType will be passed as the parameter

CalibrationType will be ldquoscheduledrdquo when a schedule is submitted to client or ldquoimmediaterdquo if an

immediate request for calibration is required

Returns The response json contains the configuration required for calibration

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 2: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Client Side Software Requirement

1 The data collection and transmission module should directly connect

to the installed analyser and fetch the data directly from the analyser

without any intermediatory software or conversions The

software should have no editing provision for alteringcorrecting the

data at the industry side

2 No data shall be accepted as an output from OPC of Server or DCS

or any other intermediate software at Industry side

3 The data collection and transmission module should encrypt the data

with unique client specific encryption key to ensure authentic data

transfer from the industry to the central server Only encrypted and

authenticated data shall be received by the Central Server Module

4 During internet connectivity failure or a communication issue with

the central server the data collection and transmission module

should store the encrypted data locally and retransmit when the

transmission can be restored Any such delayed transmission should

be identifieable at the regulator side using data quality codes

5 The data collection and transmission module should wait for

acknowledgement from the server and should retransmit the data if

no acknowledgement is received within the timeout period

6 The data collection and transmission module should support remote

analyser configuration The data collection and transmission module

should accept remote analyser configuration commands and update

the analyser configurations with the set value

7 Each measurement should be associated with the data quality code

infered while data collection and the data quality code should be

transmitted along with the data The data quality code should

indicate analyser failures analyser communication failures etc

8 Software should support reading analyser configuration and report

the configuration changes to the central server Any configuration

changes done at the site should have audit trial and reported to the

regulator for approval in the form of workflow

9 The data collection and transmission module should accept

commands for calibration (auto and manual) and able to perform

calibration of the analyser locally

10 The data collection and transmission module should be able to

collect the data directly from the analyser with a minimum scan

interval of 10 seconds

11 Data collection and transmission shall be minimum 15 min or other

mean average period selectable by user

12 The data collection and acquisition software should be able to

collect and encrypt the data locally on the industry site The data

should archive the data locally on the client machine for a period of

1 year

13 The data collection and transmission module should communicate

the status periodically to the central server even when no analyser

is connected or when analyser is faulty with appropriate data

quality code

14 The data collection and transmission module should auto-restart on

failure or machine reboots

15 The data collection and transmission module should be able to

transmit the data over BroadbandLANwifigprsgsm etc

16 The data collection and transmission module should support any

analyser make and model based on the configuration and protocol

specific extensions(analyser suppliers should be open enough

to share their analyser output protocol for easy data

transmission digitally)

17 The data collection and transmission module should be

customizable to support any specific protocol required

18 Data collection and transmission module should be able to support

protocol extension hooks and API

19 The Central Server should publish an open Application

Programming Interface (API) to support different clientside

software Any vendor supplying the data collection and

transmission module should comply to the API The clientside

software requirement shall be demonstarted at Kerala State

Pollution Control Board (KSPCB) Data transmitted only from such

demonstrated and proven client software will be accepted by the

Central Server Module

Central Server Software Open API August 5 2016

Open API Version No 30 dated 5th August 2016

Overview

This Open API document will be used for integrating Industry CEMSEQMSAAQMS

Data from Industry Monitoring Stations to Kerala State Pollution Control Boards Central

Server Software All communication between Central Server and acquisition clients (at

Industry site) are all managed through HTTP-based REST API All the API are authenticated

and should follow proper authentication models Any approved software client complying

with the specified open API can upload the data to the Central Server

Supported Operations in Version 30 The following are the operations supported in Version 30 of the Open API All clients should support full integration with all these operations

Real Time Data Upload Delayed Data Upload Remote Analyser Configuration Remote Analyser Calibration Analyser Diagnostic Fetch

Key Concepts

The following are the key concepts to be followed while working with the Open API

Site ID Unique Site ID identifying the specific industry

Monitoring ID Each Site has multiple monitoring stations Each monitoring station will be assigned a unique monitoring ID relative to the Site

Analyser ID Each analyser make and model will be assigned a unique Analyser ID

Parameter ID Each monitored parameter will have a common unified ID across all industries

Client Side Software Requirement

Each client software implementing the API should also comply with ldquoClient Side Software Requirement published by Kerala State Pollution Control Boardldquo

Key API Requirements

Each site client software has to collect the data from the analyser based on the poll

frequency defined Ideal frequency for data sampling from analyser is 10 second Data

transmission to the Central Server should be at 1 minute frequency The raw data and

Central Server Software Open API August 5 2016

linearized data should be transmitted to the server along with the data quality code and

captured timestamp

The captured data should be transmitted to the Server immediately after encrypting the

data with the digital private key This digital private key should be kept safe and shouldnrsquot be

tampered with or disclosed to others The Client Software should provide a mechanism for

using industry specific digital signature to establish the data connectivity with Central Server

Software Industry should procure the Digital Signature as soon as possible provide the

details of the Digital Signature and use that for data encryption to ensure authentic tamper

proof data transmission

The transmitted data should be encrypted zipped data in ISO-7168 All API request data

transfer should be using a REST Service over HTTP protocol

The client site software should wait for successful upload and also read subsequent

instructions (Remote calibration Configuration update Diagnostics information etc) from

the Central Server Software

On receiving instructions on Remote calibrations or Configuration update the site client

software should invoke the Remote Calibration or Configuration update services to

download the corresponding configurations

In-case of any communication failure or any delayed data transmitted beyond a period 15

minutes site software should store the data the locally and upload to the Delayed Data

Upload URL and not to the Real Time upload URL This is to ensure that the delayed data is

captured separately at the Central Server and can be tracked for any integrity issues

All client should transmit data captured directly from the analyser from the site location Any

data transmission from different location will be rejected by the server

All the requests from the client to the server should be authenticated requests only Any

unauthenticated requests will be discarded or not processed

The details of authentication will be provided to Industry once the registration process for

the industry is completed

Basic Organization of API

httpltipaddressportgtGLensServer

Resource Description Route Request type

Data upload

This is for uploading data to the central server from the client Any authenticated client with proper credentials can upload data to the server using this api Only real time data (delay of max 2 min) will be accepted through realtimeupload URL and any delayed data should be uploaded using delayedUpload URL

realtimeUpload delayedUpload

POST

Configuration Download

This is for downloading the configuration from the server Any approved client software can download the configuration from the server using this API

getConfig POST

Central Server Software Open API August 5 2016

Fetch Client Configuration

When the ConfigurationUpdateFlag is set to ldquoTruerdquo in the response of the Realtime Upload or Delayed Upload client needs to provide the current configurations set at the Analyser

uploadConfig POST

Acknowledge Configuration

Download

When the ConfigurationDownloadFlag flag is set to ldquoTruerdquo in the response of the Realtime Upload or Delayed Upload the client software should use the getConfig URL to download the configuration from the Central Server Once the configuration is updated in the Analyser the client should update the Central Server with the status of the configuration update Till the status is updated to success client will be asked continuously to update the configuration by setting the ConfigurationDownload flag to ldquoTruerdquo

completedConfig POST

Calibration download service

When the RemoteCalibrationUpdateFlag is set to ldquoTruerdquo the client software should using this URL for downloading the configuration required for calibration The remote calibration data and sequence should be updated to the Calibrator locally

getcalibrationconfig POST

Calibration Update

Acknowledgement

After successful download of the Remote Calibration Configuration and updating the local calibrator or analyser who will be performing the calibration the client software should acknowledge the status of calibration status using this URL

updatecalibrationconfig POST

Diagnostic Upload service

When the DiagnosticUpdateFlag is set to ldquoTruerdquo the client software should using this URL for uploading the diagnostic information including any internal state of the analyser as per the analyser make and model Each Client should send the diagnostic upload every 15 minutes even if the diagnostic flag is not set to ldquoTruerdquo

uploadDiagnosticInfo POST

Central Server Software Open API August 5 2016

Authentication Mechanism for the API

Each API request header should have the following information

A Timestamp

B Authorization Encrypted data from the site which has the authentication digest Each request

should send authentication digest with the following encrypted data

site_key Unique Site Key provided by the Kerala State Pollution Board for each site for

authentication

software_version_id Software version set by the Central Server

time_stamp_data Timestamp when the data was encrypted

The authentication digest is decrypted using the Site Private Key The timestamp is ensured to be not

more than 15 minutes (configurable) from the current timestamp The software version is verified against the

registered software version with the Central Server Software This ensures the data is encrypted just before

transmission and the client program have access to Site Private Key and the current registered software

version The registered software version will be updated from Central Server Software time to time and hence

is not depend on client software version

Data Upload

The standard response format is described below Any approved client software with proper

credentials can send data to the central server using this API

Data Upload Format The API supports ISO-7168 data format for data upload The data upload follows an ISO-

7168 format zip file The zip file upload to the server will be multipartform-data format The data should be sent in

zip format The uploaded zip file will have two files namely 1 Data File 2 Metadata File The Data file should be encrypted using the Site Private Key The zip file should be uploaded to the server with proper authentication using the key Else the response with HTTP 401 with ldquoAuthentication Failure will be returned The metadata file will specify the file formats (ISO-7168) etc and the data file should comply

with the same

However all files has to follow the basic guidelines

1 Data should encrypted

2 File should zipped

3 Metadata file should provide the file specification and format

4 Header should have the encryption digest for decryption of the data

Request Details Upload data to Central Server This method uploads data to the server The requests will be authenticated and hence should have the authentication header as described in section ldquoAuthentication Mechanism for the APIrdquo

httpipaddressportKSPCBGLensServerrealtimeUpload OR

httpipaddressport KSPCBGLensServerdelayedUpload

Path realtimeUpload or delayedUpload

Central Server Software Open API August 5 2016

Method POST Parameters The file to be uploaded should be send as the parameter

Returns Response JSON which contains the status as either success or failure

Note realtimeUpload URL will take only data that is captured from the analyser during the last

poll frequency defined by regulator Anything delayed should be uploaded to delayedUpload URL

If the upload is success the following response will be obtained

status Success

serverConfigLastUpdatedTime lttimegt

ConfigurationDownloadFlag ltFlaggt

ConfigurationUpdateFlag ltFlaggt

RemoteCalibrationUpdateFlag ltFlaggt

DiagnosticUpdateFlag ltFlaggt

statusMessage file uploaded successfully

Where the lttimegt is the last updated time of server configurations and ltFlaggt is a Boolean value

depending upon whether the site configuration is updated or not

Flag can have values ldquoTruerdquo or ldquoFalserdquo

Eg

status Success

serverConfigLastUpdatedTime 2015-02-24T132119Z

ConfigurationDownloadFlag True

ConfigurationUpdateFlag False

RemoteCalibrationUpdateFlag True

DiagnosticUpdateFlag False

statusMessage file uploaded successfully

If the upload is a failure the following response will be obtained

Central Server Software Open API August 5 2016

status Failed

statusMessage No files were uploaded

Configuration Download from server

The configuration download request helps the client software understand the format and

parameters which should be transferred to the server This request enables the client software to

download the entire configuration for the monitoring station This configuration should be

synchronized with the analyser

This method download the configuration from the server

httpipaddressport KSPCBGLensServergetConfig

Path getConfig

Method POST

Parameters The site id will be passed as the parameter

Returns The response json contains the configuration in case of success or failure message

in case of failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

If the configuration download request is success the following response will come Any approved client software with proper credentials can download the configurations from the central server using this api Software with improper credentials will be blocked The request should have the valid authenticated headers

Request Format The request for site configuration update will be in the following format

siteId ldquosite_108rdquo

monitoringid ldquoETP_PLANTrdquo

Response Format

status Success

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

Central Server Software Open API August 5 2016

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

If the configuration request status is failed the response will be

status Failed

Fetch Configuration From Client This method will be invoked by the client to upload the current configuration in the analyser to the

Central Server Software when the ConfigurationUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadConfig

Path uploadConfig

Method POST

Parameter The configuration of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure

Request body

Command ConfigFetch

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

Central Server Software Open API August 5 2016

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Response for the Request will be Success status

status Success

configUpdateStatus Received Site configuration successfully

Failure status

status Failed

configUpdateStatus Failed to receive Site Configuration Please

retry

Configuration Update Acknowledgement

Whenever the site client software has received the configuration from the Central Server

Software and successfully update the site configuration the client software should provide

acknowledgement to the Central Server to ensure that server doesnrsquot request for

configuration update again

This method gives the status of calibration

httpipaddressport KSPCBGLensServercompletedConfig

Path completedConfig

Method POST

Central Server Software Open API August 5 2016

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoConfigUpdatedrdquo ldquoTruerdquo

Response to Configuration acknowledgement received by client software

Success Response

status Success

calibrationUpdateStatus Server and Site Configuration Synchronized

Failure response

status Failed

calibrationUpdateStatus Failed to update Configuration status

Remote Calibration Service This method download the configuration required for calibration

httpipaddressportGLensServergetCalibrationConfig

Path getCalibrationConfig

Method POST

Parameter The site id monitoring id CalibrationType will be passed as the parameter

CalibrationType will be ldquoscheduledrdquo when a schedule is submitted to client or ldquoimmediaterdquo if an

immediate request for calibration is required

Returns The response json contains the configuration required for calibration

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 3: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

transmitted along with the data The data quality code should

indicate analyser failures analyser communication failures etc

8 Software should support reading analyser configuration and report

the configuration changes to the central server Any configuration

changes done at the site should have audit trial and reported to the

regulator for approval in the form of workflow

9 The data collection and transmission module should accept

commands for calibration (auto and manual) and able to perform

calibration of the analyser locally

10 The data collection and transmission module should be able to

collect the data directly from the analyser with a minimum scan

interval of 10 seconds

11 Data collection and transmission shall be minimum 15 min or other

mean average period selectable by user

12 The data collection and acquisition software should be able to

collect and encrypt the data locally on the industry site The data

should archive the data locally on the client machine for a period of

1 year

13 The data collection and transmission module should communicate

the status periodically to the central server even when no analyser

is connected or when analyser is faulty with appropriate data

quality code

14 The data collection and transmission module should auto-restart on

failure or machine reboots

15 The data collection and transmission module should be able to

transmit the data over BroadbandLANwifigprsgsm etc

16 The data collection and transmission module should support any

analyser make and model based on the configuration and protocol

specific extensions(analyser suppliers should be open enough

to share their analyser output protocol for easy data

transmission digitally)

17 The data collection and transmission module should be

customizable to support any specific protocol required

18 Data collection and transmission module should be able to support

protocol extension hooks and API

19 The Central Server should publish an open Application

Programming Interface (API) to support different clientside

software Any vendor supplying the data collection and

transmission module should comply to the API The clientside

software requirement shall be demonstarted at Kerala State

Pollution Control Board (KSPCB) Data transmitted only from such

demonstrated and proven client software will be accepted by the

Central Server Module

Central Server Software Open API August 5 2016

Open API Version No 30 dated 5th August 2016

Overview

This Open API document will be used for integrating Industry CEMSEQMSAAQMS

Data from Industry Monitoring Stations to Kerala State Pollution Control Boards Central

Server Software All communication between Central Server and acquisition clients (at

Industry site) are all managed through HTTP-based REST API All the API are authenticated

and should follow proper authentication models Any approved software client complying

with the specified open API can upload the data to the Central Server

Supported Operations in Version 30 The following are the operations supported in Version 30 of the Open API All clients should support full integration with all these operations

Real Time Data Upload Delayed Data Upload Remote Analyser Configuration Remote Analyser Calibration Analyser Diagnostic Fetch

Key Concepts

The following are the key concepts to be followed while working with the Open API

Site ID Unique Site ID identifying the specific industry

Monitoring ID Each Site has multiple monitoring stations Each monitoring station will be assigned a unique monitoring ID relative to the Site

Analyser ID Each analyser make and model will be assigned a unique Analyser ID

Parameter ID Each monitored parameter will have a common unified ID across all industries

Client Side Software Requirement

Each client software implementing the API should also comply with ldquoClient Side Software Requirement published by Kerala State Pollution Control Boardldquo

Key API Requirements

Each site client software has to collect the data from the analyser based on the poll

frequency defined Ideal frequency for data sampling from analyser is 10 second Data

transmission to the Central Server should be at 1 minute frequency The raw data and

Central Server Software Open API August 5 2016

linearized data should be transmitted to the server along with the data quality code and

captured timestamp

The captured data should be transmitted to the Server immediately after encrypting the

data with the digital private key This digital private key should be kept safe and shouldnrsquot be

tampered with or disclosed to others The Client Software should provide a mechanism for

using industry specific digital signature to establish the data connectivity with Central Server

Software Industry should procure the Digital Signature as soon as possible provide the

details of the Digital Signature and use that for data encryption to ensure authentic tamper

proof data transmission

The transmitted data should be encrypted zipped data in ISO-7168 All API request data

transfer should be using a REST Service over HTTP protocol

The client site software should wait for successful upload and also read subsequent

instructions (Remote calibration Configuration update Diagnostics information etc) from

the Central Server Software

On receiving instructions on Remote calibrations or Configuration update the site client

software should invoke the Remote Calibration or Configuration update services to

download the corresponding configurations

In-case of any communication failure or any delayed data transmitted beyond a period 15

minutes site software should store the data the locally and upload to the Delayed Data

Upload URL and not to the Real Time upload URL This is to ensure that the delayed data is

captured separately at the Central Server and can be tracked for any integrity issues

All client should transmit data captured directly from the analyser from the site location Any

data transmission from different location will be rejected by the server

All the requests from the client to the server should be authenticated requests only Any

unauthenticated requests will be discarded or not processed

The details of authentication will be provided to Industry once the registration process for

the industry is completed

Basic Organization of API

httpltipaddressportgtGLensServer

Resource Description Route Request type

Data upload

This is for uploading data to the central server from the client Any authenticated client with proper credentials can upload data to the server using this api Only real time data (delay of max 2 min) will be accepted through realtimeupload URL and any delayed data should be uploaded using delayedUpload URL

realtimeUpload delayedUpload

POST

Configuration Download

This is for downloading the configuration from the server Any approved client software can download the configuration from the server using this API

getConfig POST

Central Server Software Open API August 5 2016

Fetch Client Configuration

When the ConfigurationUpdateFlag is set to ldquoTruerdquo in the response of the Realtime Upload or Delayed Upload client needs to provide the current configurations set at the Analyser

uploadConfig POST

Acknowledge Configuration

Download

When the ConfigurationDownloadFlag flag is set to ldquoTruerdquo in the response of the Realtime Upload or Delayed Upload the client software should use the getConfig URL to download the configuration from the Central Server Once the configuration is updated in the Analyser the client should update the Central Server with the status of the configuration update Till the status is updated to success client will be asked continuously to update the configuration by setting the ConfigurationDownload flag to ldquoTruerdquo

completedConfig POST

Calibration download service

When the RemoteCalibrationUpdateFlag is set to ldquoTruerdquo the client software should using this URL for downloading the configuration required for calibration The remote calibration data and sequence should be updated to the Calibrator locally

getcalibrationconfig POST

Calibration Update

Acknowledgement

After successful download of the Remote Calibration Configuration and updating the local calibrator or analyser who will be performing the calibration the client software should acknowledge the status of calibration status using this URL

updatecalibrationconfig POST

Diagnostic Upload service

When the DiagnosticUpdateFlag is set to ldquoTruerdquo the client software should using this URL for uploading the diagnostic information including any internal state of the analyser as per the analyser make and model Each Client should send the diagnostic upload every 15 minutes even if the diagnostic flag is not set to ldquoTruerdquo

uploadDiagnosticInfo POST

Central Server Software Open API August 5 2016

Authentication Mechanism for the API

Each API request header should have the following information

A Timestamp

B Authorization Encrypted data from the site which has the authentication digest Each request

should send authentication digest with the following encrypted data

site_key Unique Site Key provided by the Kerala State Pollution Board for each site for

authentication

software_version_id Software version set by the Central Server

time_stamp_data Timestamp when the data was encrypted

The authentication digest is decrypted using the Site Private Key The timestamp is ensured to be not

more than 15 minutes (configurable) from the current timestamp The software version is verified against the

registered software version with the Central Server Software This ensures the data is encrypted just before

transmission and the client program have access to Site Private Key and the current registered software

version The registered software version will be updated from Central Server Software time to time and hence

is not depend on client software version

Data Upload

The standard response format is described below Any approved client software with proper

credentials can send data to the central server using this API

Data Upload Format The API supports ISO-7168 data format for data upload The data upload follows an ISO-

7168 format zip file The zip file upload to the server will be multipartform-data format The data should be sent in

zip format The uploaded zip file will have two files namely 1 Data File 2 Metadata File The Data file should be encrypted using the Site Private Key The zip file should be uploaded to the server with proper authentication using the key Else the response with HTTP 401 with ldquoAuthentication Failure will be returned The metadata file will specify the file formats (ISO-7168) etc and the data file should comply

with the same

However all files has to follow the basic guidelines

1 Data should encrypted

2 File should zipped

3 Metadata file should provide the file specification and format

4 Header should have the encryption digest for decryption of the data

Request Details Upload data to Central Server This method uploads data to the server The requests will be authenticated and hence should have the authentication header as described in section ldquoAuthentication Mechanism for the APIrdquo

httpipaddressportKSPCBGLensServerrealtimeUpload OR

httpipaddressport KSPCBGLensServerdelayedUpload

Path realtimeUpload or delayedUpload

Central Server Software Open API August 5 2016

Method POST Parameters The file to be uploaded should be send as the parameter

Returns Response JSON which contains the status as either success or failure

Note realtimeUpload URL will take only data that is captured from the analyser during the last

poll frequency defined by regulator Anything delayed should be uploaded to delayedUpload URL

If the upload is success the following response will be obtained

status Success

serverConfigLastUpdatedTime lttimegt

ConfigurationDownloadFlag ltFlaggt

ConfigurationUpdateFlag ltFlaggt

RemoteCalibrationUpdateFlag ltFlaggt

DiagnosticUpdateFlag ltFlaggt

statusMessage file uploaded successfully

Where the lttimegt is the last updated time of server configurations and ltFlaggt is a Boolean value

depending upon whether the site configuration is updated or not

Flag can have values ldquoTruerdquo or ldquoFalserdquo

Eg

status Success

serverConfigLastUpdatedTime 2015-02-24T132119Z

ConfigurationDownloadFlag True

ConfigurationUpdateFlag False

RemoteCalibrationUpdateFlag True

DiagnosticUpdateFlag False

statusMessage file uploaded successfully

If the upload is a failure the following response will be obtained

Central Server Software Open API August 5 2016

status Failed

statusMessage No files were uploaded

Configuration Download from server

The configuration download request helps the client software understand the format and

parameters which should be transferred to the server This request enables the client software to

download the entire configuration for the monitoring station This configuration should be

synchronized with the analyser

This method download the configuration from the server

httpipaddressport KSPCBGLensServergetConfig

Path getConfig

Method POST

Parameters The site id will be passed as the parameter

Returns The response json contains the configuration in case of success or failure message

in case of failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

If the configuration download request is success the following response will come Any approved client software with proper credentials can download the configurations from the central server using this api Software with improper credentials will be blocked The request should have the valid authenticated headers

Request Format The request for site configuration update will be in the following format

siteId ldquosite_108rdquo

monitoringid ldquoETP_PLANTrdquo

Response Format

status Success

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

Central Server Software Open API August 5 2016

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

If the configuration request status is failed the response will be

status Failed

Fetch Configuration From Client This method will be invoked by the client to upload the current configuration in the analyser to the

Central Server Software when the ConfigurationUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadConfig

Path uploadConfig

Method POST

Parameter The configuration of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure

Request body

Command ConfigFetch

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

Central Server Software Open API August 5 2016

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Response for the Request will be Success status

status Success

configUpdateStatus Received Site configuration successfully

Failure status

status Failed

configUpdateStatus Failed to receive Site Configuration Please

retry

Configuration Update Acknowledgement

Whenever the site client software has received the configuration from the Central Server

Software and successfully update the site configuration the client software should provide

acknowledgement to the Central Server to ensure that server doesnrsquot request for

configuration update again

This method gives the status of calibration

httpipaddressport KSPCBGLensServercompletedConfig

Path completedConfig

Method POST

Central Server Software Open API August 5 2016

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoConfigUpdatedrdquo ldquoTruerdquo

Response to Configuration acknowledgement received by client software

Success Response

status Success

calibrationUpdateStatus Server and Site Configuration Synchronized

Failure response

status Failed

calibrationUpdateStatus Failed to update Configuration status

Remote Calibration Service This method download the configuration required for calibration

httpipaddressportGLensServergetCalibrationConfig

Path getCalibrationConfig

Method POST

Parameter The site id monitoring id CalibrationType will be passed as the parameter

CalibrationType will be ldquoscheduledrdquo when a schedule is submitted to client or ldquoimmediaterdquo if an

immediate request for calibration is required

Returns The response json contains the configuration required for calibration

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 4: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

16 The data collection and transmission module should support any

analyser make and model based on the configuration and protocol

specific extensions(analyser suppliers should be open enough

to share their analyser output protocol for easy data

transmission digitally)

17 The data collection and transmission module should be

customizable to support any specific protocol required

18 Data collection and transmission module should be able to support

protocol extension hooks and API

19 The Central Server should publish an open Application

Programming Interface (API) to support different clientside

software Any vendor supplying the data collection and

transmission module should comply to the API The clientside

software requirement shall be demonstarted at Kerala State

Pollution Control Board (KSPCB) Data transmitted only from such

demonstrated and proven client software will be accepted by the

Central Server Module

Central Server Software Open API August 5 2016

Open API Version No 30 dated 5th August 2016

Overview

This Open API document will be used for integrating Industry CEMSEQMSAAQMS

Data from Industry Monitoring Stations to Kerala State Pollution Control Boards Central

Server Software All communication between Central Server and acquisition clients (at

Industry site) are all managed through HTTP-based REST API All the API are authenticated

and should follow proper authentication models Any approved software client complying

with the specified open API can upload the data to the Central Server

Supported Operations in Version 30 The following are the operations supported in Version 30 of the Open API All clients should support full integration with all these operations

Real Time Data Upload Delayed Data Upload Remote Analyser Configuration Remote Analyser Calibration Analyser Diagnostic Fetch

Key Concepts

The following are the key concepts to be followed while working with the Open API

Site ID Unique Site ID identifying the specific industry

Monitoring ID Each Site has multiple monitoring stations Each monitoring station will be assigned a unique monitoring ID relative to the Site

Analyser ID Each analyser make and model will be assigned a unique Analyser ID

Parameter ID Each monitored parameter will have a common unified ID across all industries

Client Side Software Requirement

Each client software implementing the API should also comply with ldquoClient Side Software Requirement published by Kerala State Pollution Control Boardldquo

Key API Requirements

Each site client software has to collect the data from the analyser based on the poll

frequency defined Ideal frequency for data sampling from analyser is 10 second Data

transmission to the Central Server should be at 1 minute frequency The raw data and

Central Server Software Open API August 5 2016

linearized data should be transmitted to the server along with the data quality code and

captured timestamp

The captured data should be transmitted to the Server immediately after encrypting the

data with the digital private key This digital private key should be kept safe and shouldnrsquot be

tampered with or disclosed to others The Client Software should provide a mechanism for

using industry specific digital signature to establish the data connectivity with Central Server

Software Industry should procure the Digital Signature as soon as possible provide the

details of the Digital Signature and use that for data encryption to ensure authentic tamper

proof data transmission

The transmitted data should be encrypted zipped data in ISO-7168 All API request data

transfer should be using a REST Service over HTTP protocol

The client site software should wait for successful upload and also read subsequent

instructions (Remote calibration Configuration update Diagnostics information etc) from

the Central Server Software

On receiving instructions on Remote calibrations or Configuration update the site client

software should invoke the Remote Calibration or Configuration update services to

download the corresponding configurations

In-case of any communication failure or any delayed data transmitted beyond a period 15

minutes site software should store the data the locally and upload to the Delayed Data

Upload URL and not to the Real Time upload URL This is to ensure that the delayed data is

captured separately at the Central Server and can be tracked for any integrity issues

All client should transmit data captured directly from the analyser from the site location Any

data transmission from different location will be rejected by the server

All the requests from the client to the server should be authenticated requests only Any

unauthenticated requests will be discarded or not processed

The details of authentication will be provided to Industry once the registration process for

the industry is completed

Basic Organization of API

httpltipaddressportgtGLensServer

Resource Description Route Request type

Data upload

This is for uploading data to the central server from the client Any authenticated client with proper credentials can upload data to the server using this api Only real time data (delay of max 2 min) will be accepted through realtimeupload URL and any delayed data should be uploaded using delayedUpload URL

realtimeUpload delayedUpload

POST

Configuration Download

This is for downloading the configuration from the server Any approved client software can download the configuration from the server using this API

getConfig POST

Central Server Software Open API August 5 2016

Fetch Client Configuration

When the ConfigurationUpdateFlag is set to ldquoTruerdquo in the response of the Realtime Upload or Delayed Upload client needs to provide the current configurations set at the Analyser

uploadConfig POST

Acknowledge Configuration

Download

When the ConfigurationDownloadFlag flag is set to ldquoTruerdquo in the response of the Realtime Upload or Delayed Upload the client software should use the getConfig URL to download the configuration from the Central Server Once the configuration is updated in the Analyser the client should update the Central Server with the status of the configuration update Till the status is updated to success client will be asked continuously to update the configuration by setting the ConfigurationDownload flag to ldquoTruerdquo

completedConfig POST

Calibration download service

When the RemoteCalibrationUpdateFlag is set to ldquoTruerdquo the client software should using this URL for downloading the configuration required for calibration The remote calibration data and sequence should be updated to the Calibrator locally

getcalibrationconfig POST

Calibration Update

Acknowledgement

After successful download of the Remote Calibration Configuration and updating the local calibrator or analyser who will be performing the calibration the client software should acknowledge the status of calibration status using this URL

updatecalibrationconfig POST

Diagnostic Upload service

When the DiagnosticUpdateFlag is set to ldquoTruerdquo the client software should using this URL for uploading the diagnostic information including any internal state of the analyser as per the analyser make and model Each Client should send the diagnostic upload every 15 minutes even if the diagnostic flag is not set to ldquoTruerdquo

uploadDiagnosticInfo POST

Central Server Software Open API August 5 2016

Authentication Mechanism for the API

Each API request header should have the following information

A Timestamp

B Authorization Encrypted data from the site which has the authentication digest Each request

should send authentication digest with the following encrypted data

site_key Unique Site Key provided by the Kerala State Pollution Board for each site for

authentication

software_version_id Software version set by the Central Server

time_stamp_data Timestamp when the data was encrypted

The authentication digest is decrypted using the Site Private Key The timestamp is ensured to be not

more than 15 minutes (configurable) from the current timestamp The software version is verified against the

registered software version with the Central Server Software This ensures the data is encrypted just before

transmission and the client program have access to Site Private Key and the current registered software

version The registered software version will be updated from Central Server Software time to time and hence

is not depend on client software version

Data Upload

The standard response format is described below Any approved client software with proper

credentials can send data to the central server using this API

Data Upload Format The API supports ISO-7168 data format for data upload The data upload follows an ISO-

7168 format zip file The zip file upload to the server will be multipartform-data format The data should be sent in

zip format The uploaded zip file will have two files namely 1 Data File 2 Metadata File The Data file should be encrypted using the Site Private Key The zip file should be uploaded to the server with proper authentication using the key Else the response with HTTP 401 with ldquoAuthentication Failure will be returned The metadata file will specify the file formats (ISO-7168) etc and the data file should comply

with the same

However all files has to follow the basic guidelines

1 Data should encrypted

2 File should zipped

3 Metadata file should provide the file specification and format

4 Header should have the encryption digest for decryption of the data

Request Details Upload data to Central Server This method uploads data to the server The requests will be authenticated and hence should have the authentication header as described in section ldquoAuthentication Mechanism for the APIrdquo

httpipaddressportKSPCBGLensServerrealtimeUpload OR

httpipaddressport KSPCBGLensServerdelayedUpload

Path realtimeUpload or delayedUpload

Central Server Software Open API August 5 2016

Method POST Parameters The file to be uploaded should be send as the parameter

Returns Response JSON which contains the status as either success or failure

Note realtimeUpload URL will take only data that is captured from the analyser during the last

poll frequency defined by regulator Anything delayed should be uploaded to delayedUpload URL

If the upload is success the following response will be obtained

status Success

serverConfigLastUpdatedTime lttimegt

ConfigurationDownloadFlag ltFlaggt

ConfigurationUpdateFlag ltFlaggt

RemoteCalibrationUpdateFlag ltFlaggt

DiagnosticUpdateFlag ltFlaggt

statusMessage file uploaded successfully

Where the lttimegt is the last updated time of server configurations and ltFlaggt is a Boolean value

depending upon whether the site configuration is updated or not

Flag can have values ldquoTruerdquo or ldquoFalserdquo

Eg

status Success

serverConfigLastUpdatedTime 2015-02-24T132119Z

ConfigurationDownloadFlag True

ConfigurationUpdateFlag False

RemoteCalibrationUpdateFlag True

DiagnosticUpdateFlag False

statusMessage file uploaded successfully

If the upload is a failure the following response will be obtained

Central Server Software Open API August 5 2016

status Failed

statusMessage No files were uploaded

Configuration Download from server

The configuration download request helps the client software understand the format and

parameters which should be transferred to the server This request enables the client software to

download the entire configuration for the monitoring station This configuration should be

synchronized with the analyser

This method download the configuration from the server

httpipaddressport KSPCBGLensServergetConfig

Path getConfig

Method POST

Parameters The site id will be passed as the parameter

Returns The response json contains the configuration in case of success or failure message

in case of failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

If the configuration download request is success the following response will come Any approved client software with proper credentials can download the configurations from the central server using this api Software with improper credentials will be blocked The request should have the valid authenticated headers

Request Format The request for site configuration update will be in the following format

siteId ldquosite_108rdquo

monitoringid ldquoETP_PLANTrdquo

Response Format

status Success

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

Central Server Software Open API August 5 2016

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

If the configuration request status is failed the response will be

status Failed

Fetch Configuration From Client This method will be invoked by the client to upload the current configuration in the analyser to the

Central Server Software when the ConfigurationUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadConfig

Path uploadConfig

Method POST

Parameter The configuration of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure

Request body

Command ConfigFetch

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

Central Server Software Open API August 5 2016

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Response for the Request will be Success status

status Success

configUpdateStatus Received Site configuration successfully

Failure status

status Failed

configUpdateStatus Failed to receive Site Configuration Please

retry

Configuration Update Acknowledgement

Whenever the site client software has received the configuration from the Central Server

Software and successfully update the site configuration the client software should provide

acknowledgement to the Central Server to ensure that server doesnrsquot request for

configuration update again

This method gives the status of calibration

httpipaddressport KSPCBGLensServercompletedConfig

Path completedConfig

Method POST

Central Server Software Open API August 5 2016

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoConfigUpdatedrdquo ldquoTruerdquo

Response to Configuration acknowledgement received by client software

Success Response

status Success

calibrationUpdateStatus Server and Site Configuration Synchronized

Failure response

status Failed

calibrationUpdateStatus Failed to update Configuration status

Remote Calibration Service This method download the configuration required for calibration

httpipaddressportGLensServergetCalibrationConfig

Path getCalibrationConfig

Method POST

Parameter The site id monitoring id CalibrationType will be passed as the parameter

CalibrationType will be ldquoscheduledrdquo when a schedule is submitted to client or ldquoimmediaterdquo if an

immediate request for calibration is required

Returns The response json contains the configuration required for calibration

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 5: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Central Server Software Open API August 5 2016

Open API Version No 30 dated 5th August 2016

Overview

This Open API document will be used for integrating Industry CEMSEQMSAAQMS

Data from Industry Monitoring Stations to Kerala State Pollution Control Boards Central

Server Software All communication between Central Server and acquisition clients (at

Industry site) are all managed through HTTP-based REST API All the API are authenticated

and should follow proper authentication models Any approved software client complying

with the specified open API can upload the data to the Central Server

Supported Operations in Version 30 The following are the operations supported in Version 30 of the Open API All clients should support full integration with all these operations

Real Time Data Upload Delayed Data Upload Remote Analyser Configuration Remote Analyser Calibration Analyser Diagnostic Fetch

Key Concepts

The following are the key concepts to be followed while working with the Open API

Site ID Unique Site ID identifying the specific industry

Monitoring ID Each Site has multiple monitoring stations Each monitoring station will be assigned a unique monitoring ID relative to the Site

Analyser ID Each analyser make and model will be assigned a unique Analyser ID

Parameter ID Each monitored parameter will have a common unified ID across all industries

Client Side Software Requirement

Each client software implementing the API should also comply with ldquoClient Side Software Requirement published by Kerala State Pollution Control Boardldquo

Key API Requirements

Each site client software has to collect the data from the analyser based on the poll

frequency defined Ideal frequency for data sampling from analyser is 10 second Data

transmission to the Central Server should be at 1 minute frequency The raw data and

Central Server Software Open API August 5 2016

linearized data should be transmitted to the server along with the data quality code and

captured timestamp

The captured data should be transmitted to the Server immediately after encrypting the

data with the digital private key This digital private key should be kept safe and shouldnrsquot be

tampered with or disclosed to others The Client Software should provide a mechanism for

using industry specific digital signature to establish the data connectivity with Central Server

Software Industry should procure the Digital Signature as soon as possible provide the

details of the Digital Signature and use that for data encryption to ensure authentic tamper

proof data transmission

The transmitted data should be encrypted zipped data in ISO-7168 All API request data

transfer should be using a REST Service over HTTP protocol

The client site software should wait for successful upload and also read subsequent

instructions (Remote calibration Configuration update Diagnostics information etc) from

the Central Server Software

On receiving instructions on Remote calibrations or Configuration update the site client

software should invoke the Remote Calibration or Configuration update services to

download the corresponding configurations

In-case of any communication failure or any delayed data transmitted beyond a period 15

minutes site software should store the data the locally and upload to the Delayed Data

Upload URL and not to the Real Time upload URL This is to ensure that the delayed data is

captured separately at the Central Server and can be tracked for any integrity issues

All client should transmit data captured directly from the analyser from the site location Any

data transmission from different location will be rejected by the server

All the requests from the client to the server should be authenticated requests only Any

unauthenticated requests will be discarded or not processed

The details of authentication will be provided to Industry once the registration process for

the industry is completed

Basic Organization of API

httpltipaddressportgtGLensServer

Resource Description Route Request type

Data upload

This is for uploading data to the central server from the client Any authenticated client with proper credentials can upload data to the server using this api Only real time data (delay of max 2 min) will be accepted through realtimeupload URL and any delayed data should be uploaded using delayedUpload URL

realtimeUpload delayedUpload

POST

Configuration Download

This is for downloading the configuration from the server Any approved client software can download the configuration from the server using this API

getConfig POST

Central Server Software Open API August 5 2016

Fetch Client Configuration

When the ConfigurationUpdateFlag is set to ldquoTruerdquo in the response of the Realtime Upload or Delayed Upload client needs to provide the current configurations set at the Analyser

uploadConfig POST

Acknowledge Configuration

Download

When the ConfigurationDownloadFlag flag is set to ldquoTruerdquo in the response of the Realtime Upload or Delayed Upload the client software should use the getConfig URL to download the configuration from the Central Server Once the configuration is updated in the Analyser the client should update the Central Server with the status of the configuration update Till the status is updated to success client will be asked continuously to update the configuration by setting the ConfigurationDownload flag to ldquoTruerdquo

completedConfig POST

Calibration download service

When the RemoteCalibrationUpdateFlag is set to ldquoTruerdquo the client software should using this URL for downloading the configuration required for calibration The remote calibration data and sequence should be updated to the Calibrator locally

getcalibrationconfig POST

Calibration Update

Acknowledgement

After successful download of the Remote Calibration Configuration and updating the local calibrator or analyser who will be performing the calibration the client software should acknowledge the status of calibration status using this URL

updatecalibrationconfig POST

Diagnostic Upload service

When the DiagnosticUpdateFlag is set to ldquoTruerdquo the client software should using this URL for uploading the diagnostic information including any internal state of the analyser as per the analyser make and model Each Client should send the diagnostic upload every 15 minutes even if the diagnostic flag is not set to ldquoTruerdquo

uploadDiagnosticInfo POST

Central Server Software Open API August 5 2016

Authentication Mechanism for the API

Each API request header should have the following information

A Timestamp

B Authorization Encrypted data from the site which has the authentication digest Each request

should send authentication digest with the following encrypted data

site_key Unique Site Key provided by the Kerala State Pollution Board for each site for

authentication

software_version_id Software version set by the Central Server

time_stamp_data Timestamp when the data was encrypted

The authentication digest is decrypted using the Site Private Key The timestamp is ensured to be not

more than 15 minutes (configurable) from the current timestamp The software version is verified against the

registered software version with the Central Server Software This ensures the data is encrypted just before

transmission and the client program have access to Site Private Key and the current registered software

version The registered software version will be updated from Central Server Software time to time and hence

is not depend on client software version

Data Upload

The standard response format is described below Any approved client software with proper

credentials can send data to the central server using this API

Data Upload Format The API supports ISO-7168 data format for data upload The data upload follows an ISO-

7168 format zip file The zip file upload to the server will be multipartform-data format The data should be sent in

zip format The uploaded zip file will have two files namely 1 Data File 2 Metadata File The Data file should be encrypted using the Site Private Key The zip file should be uploaded to the server with proper authentication using the key Else the response with HTTP 401 with ldquoAuthentication Failure will be returned The metadata file will specify the file formats (ISO-7168) etc and the data file should comply

with the same

However all files has to follow the basic guidelines

1 Data should encrypted

2 File should zipped

3 Metadata file should provide the file specification and format

4 Header should have the encryption digest for decryption of the data

Request Details Upload data to Central Server This method uploads data to the server The requests will be authenticated and hence should have the authentication header as described in section ldquoAuthentication Mechanism for the APIrdquo

httpipaddressportKSPCBGLensServerrealtimeUpload OR

httpipaddressport KSPCBGLensServerdelayedUpload

Path realtimeUpload or delayedUpload

Central Server Software Open API August 5 2016

Method POST Parameters The file to be uploaded should be send as the parameter

Returns Response JSON which contains the status as either success or failure

Note realtimeUpload URL will take only data that is captured from the analyser during the last

poll frequency defined by regulator Anything delayed should be uploaded to delayedUpload URL

If the upload is success the following response will be obtained

status Success

serverConfigLastUpdatedTime lttimegt

ConfigurationDownloadFlag ltFlaggt

ConfigurationUpdateFlag ltFlaggt

RemoteCalibrationUpdateFlag ltFlaggt

DiagnosticUpdateFlag ltFlaggt

statusMessage file uploaded successfully

Where the lttimegt is the last updated time of server configurations and ltFlaggt is a Boolean value

depending upon whether the site configuration is updated or not

Flag can have values ldquoTruerdquo or ldquoFalserdquo

Eg

status Success

serverConfigLastUpdatedTime 2015-02-24T132119Z

ConfigurationDownloadFlag True

ConfigurationUpdateFlag False

RemoteCalibrationUpdateFlag True

DiagnosticUpdateFlag False

statusMessage file uploaded successfully

If the upload is a failure the following response will be obtained

Central Server Software Open API August 5 2016

status Failed

statusMessage No files were uploaded

Configuration Download from server

The configuration download request helps the client software understand the format and

parameters which should be transferred to the server This request enables the client software to

download the entire configuration for the monitoring station This configuration should be

synchronized with the analyser

This method download the configuration from the server

httpipaddressport KSPCBGLensServergetConfig

Path getConfig

Method POST

Parameters The site id will be passed as the parameter

Returns The response json contains the configuration in case of success or failure message

in case of failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

If the configuration download request is success the following response will come Any approved client software with proper credentials can download the configurations from the central server using this api Software with improper credentials will be blocked The request should have the valid authenticated headers

Request Format The request for site configuration update will be in the following format

siteId ldquosite_108rdquo

monitoringid ldquoETP_PLANTrdquo

Response Format

status Success

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

Central Server Software Open API August 5 2016

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

If the configuration request status is failed the response will be

status Failed

Fetch Configuration From Client This method will be invoked by the client to upload the current configuration in the analyser to the

Central Server Software when the ConfigurationUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadConfig

Path uploadConfig

Method POST

Parameter The configuration of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure

Request body

Command ConfigFetch

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

Central Server Software Open API August 5 2016

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Response for the Request will be Success status

status Success

configUpdateStatus Received Site configuration successfully

Failure status

status Failed

configUpdateStatus Failed to receive Site Configuration Please

retry

Configuration Update Acknowledgement

Whenever the site client software has received the configuration from the Central Server

Software and successfully update the site configuration the client software should provide

acknowledgement to the Central Server to ensure that server doesnrsquot request for

configuration update again

This method gives the status of calibration

httpipaddressport KSPCBGLensServercompletedConfig

Path completedConfig

Method POST

Central Server Software Open API August 5 2016

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoConfigUpdatedrdquo ldquoTruerdquo

Response to Configuration acknowledgement received by client software

Success Response

status Success

calibrationUpdateStatus Server and Site Configuration Synchronized

Failure response

status Failed

calibrationUpdateStatus Failed to update Configuration status

Remote Calibration Service This method download the configuration required for calibration

httpipaddressportGLensServergetCalibrationConfig

Path getCalibrationConfig

Method POST

Parameter The site id monitoring id CalibrationType will be passed as the parameter

CalibrationType will be ldquoscheduledrdquo when a schedule is submitted to client or ldquoimmediaterdquo if an

immediate request for calibration is required

Returns The response json contains the configuration required for calibration

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 6: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Central Server Software Open API August 5 2016

linearized data should be transmitted to the server along with the data quality code and

captured timestamp

The captured data should be transmitted to the Server immediately after encrypting the

data with the digital private key This digital private key should be kept safe and shouldnrsquot be

tampered with or disclosed to others The Client Software should provide a mechanism for

using industry specific digital signature to establish the data connectivity with Central Server

Software Industry should procure the Digital Signature as soon as possible provide the

details of the Digital Signature and use that for data encryption to ensure authentic tamper

proof data transmission

The transmitted data should be encrypted zipped data in ISO-7168 All API request data

transfer should be using a REST Service over HTTP protocol

The client site software should wait for successful upload and also read subsequent

instructions (Remote calibration Configuration update Diagnostics information etc) from

the Central Server Software

On receiving instructions on Remote calibrations or Configuration update the site client

software should invoke the Remote Calibration or Configuration update services to

download the corresponding configurations

In-case of any communication failure or any delayed data transmitted beyond a period 15

minutes site software should store the data the locally and upload to the Delayed Data

Upload URL and not to the Real Time upload URL This is to ensure that the delayed data is

captured separately at the Central Server and can be tracked for any integrity issues

All client should transmit data captured directly from the analyser from the site location Any

data transmission from different location will be rejected by the server

All the requests from the client to the server should be authenticated requests only Any

unauthenticated requests will be discarded or not processed

The details of authentication will be provided to Industry once the registration process for

the industry is completed

Basic Organization of API

httpltipaddressportgtGLensServer

Resource Description Route Request type

Data upload

This is for uploading data to the central server from the client Any authenticated client with proper credentials can upload data to the server using this api Only real time data (delay of max 2 min) will be accepted through realtimeupload URL and any delayed data should be uploaded using delayedUpload URL

realtimeUpload delayedUpload

POST

Configuration Download

This is for downloading the configuration from the server Any approved client software can download the configuration from the server using this API

getConfig POST

Central Server Software Open API August 5 2016

Fetch Client Configuration

When the ConfigurationUpdateFlag is set to ldquoTruerdquo in the response of the Realtime Upload or Delayed Upload client needs to provide the current configurations set at the Analyser

uploadConfig POST

Acknowledge Configuration

Download

When the ConfigurationDownloadFlag flag is set to ldquoTruerdquo in the response of the Realtime Upload or Delayed Upload the client software should use the getConfig URL to download the configuration from the Central Server Once the configuration is updated in the Analyser the client should update the Central Server with the status of the configuration update Till the status is updated to success client will be asked continuously to update the configuration by setting the ConfigurationDownload flag to ldquoTruerdquo

completedConfig POST

Calibration download service

When the RemoteCalibrationUpdateFlag is set to ldquoTruerdquo the client software should using this URL for downloading the configuration required for calibration The remote calibration data and sequence should be updated to the Calibrator locally

getcalibrationconfig POST

Calibration Update

Acknowledgement

After successful download of the Remote Calibration Configuration and updating the local calibrator or analyser who will be performing the calibration the client software should acknowledge the status of calibration status using this URL

updatecalibrationconfig POST

Diagnostic Upload service

When the DiagnosticUpdateFlag is set to ldquoTruerdquo the client software should using this URL for uploading the diagnostic information including any internal state of the analyser as per the analyser make and model Each Client should send the diagnostic upload every 15 minutes even if the diagnostic flag is not set to ldquoTruerdquo

uploadDiagnosticInfo POST

Central Server Software Open API August 5 2016

Authentication Mechanism for the API

Each API request header should have the following information

A Timestamp

B Authorization Encrypted data from the site which has the authentication digest Each request

should send authentication digest with the following encrypted data

site_key Unique Site Key provided by the Kerala State Pollution Board for each site for

authentication

software_version_id Software version set by the Central Server

time_stamp_data Timestamp when the data was encrypted

The authentication digest is decrypted using the Site Private Key The timestamp is ensured to be not

more than 15 minutes (configurable) from the current timestamp The software version is verified against the

registered software version with the Central Server Software This ensures the data is encrypted just before

transmission and the client program have access to Site Private Key and the current registered software

version The registered software version will be updated from Central Server Software time to time and hence

is not depend on client software version

Data Upload

The standard response format is described below Any approved client software with proper

credentials can send data to the central server using this API

Data Upload Format The API supports ISO-7168 data format for data upload The data upload follows an ISO-

7168 format zip file The zip file upload to the server will be multipartform-data format The data should be sent in

zip format The uploaded zip file will have two files namely 1 Data File 2 Metadata File The Data file should be encrypted using the Site Private Key The zip file should be uploaded to the server with proper authentication using the key Else the response with HTTP 401 with ldquoAuthentication Failure will be returned The metadata file will specify the file formats (ISO-7168) etc and the data file should comply

with the same

However all files has to follow the basic guidelines

1 Data should encrypted

2 File should zipped

3 Metadata file should provide the file specification and format

4 Header should have the encryption digest for decryption of the data

Request Details Upload data to Central Server This method uploads data to the server The requests will be authenticated and hence should have the authentication header as described in section ldquoAuthentication Mechanism for the APIrdquo

httpipaddressportKSPCBGLensServerrealtimeUpload OR

httpipaddressport KSPCBGLensServerdelayedUpload

Path realtimeUpload or delayedUpload

Central Server Software Open API August 5 2016

Method POST Parameters The file to be uploaded should be send as the parameter

Returns Response JSON which contains the status as either success or failure

Note realtimeUpload URL will take only data that is captured from the analyser during the last

poll frequency defined by regulator Anything delayed should be uploaded to delayedUpload URL

If the upload is success the following response will be obtained

status Success

serverConfigLastUpdatedTime lttimegt

ConfigurationDownloadFlag ltFlaggt

ConfigurationUpdateFlag ltFlaggt

RemoteCalibrationUpdateFlag ltFlaggt

DiagnosticUpdateFlag ltFlaggt

statusMessage file uploaded successfully

Where the lttimegt is the last updated time of server configurations and ltFlaggt is a Boolean value

depending upon whether the site configuration is updated or not

Flag can have values ldquoTruerdquo or ldquoFalserdquo

Eg

status Success

serverConfigLastUpdatedTime 2015-02-24T132119Z

ConfigurationDownloadFlag True

ConfigurationUpdateFlag False

RemoteCalibrationUpdateFlag True

DiagnosticUpdateFlag False

statusMessage file uploaded successfully

If the upload is a failure the following response will be obtained

Central Server Software Open API August 5 2016

status Failed

statusMessage No files were uploaded

Configuration Download from server

The configuration download request helps the client software understand the format and

parameters which should be transferred to the server This request enables the client software to

download the entire configuration for the monitoring station This configuration should be

synchronized with the analyser

This method download the configuration from the server

httpipaddressport KSPCBGLensServergetConfig

Path getConfig

Method POST

Parameters The site id will be passed as the parameter

Returns The response json contains the configuration in case of success or failure message

in case of failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

If the configuration download request is success the following response will come Any approved client software with proper credentials can download the configurations from the central server using this api Software with improper credentials will be blocked The request should have the valid authenticated headers

Request Format The request for site configuration update will be in the following format

siteId ldquosite_108rdquo

monitoringid ldquoETP_PLANTrdquo

Response Format

status Success

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

Central Server Software Open API August 5 2016

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

If the configuration request status is failed the response will be

status Failed

Fetch Configuration From Client This method will be invoked by the client to upload the current configuration in the analyser to the

Central Server Software when the ConfigurationUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadConfig

Path uploadConfig

Method POST

Parameter The configuration of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure

Request body

Command ConfigFetch

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

Central Server Software Open API August 5 2016

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Response for the Request will be Success status

status Success

configUpdateStatus Received Site configuration successfully

Failure status

status Failed

configUpdateStatus Failed to receive Site Configuration Please

retry

Configuration Update Acknowledgement

Whenever the site client software has received the configuration from the Central Server

Software and successfully update the site configuration the client software should provide

acknowledgement to the Central Server to ensure that server doesnrsquot request for

configuration update again

This method gives the status of calibration

httpipaddressport KSPCBGLensServercompletedConfig

Path completedConfig

Method POST

Central Server Software Open API August 5 2016

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoConfigUpdatedrdquo ldquoTruerdquo

Response to Configuration acknowledgement received by client software

Success Response

status Success

calibrationUpdateStatus Server and Site Configuration Synchronized

Failure response

status Failed

calibrationUpdateStatus Failed to update Configuration status

Remote Calibration Service This method download the configuration required for calibration

httpipaddressportGLensServergetCalibrationConfig

Path getCalibrationConfig

Method POST

Parameter The site id monitoring id CalibrationType will be passed as the parameter

CalibrationType will be ldquoscheduledrdquo when a schedule is submitted to client or ldquoimmediaterdquo if an

immediate request for calibration is required

Returns The response json contains the configuration required for calibration

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 7: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Central Server Software Open API August 5 2016

Fetch Client Configuration

When the ConfigurationUpdateFlag is set to ldquoTruerdquo in the response of the Realtime Upload or Delayed Upload client needs to provide the current configurations set at the Analyser

uploadConfig POST

Acknowledge Configuration

Download

When the ConfigurationDownloadFlag flag is set to ldquoTruerdquo in the response of the Realtime Upload or Delayed Upload the client software should use the getConfig URL to download the configuration from the Central Server Once the configuration is updated in the Analyser the client should update the Central Server with the status of the configuration update Till the status is updated to success client will be asked continuously to update the configuration by setting the ConfigurationDownload flag to ldquoTruerdquo

completedConfig POST

Calibration download service

When the RemoteCalibrationUpdateFlag is set to ldquoTruerdquo the client software should using this URL for downloading the configuration required for calibration The remote calibration data and sequence should be updated to the Calibrator locally

getcalibrationconfig POST

Calibration Update

Acknowledgement

After successful download of the Remote Calibration Configuration and updating the local calibrator or analyser who will be performing the calibration the client software should acknowledge the status of calibration status using this URL

updatecalibrationconfig POST

Diagnostic Upload service

When the DiagnosticUpdateFlag is set to ldquoTruerdquo the client software should using this URL for uploading the diagnostic information including any internal state of the analyser as per the analyser make and model Each Client should send the diagnostic upload every 15 minutes even if the diagnostic flag is not set to ldquoTruerdquo

uploadDiagnosticInfo POST

Central Server Software Open API August 5 2016

Authentication Mechanism for the API

Each API request header should have the following information

A Timestamp

B Authorization Encrypted data from the site which has the authentication digest Each request

should send authentication digest with the following encrypted data

site_key Unique Site Key provided by the Kerala State Pollution Board for each site for

authentication

software_version_id Software version set by the Central Server

time_stamp_data Timestamp when the data was encrypted

The authentication digest is decrypted using the Site Private Key The timestamp is ensured to be not

more than 15 minutes (configurable) from the current timestamp The software version is verified against the

registered software version with the Central Server Software This ensures the data is encrypted just before

transmission and the client program have access to Site Private Key and the current registered software

version The registered software version will be updated from Central Server Software time to time and hence

is not depend on client software version

Data Upload

The standard response format is described below Any approved client software with proper

credentials can send data to the central server using this API

Data Upload Format The API supports ISO-7168 data format for data upload The data upload follows an ISO-

7168 format zip file The zip file upload to the server will be multipartform-data format The data should be sent in

zip format The uploaded zip file will have two files namely 1 Data File 2 Metadata File The Data file should be encrypted using the Site Private Key The zip file should be uploaded to the server with proper authentication using the key Else the response with HTTP 401 with ldquoAuthentication Failure will be returned The metadata file will specify the file formats (ISO-7168) etc and the data file should comply

with the same

However all files has to follow the basic guidelines

1 Data should encrypted

2 File should zipped

3 Metadata file should provide the file specification and format

4 Header should have the encryption digest for decryption of the data

Request Details Upload data to Central Server This method uploads data to the server The requests will be authenticated and hence should have the authentication header as described in section ldquoAuthentication Mechanism for the APIrdquo

httpipaddressportKSPCBGLensServerrealtimeUpload OR

httpipaddressport KSPCBGLensServerdelayedUpload

Path realtimeUpload or delayedUpload

Central Server Software Open API August 5 2016

Method POST Parameters The file to be uploaded should be send as the parameter

Returns Response JSON which contains the status as either success or failure

Note realtimeUpload URL will take only data that is captured from the analyser during the last

poll frequency defined by regulator Anything delayed should be uploaded to delayedUpload URL

If the upload is success the following response will be obtained

status Success

serverConfigLastUpdatedTime lttimegt

ConfigurationDownloadFlag ltFlaggt

ConfigurationUpdateFlag ltFlaggt

RemoteCalibrationUpdateFlag ltFlaggt

DiagnosticUpdateFlag ltFlaggt

statusMessage file uploaded successfully

Where the lttimegt is the last updated time of server configurations and ltFlaggt is a Boolean value

depending upon whether the site configuration is updated or not

Flag can have values ldquoTruerdquo or ldquoFalserdquo

Eg

status Success

serverConfigLastUpdatedTime 2015-02-24T132119Z

ConfigurationDownloadFlag True

ConfigurationUpdateFlag False

RemoteCalibrationUpdateFlag True

DiagnosticUpdateFlag False

statusMessage file uploaded successfully

If the upload is a failure the following response will be obtained

Central Server Software Open API August 5 2016

status Failed

statusMessage No files were uploaded

Configuration Download from server

The configuration download request helps the client software understand the format and

parameters which should be transferred to the server This request enables the client software to

download the entire configuration for the monitoring station This configuration should be

synchronized with the analyser

This method download the configuration from the server

httpipaddressport KSPCBGLensServergetConfig

Path getConfig

Method POST

Parameters The site id will be passed as the parameter

Returns The response json contains the configuration in case of success or failure message

in case of failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

If the configuration download request is success the following response will come Any approved client software with proper credentials can download the configurations from the central server using this api Software with improper credentials will be blocked The request should have the valid authenticated headers

Request Format The request for site configuration update will be in the following format

siteId ldquosite_108rdquo

monitoringid ldquoETP_PLANTrdquo

Response Format

status Success

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

Central Server Software Open API August 5 2016

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

If the configuration request status is failed the response will be

status Failed

Fetch Configuration From Client This method will be invoked by the client to upload the current configuration in the analyser to the

Central Server Software when the ConfigurationUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadConfig

Path uploadConfig

Method POST

Parameter The configuration of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure

Request body

Command ConfigFetch

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

Central Server Software Open API August 5 2016

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Response for the Request will be Success status

status Success

configUpdateStatus Received Site configuration successfully

Failure status

status Failed

configUpdateStatus Failed to receive Site Configuration Please

retry

Configuration Update Acknowledgement

Whenever the site client software has received the configuration from the Central Server

Software and successfully update the site configuration the client software should provide

acknowledgement to the Central Server to ensure that server doesnrsquot request for

configuration update again

This method gives the status of calibration

httpipaddressport KSPCBGLensServercompletedConfig

Path completedConfig

Method POST

Central Server Software Open API August 5 2016

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoConfigUpdatedrdquo ldquoTruerdquo

Response to Configuration acknowledgement received by client software

Success Response

status Success

calibrationUpdateStatus Server and Site Configuration Synchronized

Failure response

status Failed

calibrationUpdateStatus Failed to update Configuration status

Remote Calibration Service This method download the configuration required for calibration

httpipaddressportGLensServergetCalibrationConfig

Path getCalibrationConfig

Method POST

Parameter The site id monitoring id CalibrationType will be passed as the parameter

CalibrationType will be ldquoscheduledrdquo when a schedule is submitted to client or ldquoimmediaterdquo if an

immediate request for calibration is required

Returns The response json contains the configuration required for calibration

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 8: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Central Server Software Open API August 5 2016

Authentication Mechanism for the API

Each API request header should have the following information

A Timestamp

B Authorization Encrypted data from the site which has the authentication digest Each request

should send authentication digest with the following encrypted data

site_key Unique Site Key provided by the Kerala State Pollution Board for each site for

authentication

software_version_id Software version set by the Central Server

time_stamp_data Timestamp when the data was encrypted

The authentication digest is decrypted using the Site Private Key The timestamp is ensured to be not

more than 15 minutes (configurable) from the current timestamp The software version is verified against the

registered software version with the Central Server Software This ensures the data is encrypted just before

transmission and the client program have access to Site Private Key and the current registered software

version The registered software version will be updated from Central Server Software time to time and hence

is not depend on client software version

Data Upload

The standard response format is described below Any approved client software with proper

credentials can send data to the central server using this API

Data Upload Format The API supports ISO-7168 data format for data upload The data upload follows an ISO-

7168 format zip file The zip file upload to the server will be multipartform-data format The data should be sent in

zip format The uploaded zip file will have two files namely 1 Data File 2 Metadata File The Data file should be encrypted using the Site Private Key The zip file should be uploaded to the server with proper authentication using the key Else the response with HTTP 401 with ldquoAuthentication Failure will be returned The metadata file will specify the file formats (ISO-7168) etc and the data file should comply

with the same

However all files has to follow the basic guidelines

1 Data should encrypted

2 File should zipped

3 Metadata file should provide the file specification and format

4 Header should have the encryption digest for decryption of the data

Request Details Upload data to Central Server This method uploads data to the server The requests will be authenticated and hence should have the authentication header as described in section ldquoAuthentication Mechanism for the APIrdquo

httpipaddressportKSPCBGLensServerrealtimeUpload OR

httpipaddressport KSPCBGLensServerdelayedUpload

Path realtimeUpload or delayedUpload

Central Server Software Open API August 5 2016

Method POST Parameters The file to be uploaded should be send as the parameter

Returns Response JSON which contains the status as either success or failure

Note realtimeUpload URL will take only data that is captured from the analyser during the last

poll frequency defined by regulator Anything delayed should be uploaded to delayedUpload URL

If the upload is success the following response will be obtained

status Success

serverConfigLastUpdatedTime lttimegt

ConfigurationDownloadFlag ltFlaggt

ConfigurationUpdateFlag ltFlaggt

RemoteCalibrationUpdateFlag ltFlaggt

DiagnosticUpdateFlag ltFlaggt

statusMessage file uploaded successfully

Where the lttimegt is the last updated time of server configurations and ltFlaggt is a Boolean value

depending upon whether the site configuration is updated or not

Flag can have values ldquoTruerdquo or ldquoFalserdquo

Eg

status Success

serverConfigLastUpdatedTime 2015-02-24T132119Z

ConfigurationDownloadFlag True

ConfigurationUpdateFlag False

RemoteCalibrationUpdateFlag True

DiagnosticUpdateFlag False

statusMessage file uploaded successfully

If the upload is a failure the following response will be obtained

Central Server Software Open API August 5 2016

status Failed

statusMessage No files were uploaded

Configuration Download from server

The configuration download request helps the client software understand the format and

parameters which should be transferred to the server This request enables the client software to

download the entire configuration for the monitoring station This configuration should be

synchronized with the analyser

This method download the configuration from the server

httpipaddressport KSPCBGLensServergetConfig

Path getConfig

Method POST

Parameters The site id will be passed as the parameter

Returns The response json contains the configuration in case of success or failure message

in case of failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

If the configuration download request is success the following response will come Any approved client software with proper credentials can download the configurations from the central server using this api Software with improper credentials will be blocked The request should have the valid authenticated headers

Request Format The request for site configuration update will be in the following format

siteId ldquosite_108rdquo

monitoringid ldquoETP_PLANTrdquo

Response Format

status Success

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

Central Server Software Open API August 5 2016

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

If the configuration request status is failed the response will be

status Failed

Fetch Configuration From Client This method will be invoked by the client to upload the current configuration in the analyser to the

Central Server Software when the ConfigurationUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadConfig

Path uploadConfig

Method POST

Parameter The configuration of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure

Request body

Command ConfigFetch

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

Central Server Software Open API August 5 2016

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Response for the Request will be Success status

status Success

configUpdateStatus Received Site configuration successfully

Failure status

status Failed

configUpdateStatus Failed to receive Site Configuration Please

retry

Configuration Update Acknowledgement

Whenever the site client software has received the configuration from the Central Server

Software and successfully update the site configuration the client software should provide

acknowledgement to the Central Server to ensure that server doesnrsquot request for

configuration update again

This method gives the status of calibration

httpipaddressport KSPCBGLensServercompletedConfig

Path completedConfig

Method POST

Central Server Software Open API August 5 2016

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoConfigUpdatedrdquo ldquoTruerdquo

Response to Configuration acknowledgement received by client software

Success Response

status Success

calibrationUpdateStatus Server and Site Configuration Synchronized

Failure response

status Failed

calibrationUpdateStatus Failed to update Configuration status

Remote Calibration Service This method download the configuration required for calibration

httpipaddressportGLensServergetCalibrationConfig

Path getCalibrationConfig

Method POST

Parameter The site id monitoring id CalibrationType will be passed as the parameter

CalibrationType will be ldquoscheduledrdquo when a schedule is submitted to client or ldquoimmediaterdquo if an

immediate request for calibration is required

Returns The response json contains the configuration required for calibration

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 9: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Central Server Software Open API August 5 2016

Method POST Parameters The file to be uploaded should be send as the parameter

Returns Response JSON which contains the status as either success or failure

Note realtimeUpload URL will take only data that is captured from the analyser during the last

poll frequency defined by regulator Anything delayed should be uploaded to delayedUpload URL

If the upload is success the following response will be obtained

status Success

serverConfigLastUpdatedTime lttimegt

ConfigurationDownloadFlag ltFlaggt

ConfigurationUpdateFlag ltFlaggt

RemoteCalibrationUpdateFlag ltFlaggt

DiagnosticUpdateFlag ltFlaggt

statusMessage file uploaded successfully

Where the lttimegt is the last updated time of server configurations and ltFlaggt is a Boolean value

depending upon whether the site configuration is updated or not

Flag can have values ldquoTruerdquo or ldquoFalserdquo

Eg

status Success

serverConfigLastUpdatedTime 2015-02-24T132119Z

ConfigurationDownloadFlag True

ConfigurationUpdateFlag False

RemoteCalibrationUpdateFlag True

DiagnosticUpdateFlag False

statusMessage file uploaded successfully

If the upload is a failure the following response will be obtained

Central Server Software Open API August 5 2016

status Failed

statusMessage No files were uploaded

Configuration Download from server

The configuration download request helps the client software understand the format and

parameters which should be transferred to the server This request enables the client software to

download the entire configuration for the monitoring station This configuration should be

synchronized with the analyser

This method download the configuration from the server

httpipaddressport KSPCBGLensServergetConfig

Path getConfig

Method POST

Parameters The site id will be passed as the parameter

Returns The response json contains the configuration in case of success or failure message

in case of failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

If the configuration download request is success the following response will come Any approved client software with proper credentials can download the configurations from the central server using this api Software with improper credentials will be blocked The request should have the valid authenticated headers

Request Format The request for site configuration update will be in the following format

siteId ldquosite_108rdquo

monitoringid ldquoETP_PLANTrdquo

Response Format

status Success

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

Central Server Software Open API August 5 2016

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

If the configuration request status is failed the response will be

status Failed

Fetch Configuration From Client This method will be invoked by the client to upload the current configuration in the analyser to the

Central Server Software when the ConfigurationUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadConfig

Path uploadConfig

Method POST

Parameter The configuration of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure

Request body

Command ConfigFetch

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

Central Server Software Open API August 5 2016

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Response for the Request will be Success status

status Success

configUpdateStatus Received Site configuration successfully

Failure status

status Failed

configUpdateStatus Failed to receive Site Configuration Please

retry

Configuration Update Acknowledgement

Whenever the site client software has received the configuration from the Central Server

Software and successfully update the site configuration the client software should provide

acknowledgement to the Central Server to ensure that server doesnrsquot request for

configuration update again

This method gives the status of calibration

httpipaddressport KSPCBGLensServercompletedConfig

Path completedConfig

Method POST

Central Server Software Open API August 5 2016

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoConfigUpdatedrdquo ldquoTruerdquo

Response to Configuration acknowledgement received by client software

Success Response

status Success

calibrationUpdateStatus Server and Site Configuration Synchronized

Failure response

status Failed

calibrationUpdateStatus Failed to update Configuration status

Remote Calibration Service This method download the configuration required for calibration

httpipaddressportGLensServergetCalibrationConfig

Path getCalibrationConfig

Method POST

Parameter The site id monitoring id CalibrationType will be passed as the parameter

CalibrationType will be ldquoscheduledrdquo when a schedule is submitted to client or ldquoimmediaterdquo if an

immediate request for calibration is required

Returns The response json contains the configuration required for calibration

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 10: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Central Server Software Open API August 5 2016

status Failed

statusMessage No files were uploaded

Configuration Download from server

The configuration download request helps the client software understand the format and

parameters which should be transferred to the server This request enables the client software to

download the entire configuration for the monitoring station This configuration should be

synchronized with the analyser

This method download the configuration from the server

httpipaddressport KSPCBGLensServergetConfig

Path getConfig

Method POST

Parameters The site id will be passed as the parameter

Returns The response json contains the configuration in case of success or failure message

in case of failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

If the configuration download request is success the following response will come Any approved client software with proper credentials can download the configurations from the central server using this api Software with improper credentials will be blocked The request should have the valid authenticated headers

Request Format The request for site configuration update will be in the following format

siteId ldquosite_108rdquo

monitoringid ldquoETP_PLANTrdquo

Response Format

status Success

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

Central Server Software Open API August 5 2016

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

If the configuration request status is failed the response will be

status Failed

Fetch Configuration From Client This method will be invoked by the client to upload the current configuration in the analyser to the

Central Server Software when the ConfigurationUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadConfig

Path uploadConfig

Method POST

Parameter The configuration of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure

Request body

Command ConfigFetch

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

Central Server Software Open API August 5 2016

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Response for the Request will be Success status

status Success

configUpdateStatus Received Site configuration successfully

Failure status

status Failed

configUpdateStatus Failed to receive Site Configuration Please

retry

Configuration Update Acknowledgement

Whenever the site client software has received the configuration from the Central Server

Software and successfully update the site configuration the client software should provide

acknowledgement to the Central Server to ensure that server doesnrsquot request for

configuration update again

This method gives the status of calibration

httpipaddressport KSPCBGLensServercompletedConfig

Path completedConfig

Method POST

Central Server Software Open API August 5 2016

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoConfigUpdatedrdquo ldquoTruerdquo

Response to Configuration acknowledgement received by client software

Success Response

status Success

calibrationUpdateStatus Server and Site Configuration Synchronized

Failure response

status Failed

calibrationUpdateStatus Failed to update Configuration status

Remote Calibration Service This method download the configuration required for calibration

httpipaddressportGLensServergetCalibrationConfig

Path getCalibrationConfig

Method POST

Parameter The site id monitoring id CalibrationType will be passed as the parameter

CalibrationType will be ldquoscheduledrdquo when a schedule is submitted to client or ldquoimmediaterdquo if an

immediate request for calibration is required

Returns The response json contains the configuration required for calibration

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 11: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Central Server Software Open API August 5 2016

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

If the configuration request status is failed the response will be

status Failed

Fetch Configuration From Client This method will be invoked by the client to upload the current configuration in the analyser to the

Central Server Software when the ConfigurationUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadConfig

Path uploadConfig

Method POST

Parameter The configuration of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure

Request body

Command ConfigFetch

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

Central Server Software Open API August 5 2016

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Response for the Request will be Success status

status Success

configUpdateStatus Received Site configuration successfully

Failure status

status Failed

configUpdateStatus Failed to receive Site Configuration Please

retry

Configuration Update Acknowledgement

Whenever the site client software has received the configuration from the Central Server

Software and successfully update the site configuration the client software should provide

acknowledgement to the Central Server to ensure that server doesnrsquot request for

configuration update again

This method gives the status of calibration

httpipaddressport KSPCBGLensServercompletedConfig

Path completedConfig

Method POST

Central Server Software Open API August 5 2016

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoConfigUpdatedrdquo ldquoTruerdquo

Response to Configuration acknowledgement received by client software

Success Response

status Success

calibrationUpdateStatus Server and Site Configuration Synchronized

Failure response

status Failed

calibrationUpdateStatus Failed to update Configuration status

Remote Calibration Service This method download the configuration required for calibration

httpipaddressportGLensServergetCalibrationConfig

Path getCalibrationConfig

Method POST

Parameter The site id monitoring id CalibrationType will be passed as the parameter

CalibrationType will be ldquoscheduledrdquo when a schedule is submitted to client or ldquoimmediaterdquo if an

immediate request for calibration is required

Returns The response json contains the configuration required for calibration

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 12: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

If the configuration request status is failed the response will be

status Failed

Fetch Configuration From Client This method will be invoked by the client to upload the current configuration in the analyser to the

Central Server Software when the ConfigurationUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadConfig

Path uploadConfig

Method POST

Parameter The configuration of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure

Request body

Command ConfigFetch

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

Central Server Software Open API August 5 2016

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Response for the Request will be Success status

status Success

configUpdateStatus Received Site configuration successfully

Failure status

status Failed

configUpdateStatus Failed to receive Site Configuration Please

retry

Configuration Update Acknowledgement

Whenever the site client software has received the configuration from the Central Server

Software and successfully update the site configuration the client software should provide

acknowledgement to the Central Server to ensure that server doesnrsquot request for

configuration update again

This method gives the status of calibration

httpipaddressport KSPCBGLensServercompletedConfig

Path completedConfig

Method POST

Central Server Software Open API August 5 2016

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoConfigUpdatedrdquo ldquoTruerdquo

Response to Configuration acknowledgement received by client software

Success Response

status Success

calibrationUpdateStatus Server and Site Configuration Synchronized

Failure response

status Failed

calibrationUpdateStatus Failed to update Configuration status

Remote Calibration Service This method download the configuration required for calibration

httpipaddressportGLensServergetCalibrationConfig

Path getCalibrationConfig

Method POST

Parameter The site id monitoring id CalibrationType will be passed as the parameter

CalibrationType will be ldquoscheduledrdquo when a schedule is submitted to client or ldquoimmediaterdquo if an

immediate request for calibration is required

Returns The response json contains the configuration required for calibration

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 13: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

If the configuration request status is failed the response will be

status Failed

Fetch Configuration From Client This method will be invoked by the client to upload the current configuration in the analyser to the

Central Server Software when the ConfigurationUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadConfig

Path uploadConfig

Method POST

Parameter The configuration of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure

Request body

Command ConfigFetch

serverConfigLastUpdatedTime ltServerConfigUpdatedLastTimegt

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

Central Server Software Open API August 5 2016

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Response for the Request will be Success status

status Success

configUpdateStatus Received Site configuration successfully

Failure status

status Failed

configUpdateStatus Failed to receive Site Configuration Please

retry

Configuration Update Acknowledgement

Whenever the site client software has received the configuration from the Central Server

Software and successfully update the site configuration the client software should provide

acknowledgement to the Central Server to ensure that server doesnrsquot request for

configuration update again

This method gives the status of calibration

httpipaddressport KSPCBGLensServercompletedConfig

Path completedConfig

Method POST

Central Server Software Open API August 5 2016

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoConfigUpdatedrdquo ldquoTruerdquo

Response to Configuration acknowledgement received by client software

Success Response

status Success

calibrationUpdateStatus Server and Site Configuration Synchronized

Failure response

status Failed

calibrationUpdateStatus Failed to update Configuration status

Remote Calibration Service This method download the configuration required for calibration

httpipaddressportGLensServergetCalibrationConfig

Path getCalibrationConfig

Method POST

Parameter The site id monitoring id CalibrationType will be passed as the parameter

CalibrationType will be ldquoscheduledrdquo when a schedule is submitted to client or ldquoimmediaterdquo if an

immediate request for calibration is required

Returns The response json contains the configuration required for calibration

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 14: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Central Server Software Open API August 5 2016

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] configJson

monitoringType

required True

padding -

start_pos 55

end_pos 64

type string

alignment left

monitoringId

required True

padding -

start_pos 65

end_pos 84

type string

alignment left

QualityCode

required True

padding

start_pos 42

end_pos 43

type string

alignment left

SensorTime

required True

padding -

start_pos 44

end_pos 54

type string

alignment left

parameterId

required True

padding -

start_pos 85

end_pos 100

type string

alignment left

parameterName

required True

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Response for the Request will be Success status

status Success

configUpdateStatus Received Site configuration successfully

Failure status

status Failed

configUpdateStatus Failed to receive Site Configuration Please

retry

Configuration Update Acknowledgement

Whenever the site client software has received the configuration from the Central Server

Software and successfully update the site configuration the client software should provide

acknowledgement to the Central Server to ensure that server doesnrsquot request for

configuration update again

This method gives the status of calibration

httpipaddressport KSPCBGLensServercompletedConfig

Path completedConfig

Method POST

Central Server Software Open API August 5 2016

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoConfigUpdatedrdquo ldquoTruerdquo

Response to Configuration acknowledgement received by client software

Success Response

status Success

calibrationUpdateStatus Server and Site Configuration Synchronized

Failure response

status Failed

calibrationUpdateStatus Failed to update Configuration status

Remote Calibration Service This method download the configuration required for calibration

httpipaddressportGLensServergetCalibrationConfig

Path getCalibrationConfig

Method POST

Parameter The site id monitoring id CalibrationType will be passed as the parameter

CalibrationType will be ldquoscheduledrdquo when a schedule is submitted to client or ldquoimmediaterdquo if an

immediate request for calibration is required

Returns The response json contains the configuration required for calibration

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 15: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Central Server Software Open API August 5 2016

padding

start_pos 11

end_pos 25

type string

alignment left

Reading required True padding

start_pos 26

end_pos 41

type string

alignment left

id

required True padding -

start_pos 1

end_pos 8

type string

alignment left

sensorChannel

required True

padding -

start_pos 9

end_pos 10

type string

alignment left

analyzerId

required True

padding -

start_pos 101

end_pos 115

type string

alignment left

AcquisitionSystemDetails

AcquisitionVersion ltVersion Numbergt

AcquisitionSystem ltAcquisition System Namegt

SensorA

collectorType ltMonitoring Typegt

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Response for the Request will be Success status

status Success

configUpdateStatus Received Site configuration successfully

Failure status

status Failed

configUpdateStatus Failed to receive Site Configuration Please

retry

Configuration Update Acknowledgement

Whenever the site client software has received the configuration from the Central Server

Software and successfully update the site configuration the client software should provide

acknowledgement to the Central Server to ensure that server doesnrsquot request for

configuration update again

This method gives the status of calibration

httpipaddressport KSPCBGLensServercompletedConfig

Path completedConfig

Method POST

Central Server Software Open API August 5 2016

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoConfigUpdatedrdquo ldquoTruerdquo

Response to Configuration acknowledgement received by client software

Success Response

status Success

calibrationUpdateStatus Server and Site Configuration Synchronized

Failure response

status Failed

calibrationUpdateStatus Failed to update Configuration status

Remote Calibration Service This method download the configuration required for calibration

httpipaddressportGLensServergetCalibrationConfig

Path getCalibrationConfig

Method POST

Parameter The site id monitoring id CalibrationType will be passed as the parameter

CalibrationType will be ldquoscheduledrdquo when a schedule is submitted to client or ldquoimmediaterdquo if an

immediate request for calibration is required

Returns The response json contains the configuration required for calibration

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 16: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Central Server Software Open API August 5 2016

SensorN

monitoringType ltMonitoring Typegt

monitoringId ltMonitoring Idgt

ChannelNo 0

GaugeMinimum

CoefficientA 1

parameterId ltparameter idgt

GaugeMaximum

MeasurementUnit ltmeasurement unitgt

compPort

parameterName ltparameter namegt

CoefficientB 0

analyzerId ltanalyzer idgt

ldquocustomparametersrdquo

Response for the Request will be Success status

status Success

configUpdateStatus Received Site configuration successfully

Failure status

status Failed

configUpdateStatus Failed to receive Site Configuration Please

retry

Configuration Update Acknowledgement

Whenever the site client software has received the configuration from the Central Server

Software and successfully update the site configuration the client software should provide

acknowledgement to the Central Server to ensure that server doesnrsquot request for

configuration update again

This method gives the status of calibration

httpipaddressport KSPCBGLensServercompletedConfig

Path completedConfig

Method POST

Central Server Software Open API August 5 2016

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoConfigUpdatedrdquo ldquoTruerdquo

Response to Configuration acknowledgement received by client software

Success Response

status Success

calibrationUpdateStatus Server and Site Configuration Synchronized

Failure response

status Failed

calibrationUpdateStatus Failed to update Configuration status

Remote Calibration Service This method download the configuration required for calibration

httpipaddressportGLensServergetCalibrationConfig

Path getCalibrationConfig

Method POST

Parameter The site id monitoring id CalibrationType will be passed as the parameter

CalibrationType will be ldquoscheduledrdquo when a schedule is submitted to client or ldquoimmediaterdquo if an

immediate request for calibration is required

Returns The response json contains the configuration required for calibration

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 17: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Central Server Software Open API August 5 2016

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoConfigUpdatedrdquo ldquoTruerdquo

Response to Configuration acknowledgement received by client software

Success Response

status Success

calibrationUpdateStatus Server and Site Configuration Synchronized

Failure response

status Failed

calibrationUpdateStatus Failed to update Configuration status

Remote Calibration Service This method download the configuration required for calibration

httpipaddressportGLensServergetCalibrationConfig

Path getCalibrationConfig

Method POST

Parameter The site id monitoring id CalibrationType will be passed as the parameter

CalibrationType will be ldquoscheduledrdquo when a schedule is submitted to client or ldquoimmediaterdquo if an

immediate request for calibration is required

Returns The response json contains the configuration required for calibration

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 18: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Central Server Software Open API August 5 2016

Response provided by the Server will have the following fields If any analyser maker needs any additional fields for performing remote calibration this can be discussed with glens team at glensknowledgelenscom and can use ldquocustomparametersrdquo tag in the json

The configuration details has the sequence for calibrations the required parameters for calibrations and the schedule for the calibrations RESPONSE

status Success

calibration

calibratorName ltcalibrator-namegt

sequence [

function ltfunction namegt

duration_secs ltduration in secondsgt

gas ltgasgt

value 0

delay ltdelay in minutesgt

sequenceName ltsequence namegt

duration ltduration in minutegt

type lttype of calibrationgt

unit ltunit of gasgt

]

siteName ltsite namegt

monitoringType ltmonitoring typegt

frequency ltfrequencygt

analyzerId ltanalyser idgt

parameterId ltparameter idgt

remoteCalibrationId ltremote calibration idgt

parameterName SO2

cycleUnit 1

total_duration lttotal durationgt

frequencyDay ltdaygt

siteId ltsite idgt

startTime

date ltdategt

time lttimegt

executeImmediate True

day ltdaygt

cycle ltcyclegt

frequencyTime ltfrequency timegt

calibratorId ltcalibration idgt

monitoringUnit ltmonitoring unitgt

value

channelNumber ltchannel numbergt

analyzerType ltanalyser typegt

endTime

date ltdategt

time lttimegt

remoteCalibrationName ltremote calibration namegt

analyzerName ltanalyser namegt

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 19: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Central Server Software Open API August 5 2016

serverCalibrationLastUpdatedTime ltserverCalibrationLastUpdatedTimegt

siteCalibrationLastUpdatedTime ltsiteCalibrationLastUpdatedTimegt

lastCalibratedOn ltlastCalibratedOngt

siteId ltsiteidgt

Failure

status Failed Calibration configuration not available

Calibration Update Acknowledgement

Whenever the site client software has received the calibration sequence and has scheduled

the calibration on the analyser the calibration acknowledgement has to be provided to

Glens server to ensure that server doesnrsquot request for calibration configuration again

This method gives the status of calibration

httpipaddressport KSPCBGLensServerupdateCalibrationConfig

Path updateCalibrationConfig

Method POST

Parameter The site id and monitoring id will be passed as the parameter

Returns The response json contains success in case of success or failure message in case of

failure

Request body

siteId ltsite-idgt

monitoringid ltmonitor-idgt

ldquoCalibrationTyperdquo ldquoScheduledrdquo or ldquoImmediaterdquo

Response to Calibration Update Received by Client Software

Success Response

status Success

calibrationUpdateStatus Server and Site Calibration Synchronized

Failure response

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 20: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Central Server Software Open API August 5 2016

status Failed

calibrationUpdateStatus Failed to update calibration configuration

status

Fetch Diagnostic Information From Client This method will be invoked by the client to upload the current diagnostic information in the

analyser to the Central Server Software when the DiagnosticUpdateFlag is set to ldquoTruerdquo

httpipaddressport KSPCBGLensServeruploadDiagnisticsInfo

Path uploadDiagnosticInfo

Method POST

Parameter The diagnostic information of the Site in the json format

Returns The response json contains success in case of success or failure message in case of

failure The diagnostics json will be an array of key value pair with the corresponding category

associated to the key

Request body

Command DiagnosticFetch

SiteDetails

siteName ltSiteNamegt

siteLabel ltSiteLabelgt

siteConfigLastUpdatedTime ltSiteConfigUpdatedLastTimegt

siteId ltsite idgt

monitoringId ltmonitoring idgt

ldquocustomparametersrdquo

CollectorDetails[

ldquoCollectorTyperdquo ltgt

ldquoCollectorNamerdquo ltgt

ConfiguredChannels ltgt

PollingStep ltpolling stepgt

ChecksumStatusBit ltchecksum bitgt

Address ltaddressgt HeartBeat ltheartbeatgt DataFormatBits 00

Port ltportgt

CommunicationTimeOut ltcommunication bitgt

ldquocustomparametersrdquo

] diagnosticJson [ldquoanalyserIdrdquoltanalyser-idgtrdquoparameterNamerdquordquordquo

diagnosticsrdquo[ldquokeyrdquoltkeygt ldquovaluerdquoltvaluegtrdquocategoryrdquoltcategorygt]]

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 21: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Central Server Software Open API August 5 2016

Response for the Request will be Success status

status Success

diagnosticUpdateStatus Received Site diagnostics successfully

Failure status

status Failed

diagnosticUpdateStatus Failed to receive Site diagnostics Please

retry

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 22: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

FAQ for Real Time Online Monitoring Of the Effluent amp Emission

Monitoring System

1 What is the connectivity Procedure to upload data to Kerala State Pollution Control Board

(KSPCB)

Connectivity Procedure

Each has Industry to fill the

online Pre-deployment

checklist filled in provided

registration URL

KSPCB Central

Software will create

the site ids

monitoring station id

and send automated

email once the site is

approved

KSPCB will reply the details to

the industry over email along

with upload URL login

credentials

IndustryVendor to configure

their software using the

provided site id monitoring id

etc and inform the KSPCB of

their readiness to upload

Industry also to provide the

remote login details to verify

the data connectivity

KSPCB will verify the uploaded data and

verify the connectivity by remote login to

the Industry Site and confirming the data

upload KSPCB will also show the

procedures to reply to Exceedance alerts

Industry can login to the URL to check the

data alerts and notifications

Scope of Industry

Vendor

Scope of KSPCB

(Software Team)

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 23: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

2 What is the URL for Industry registration

httpkeralapcbglensservercomKSPCBregistrationhtml

3 What is the name and format of the uploaded data to the Central Server

The uploaded data will be transmitted using HTTP REST interface to the provided URL

The zip file containing the metadata and data should be uploaded The format is defined in the

Open API Document

The zip file name should be SiteID_MonitoringID_UploadTimezip The SiteID MonitoringID

values will be provided by KSPCB Central Software Team as part of the Industry Onboarding

process

Each zip file should be uploaded per monitoring station The sample file format is uploaded

separately on the KSPCB website

Please note that the upload time should be uploaded immediately if there is a lag the software

will reject the upload All delayed data should be uploaded through the delayed URL only

4 Which parameters to be sent any specific or all gas parameter

All parameters specified as per CPCB guidelines has to be sent to KSPCB

5 What is the frequency of the File Do we need instantaneous data or average record

Transmission has to be at 1 Minute frequency Average data with poll frequency of 10 seconds

for 1 minute to be captured and sent The data should be with the proper quality codes Refer

to question 6 for details on Quality Code

If Transmission is not done within 15 minute then it should be posted as delayed data

Transmission time to the data time shouldnrsquot have more than 15 min lag If delayed post as

delayed data only otherwise feed will be rejected Delayed Data has to be transmitted with

Data Quality Code ldquoLrdquo

6 What is the File Transmission Mechanism FTP and REST

There is no FTP based transmission All upload has to HTTP Rest based transmission The URL

will be provided once the Pre-deployment form for the site is completed There are very specific

URL for the site so the URL is shared only once the Pre-deployment checklist is completed

7 What is Data Quality Code

Here are the data quality code to be used while transmission of the data For detail explanation

of these refer to ISO-7168 specifications

Data Qualifier Code

Calibration Drift D

Calibration mode C

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 24: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Corrected datum O

Estimated datum E

faulty

measurement F

invalid datum I

maintenance mode M

no datum N

usable datum U

zero mode Z

Delayed datum L

8 Who will provide the IDrsquos and how to we apply for it

The IDrsquos will be generated by the KSPCB Central Software Team and available through the

registration link Once the pre-deployment checklist are filled and submitted the system will

create the site and the corresponding IDrsquos and send back to you in email Usually it will take one

day to process the siteid creation as it goes through the verification and approval process

Ensure you provide proper email id during registration

9 Is there any particular Nomenclature which we need to adopt for naming of the csv file

Zip file containing CSV data and Metadata file File name to be

SiteID_MonitoringID_UploadTimezip Data can be uploaded per Monitoring Station

The sample file format is uploaded on KSPCB website

10 Why do we need the metadata file to be uploaded along with data

There will be multiple versions of the upload format that will be transmitted from various sites

as we enhance the specifications to include security features for the API

11 Do we generate our own ID

No The IDrsquos will be shared from KSPCB team based on the Industry Details provided

12 What is raw reading Is the unprocessed data

Yes These are the raw readings directly from the instruments In case of 4-20mA output the

Raw Reading (RAW_READING) will be 102 in mA and the converted and linearized reading

(READING) will be 120 ppm It is mandatory to send the raw reading and linearized reading to

ensure that accuracy of data transmitted

13 What is the time format that is desired

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board

Page 25: Procedure for Uploading/Transmission of Continuous ...keralapcb.nic.in/cmsadmin/fileUploads/Procedure and open...Procedure for Uploading/Transmission of Continuous Monitoring data

Time has to be transmitted as Unix Timestamp Eg 692015 120000 AM IST will be equal to

1433788200 as Unix Time Refer to httpwwwepochconvertercom 14 What is SITE_ID SITE_UID

SITE_ID will be the Industry MIS ID provided by MPCB SITE_UID is the unique key for each

Industry assigned by the software SITE_UID will be generated by software and shared as part of

the pre-deployment checklist email

15 What is UNIT_ID

UNIT_ID will also be an ID generated based on the Industry Details This is the unique id

associated for each of the different measurement units A particular parameter can be

measured in multiple units this provides the correct unit id associated with the measurement

16 What is the exact functionality of the monitoring unit ID

Monitoring unit ID corresponds to the Monitoring Station Location Eg RAW_MILL

BOILER_STACK HOLDING_POND EAST_GATE_AMBIENT etc

17 If there is a defined format provide list of all parameter names and respective IDs

We will use the standard parameter names given in the Industry Details Sheet Based on that

the IDrsquos will be shared

18 Is ANALYZER_ID a unique ID for each analyzer given to each vendor specific analyzer

Yes This will be a Unique ID for each analyzer based on its make and model Eg BAM -1020

Analyzer will have an id analyzer_23 This will be the same for all the Industries having that

analyzer make and model

19 Can Industry transmit data from SCADA or Local PC software

No Industry has to transmit the data directly from the Analyzer without any intermediate or

third party software It has come from the analyzer directly through approved Clients with Open

API Compliance Industry should use data logger modules with approved Client Software to

transmit the data to Kerala State Pollution Control Board