Rotronic Monitoring System integration. Pulling data into your systems

Data Integration is Key

Data integration is one of the primary requirements for many of our customers. I have previously discussed how RMS easily supports the integration of external data, but this posts takes a look at how RMS allows you the export data.

https___www.rotronic.com_media_events_images_1495454818_RMS_ML_GW

Of course RMS provides excellent graphing, statics and reporting as part of its core functionality, however here we are discussing the tools that will more likely be used for Machine to Machine (M2M) integration.

m2m

Machine to Machine (M2M) integration is absolutely key as data is increasingly being used for different purposes through businesses. So whilst RMS provides a highly secure and configurable platform for monitoring and alarming there are many weird and wonderful functions that it cannot provide. In this case we need to pull the data out and use it elsewhere.

Getting Data out of RMS

RMS is an SQL based system so we could of course query the SQL directly however there are many limitations with this approach especially security. Also via our RMS cloud platform absolutely no direct SQL access is available to end users.

Instead RMS supports a RESTful API, we’ll use a simple example to go through the basic steps.

RMS GET API

As before I’ll use some Python scripts in this example but if you prefer, POSTMAN is a great tool for testing these types of APIs.

Let’s breakdown the steps.

  1. Request API token using your username and password
  2. Use Token to request specific data
  3. Use data as required

Step 1 – Request a Token.

For security reasons you cannot simply send a request and get whatever data you desire. First you must request a token from RMS. The token is linked to a user account and will only allow the data that is visible by that user to be accessed. When requesting a token you can also specify how long it is valid for. The maximum length is 30 days.

import json
import requests

url = ‘https://rms.rotronic.com/RMS/API/RequestToken.ashx’
headers = {‘Content-Type’ : ‘Application/json’, ‘Expect’ : ‘100-continue’, ‘Connnection’ : ‘Close’, ‘Host’ : ‘rms.rotronic.com’}

UsrID = “1”
User= “Jeremy”
PW = “########”
Exp = “30”

get_payload = {‘UserId’:UsrID,’Username’:User,’Password’:PW,’RequestType’:’ DataHistory’,’ExpirationDays’: Exp}
api_get = requests.post(url, headers=headers, data =json.dumps (get_payload))
token = json.loads(api_get.content)
token = token.get(‘Token’)

The above request with suitable credentials will return something along these lines.

{‘UserId’: 1, ‘RequestType’: ‘DataHistory’, ‘Token’: ‘jUsTaNeXaMpLe_HRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySWQiOjM5MzEsIlJlcXVlc3RUeXBlIjoiRGF0YUhpc3RvcnkiLCJFeHBpcmF0aW9uIjoiMjAxOS0wNC0wM1QxNToyMzoyMC44MTgwODM4WiJ9.rtHHKvrE-7jnMNHUGazso_jUsTaNeXaMpLe’, ‘Status’: ‘OK’}

The API token being the jumble of text above. With the token in hand we can proceed with requesting our data.

Step 2 – Request Data

To request data we need the measuring point ID for the data we need which can be obtained from the RMS interface (every measured parameter has a unique ID within RMS that will not change and cannot be reused). We also define the From and To ranges as well as the number of values we wish to obtain (Count).

import json
import requests

url = ‘https://rms.rotronic.com/RMS/API/DataHistory.ashx’
headers = {‘Content-Type’ : ‘Application/json’, ‘Expect’ : ‘100-continue’, ‘Connnection’ : ‘Close’, ‘Host’ : ‘rms.rotronic.com’}

MPTID = “20”
From = “2019-03-04T08:00:00”
To = “2019-03-04T09:00:00”
Count = “10”
Token = “token from step 1”

post_payload = {‘ID’: MPTID,’From’: From,’To’:To,’Count’:Count,’Order’:’Asc’,’Token’: Token}
api_get = requests.post(url, headers=headers, data =json.dumps (post_payload))
data = json.loads(api_get.content)
print (data)

The above request with suitable details will return something along these lines.

{‘Status’: ‘OK’, ‘ID’: 20, ‘Name’: ‘Humidity-18071604′, ‘Parameter’: ‘Humidity‘, ‘Unit’: ‘%rh‘, ‘Data’: [{‘Time’: ‘2019-03-04T08:00:14+01:00′, ‘Value’: ‘29.45%rh‘}, {‘Time’: ‘2019-03-04T08:05:14+01:00’, ‘Value’: ‘29.80%rh’}, {‘Time’: ‘2019-03-04T08:10:14+01:00’, ‘Value’: ‘29.61%rh’}, {‘Time’: ‘2019-03-04T08:15:14+01:00’, ‘Value’: ‘29.29%rh’}, {‘Time’: ‘2019-03-04T08:20:14+01:00’, ‘Value’: ‘29.80%rh’}]}

