User Tools

Site Tools


sib:boliden:dataformat

This is an old revision of the document!


Boliden standard data formats

This topic describes the standard data formats for use in the Boliden SIB platform. The internal MQTT transfer document formats are not described but all data that is communicated externally and between integration components should follow these format guidelines.

alarm01

Description: Format of general Boliden alarm
Version: 1.0
Changed: 2019-04-03

alarm01_fmt.js
$schema: "http://json-schema.org/draft-07/schema#",
  $id: "http://sib.boliden.com/alarm01",
  title: "alarm01",
  description: "Format for general alarm information",
  required: ["active","assettag","name","severity","site","source","timestamp"],
  type: "object",
  properties: {
	active: {
		type: "boolean",
		description: "true if this alarm is currently active, otherwise false"
	},
	assettag: {
		type: "string",
		description: "The BOLIDEN ASSETTAG for the asset to which the meter is connected"
	},
	description: {
		type: "string",
		description: "Optional description of this alarm"
	},
	id: {
		type: "string",
		description: "Optional source system ID of this alarm"
	},
	name: {
		type: "string",
		description: "The name of the alarm"
	},
	position: {
		type: "object",
		description: "Optional position of the alarm",
		properties: {
			lat: {
				type: "number",
				description: "Latitude"
			},
			lng: {
				type: "number",
				description: "Longitude"
			},
			elev: {
				type: "number",
				description: "Optional elevation of position"
			},
			fmt: {
				type: "string",
				description: "Optional description of position format"
			}
		}
	},
	severity: {
		type: "string",
		description: "The severity of this alarm",
		enum: ["warning","critical"]
	},
    site: {
		type: "string",
		description: "The site the specified meter is at"
    },
    source: {
		type: "string",
		description: "Identifier of the source system of the change"
    },
	timestamp: {
		type: "integer",
		description: "The javascript timestamp for when the value was changed"
    }
  }

machineData01

Description: Format of machine data fetched from the onboard systems on mobile machines
Version: 1.0
Changed: 2019-03-27

machineData01_fmt.js
{
{
  $schema: "http://json-schema.org/draft-07/schema#",
  $id: "http://sib.boliden.com/machineData01",
  title: "machineData01",
  description: "Format of machine data fetched from the onboard systems on mobile machines",
  required: ["assettag", "source", "time", "site"],
  type: "object",
  properties: {
    assettag: {
      type: "string",
      description: "The Boliden ASSETTAG for the machine"
    },
    source: {
      type: "object",
      required: ["id","system"],
      properties: {
        id: {
          type: "string",
          description: "The system ID in the originating system"
        },
        system: {
          type: "string",
          description: "The originating system"
        },
        site: {
          type: "string",
          description: "The site on which the system is running"
        }
      }
    },
    serialNumber: {
      type: "string",
      description: "The machines Serial Number"
    },
    type: {
      type: "string",
      description: "Machine type"
    },
    model: {
      type: "string",
      description: "Machine model"
    },
    timezone: {
      type: "string",
      description: "Timezone where machine is"
    },
    time: {
      type: "object",
      required: ["lastconnect", "lastdata"],
      properties: {
        lastconnect: {
          type: "datetime",
          description: "Time of last machine connection"
        },
        lastdata: {
          type: "datetime",
          description: "Time of last data transfer"
        }
      }
    },
    company: {
      type: "string",
      description: "Company owning machine"
    },
    site: {
      type: "string",
      description: "Site owning machine"
    },
    position: {
      type: "object",
      required: ["lat", "lng"],
      properties: {
        lat: {
          type: "number"
        },
        lng: {
          type: "number"
        }
      }
    },
    status: {
      type: "array",
	items: {
	  type: "object",
	  properties: {
	    meter: {
	      type: "string",
	      enum: ["engine",
		     "idle", 
		     "loading", 
		     "tramminghours", 
		     "utilization", 
		     "drill", 
		     "pump"],
	      description: "The meter name"
	    },
	    type: {
	      type: "string",
	      enum: ["hrs", "tonnes", "mtrs"],
	      description: "The type of the meter"
	    },
	    node: {
	      type: "number",
	      description: "The nodeId of the value"
	    },
	    value: {
	      type: "number",
	      description: "The meter value"
	    },
	    timestamp: {
	      type: "datetime",
	      description: "Date and time of the value"
	    }
	  }
	}
      }
    },
    alarms: {
      type: "array", 
      items: {
        type: "object",
        properties: {
          id: {
            type: "string",
            description: "Alarm ID"
          },
          name: {
            type: "string",
            description: "Alarm system name"
          },
          description: {
            type: "string",
            description: "Alarm description"
          },
          severity: {
            type: "string",
            description: "Severity of alarm"
          },
          time: {
            type: "datetime",
            description: "Time of alarm"
          },
          active: {
            type: "boolean",
            description: "The active flag of the alarm"
          }
        }
      }
    },
    service: {
      type: "array",
      items: {
        type: "object",
        properties: {
          id: {
            type: "string",
            description: "Service system ID"
          },
          interval: {
            type: "string",
            description: "Service interval (hours)"
          },
          description: {
            type: "string",
            description: "Service text description"
          },
          type: {
            type: "string",
            description: "Type of service, ie 'Engine', 'Hydraulic' etc"
          },
          node: {
            type: "string",
            description: "Additinal identifier to identify what equipment needs service"
          },
          predictedDate: {
            type: "string",
            description: "Datetime prediction on when this service will be due"
          },
          hoursLeft: {
            type: "string",
            description: "Hours left to this service"
          },
          status: {
            type: "string",
            description: "The status of this service instance, 'Overdue', 'Upcoming' etc
          }
        }
      }
    },
    statistics: {
      type: "array",
      items: {
        type: "object",
        properties: {
          period: {
            type: "string",
            description: "day/week/month/year - the period this statistics covers"
          },
          data: {
            type: "object",
            description: "Object where the elements are [statdesc]:[value]
          }
        }
      }
    }
  }
}

meterReading01

Description: Format of general meter readings
Version: 1.2
Changed: 2019-05-28

meterReading01_fmt.js
  $schema: "http://json-schema.org/draft-07/schema#",
  $id: "http://sib.boliden.com/meterReading01",
  title: "meterReading01",
  description: "Format for general meter reading information",
  required: ["site","assettag","meter", "value", "timestamp", "source"],
  type: "object",
  properties: {
    site: {
      type: "string",
      description: "The site the specified meter is at"
    },
    assettag: {
      type: "string",
      description: "The BOLIDEN ASSETTAG for the asset to which the meter is connected"
    },
    meter: {
      type: "string",
      enum:["engine",
	    "idle", 
	    "loading", 
	    "tramming", 
	    "drill", 
	    "pump",
            "utilization"],
      description: "The ID of the meter to set"
    },
    node: {
        type: "string",
        description: "The node number, ie if a machine has two engines or two pumps this identifies which"
    },
    type: {
	type: "string",
	enum: ["hrs", "tonnes", "mtrs", "temp_c", "fuel_lph", "rpm", "passthrough", "state"],
	description: "The type of the meter, if the type is set to passthrough no translation will be done and the value from the meter field will be set as metername"
    },
    value: {
      type: "string",
      description: "The new value of the meter"
    },
    timestamp: {
      type: "integer",
      description: "The javascript timestamp for when the value was changed"
    },
    source: {
      type: "string",
      description: "Identifier of the source system of the change"
    },
    duration: {
      type: "string",
      description: "The duration of the described event"
    }
  }

Integration specific data formats

g2i.004

g2i.004:mqttlistener:1

Description: Input format to the MQTT Listener for Maximo call
Version: 1.0
Changed: 2018-12-11

g2i.004:mqttlistener:1.js
  $schema: "http://json-schema.org/draft-07/schema#",
  $id: "http://sib.boliden.com/g2i.004:mqttlistener:1",
  title: "g2i.004:mqttlistener:1",
  description: "Input format for MQTT maximo call",
  required: ["auth","method","os"],
  type: "object",
  properties: {
    auth: {
      type: "string",
      description: "Standard HTTP Basic auth string for user/pass to maximo"
    },
    method: {
      type: "string",
      enum: ["GET", "POST"],
      description: "The HTTP method to use in the call to Maximo"
    },
    objectid: {
      type: "integer",
      description: "The ID of the row in maximos OS to query, required for POST operations",
    },
    os: {
      type: "string",
      desciption: "The Maximo OBJECT STRUCTURE to use"
    },
    filter: {
      type: "object",
      required: ["fields"],
      description: "Required for GET operations if objectid is not set",
      properties: {
        maxrows: {
          type: "integer",
          description: "The maximum number of rows to fecth"
        },
        offset: {
          type: "integer",
          description: "The row offset at where to start fetching data"
        },
        fields: {
          type: "object",
          description: "MongoDB-type filter for choosing what data to retreive"
        }
      }
    },
    data: {
      type: "object",
      description: "{fieldname}:{value} pairs for data to set to the row in maximos OS, required for POST operations"
    }
  }
sib/boliden/dataformat.1559027827.txt.gz · Last modified: 2019/05/28 07:17 by hubbe