Step 3 – Use the data

So we have our data in JSON format from here it’s an easy step to chopping out the specific values and handing them over to some other code, machine or simply displaying them for yourself.

The flexibility of RMS is an important requirement for our customers especially those with existing systems. Using RMS as the central platform ensures precision measurements, secure and reliable data collection and easy access to data. Using our  APIs then allows this data to be utilised in wider business operations.

integration examples

Customer examples using the API include

  • Live temperature data included in packaging labels
  • Automated calibration certificate generation using reference values from RMS
  • Visualisation of RMS data on 3rd party software for building efficiency displays

Conclusion

This article focuses on our RESTful API however we have many other options for integration of data including relay output modules, analogue output modules, direct SQL connection. In addition our RMS-Integrator hardware offers direct communication with devices via MODBUS, SNMP and MySQL.

So the message is simple; if you have requirements RMS can usually deliver what you need. Please contact us and we will be happy to discuss your project be it large or small.

Dr Jeremy Wingate
Rotronic UK

Temperature Mapping & GDP-Compliant Warehouse Qualification

casestudy

At the World Cargo Centre (WCC) Leipzig/Halle airport a cold store for air freight shipments was built for aircraft loads of temperature-sensitive goods to enable them to be stored at correct temperatures.

The cold store, operated by PortGround, can store goods at temperatures of +2°C to +25°C. Rotronic carried out a winter mapping assessment of the climate conditions. To ensure that customer requirements of PortGround GmbH were met.

Before mapping can take place in any warehouse or other storage facility, you must ensure you  identify the risk areas that could cause deviations in temperature and humidity leading to potential product quality problems.

General procedure
The control and fluidity of storage spaces are influenced by a number of factors. Once the risk areas have been identified, before mapping takes place a test must be developed, providing the following Information and the basis for each decision:

• Types of data to be generated – e.g. temperature, relative humidity and their measurement intervals
• Number of sensors required
• Deciding the positioning of the sensors
• Duration of the investigation
• Summer and winter mapping
• Requirements for calibration of the data loggers
• Acceptable limit values for temperature and relative humidity
• Report generation requirements

The data loggers are then positioned in the warehouse according to the model. Additional data loggers are then used in the identified risk areas where draughts from loading ramps, heat or cold radiation from external walls, solar heating through windows, heating by lamps, air circulation from traffic or the HVAC system could occur. Many factors can impact temperature and humidity conditions which is why the initial risk assessment of the specific site is critical.

Rotronic offers several solutions for thermal mapping, including stand alone data loggers and wireless data loggers. Stand alone data loggers are batch configured and data is batch downloaded for analysis and reporting via our HW4 software. Wireless loggers connect to our RMS platform and can provide live data during the mapping or alternatively where live connection is not possible or required data is automatically downloaded once loggers are back in range of a suitable gateway, via RMS data can be automatically analysed for deviations. For example our engineers can park at the office car park and all the devices automatically reconnect, download and deviation reports are generated without a single click of a button.

Based on the project master plan final reports will be generated with deviations listed. The basic information shown is listed below:

• Data with time and date
• Calculated values such as average, standard deviation, temperature minimum, temperature maximum, MKT.
• Deviation details and summary
• The characteristic of all data loggers over the test period
• The device settings
• Date and time of the test
• The calibration information

The position of individual sensors can be displayed in a graph to provide a quick overview of possible extremes in temperature and relative humidity. The outside temperature and humidity can also be recorded. Then, for example, a temperature peak can be associated with a time when the gates of the loading ramp were open.

hl-1d1HygroLog HL-1D is suitable for monitoring and recording conditions for  a wide range of applications across all industries, in commerce and for research organisations.

The compact logger is particularly suitable for monitoring high value products of all types during transportation to ensure that quality is maintained.

Simple USB interface and low cost makes these devices ideal for thermal mapping projects.

https___www.rotronic.com_media_events_images_1495454818_RMS_ML_GW

RMS-LOG and RMS-MLOG devices offer benefits of live data allowing monitoring of the mapping data ensuring devices are operating normally.  Automated download and reporting is a luxury but for large projects this can save significant time. The RMS-LOG provides accuracy of 0.8%rh and 0.1°C and with interchangeable probes calibration costs can be reduced.

Contact us to discuss thermal mapping services or products so you can undertake or thermal mapping yourself.

Flughafen Leipzig Halle GmbH – is a Subsidiary of Mitteledeutsche Flaghafen AG. Around 2.4 million passengers and 1.2 million tonnes of air freight were registered in 2017, making Leipzig airport the second largest cargo airport in Germany.

PortGround GmbH is a subsidiary of Mitteldeutsche Flaghafen AG, it offers ground handling, freight and other comprehensive services around the clock at the airports in Dresden and Leipzig/Halle airports.

PST Companies

Capture