Tag Archives: RMS

RMS integration with Met Office DataPoint. An experiment with APIs…

The latest Rotronic Monitoring System software has been designed specifically for the IoT and IIoT world. We have a wide and growing range of sensors, loggers as well as input and output modules but we will never keep up with the unique demands of our customers. That’s where integration is key for any successful continuous monitoring system!

iot

Hardware can already be integrated via analogue input modules such as our 8ADC and digital devices can be integrated via our RMS-Convertor that can be programmed with custom protocols and functions operate with virtually any device.

Want to cut out the waffle… login and see the live data now using the details below:

https://rms.rotronic.com/rms/
Company Name: Rotronic demo-cloud
User: Weather
Password: guest1234

In addition to hardware, software integration is a must, and not easy when we consider RMS is a fully Gamp6 compliant system and therefore security and traceability is key.

Why not access the SQL DB?

All data on RMS is stored within an SQL database which with suitable rights can be queried easily to pull data out. However injecting data whilst possible triggers our system to report data manipulation. Also direct access to the database presents a security risk and uncontrolled changes to the system, and of course its not possible on shared systems.

That is why we also offer a Restful API through which data can be posted only when configured by users with appropriate permissions and each data stream is securely linked to a onetime token, by no means the best security but suitable for many applications (and of course the whole API function can be disabled if preferred). We of course have software wizards at our HQ that can develop professional integration solutions but as a hobbyist I wanted to see what I could achieve.

 

 

Example API Report

So my plan was to use Python and pull data from the Met Office DataPoint service and inject it directly into our RMS server software so it could visualised, reported and analysed accordingly. Just a few simple steps…

  • Step 1 Get the data from Met Office API
  • Step 2 Create API device in RMS and send your data
  • Step 3 Enjoy graphs, reports and custom alarms

Step 1 – Get the data from Met Office API.

The Met Office API is great you simply need to register to get an api key then get your head around the commands. Once you have that you can request the data you need via a simple url and the information is returned in xml or json format.

API Example
Met Office Datapoint API Response in XML

In Python requesting the last 24 hours of hourly data from location 3212 (Keswick) looks something like this…

Import json, requests
url = ‘http://datapoint.metoffice.gov.uk/public/data/val/wxobs/all/json/3212?res=hourly&key=YOURKEY’ #replace with your Met Office API key!
r = requests.get(url)
metoffice_data = json.loads(r.text)

This gives a Python dictionary with all the json data from which we can request specific values easily for example the latest conditions (no doubt there are more elegant solutions but this works for me).

Hum = (metoffice_data[‘SiteRep’][‘DV’][‘Location’][‘Period’][1][‘Rep’][-1][‘H’])
Temp = (metoffice_data[‘SiteRep’][‘DV’][‘Location’][‘Period’][1][‘Rep’][-1][‘T’])
Pres = (metoffice_data[‘SiteRep’][‘DV’][‘Location’][‘Period’][1][‘Rep’][-1][‘P’])
DewP = (metoffice_data[‘SiteRep’][‘DV’][‘Location’][‘Period’][1][‘Rep’][-1][‘Dp’])

Next we need to create our API device within RMS so it will accept our data

Step 2 – Create API device in RMS

Adding new API device in RMS is simple process, we create the device and define the Name and Serial number.

At this point RMS awaits an Post command in which the additional details are included. Using the Python code below I am able to create a device with 4 measurement points (measured values); Humidity, Temp; Pressure and Dew Point.

import json, requests

url = ‘http://rms.rotronic.com/rmsService/wService3.DeviceService.svc/UpdateDataJson’
headers = {‘Content-Type’ : ‘Application/json’, ‘Expect’ : ‘100-continue’, ‘Connnection’ : ‘Close’, ‘Host’ : ‘rms.rotronic.com’}

payload = {‘Name’:’API_Test’,’Serial’:’12345′,’Values’:[{‘Index’:’1′,’Typ’:’1′,’Value’:’50’},{‘Index’:’2′,’Typ’:’2′,’Value’:’23’},\
{‘Index’:’3′,’Typ’:’16’,’Value’:’5′},{‘Index’:’4′,’Typ’:’48’,’Value’:’1000′}]}
print (payload)
r = requests.post(url, headers=headers, data =json.dumps (payload))

Finally RMS gives us the device ID and API token which must be included in any future post commands.

Combining Step 1 and Step 2 allows us to simply replace my example values above with the real Met Office API data! Run the script hourly or permanently with an hour delay and we have a simple tool proving live data weather data!

Step 3 – Enjoy graphs, reports and custom alarms

With the data in RMS we can easily graph values and create email, sms or phone alarms. Taking the API further I it is possible download live satellite imagery and dynamically update the layouts in RMS!

Example Report

So it turns-out getting data into RMS via the API is simple with a bit of basic code. Of course Met Office data is just an example in modern industrial applications there is so much unique data from devices or software that might be of use and RMS aims to offer a complete monitoring solution not simply for our products!

Be sure to get in touch if you have any questions on the above or have any monitoring requirements. Use the demo login above or visit out RMS website for more details.

Dr Jeremy Wingate
Rotronic UK

 

Ladies Only Exhibition in Perfect Monitored Climate

casestudy

The Hohenzollern family came to Brandenburg 600 years ago, in 1415. Twelve prince-electors, seven kings and three emperors made Prussian, German and European history for almost 500 years.

queen

The women have been some what overlooked by historians, by turning the spotlight on them, the foundation for Prussian castles and gardens has paved the way to discovering hitherto unknown aspects of Prussian and European history. The foundation presents 300 exhibits from national and international donors in a an area of 900 Square meters, which include the oldest authentic woman’s dress in Brandenburg (c.1460) and the coronation cloak of Queen Augusta. 

The painting is that of Queen Augusta of Prussia, which is exhibited in a perfectly climatised room

Room Climate in exhibitions 

The climate and lighting are the most influential factors to ensure the preservation of museum exhibits, because they can cause damage by accelerating chemical and biological degradation processes. In recent decades, the exhibition sector has developed a standard for conservation conditions in exhibitions. For those with the most varied works of art, temperatures of 18°c-22°c and relative humidity around 50 %RH with slight variations, and lighting of 50 to 200 Lux, are striven for, depending on the sensitivity of the materials.

Theater “Ladies Only”

The theater in Charlottenburg has no central air conditioning system. The room climate is influenced by a massive building shell, with masonry walls some as thick as 80cm, solid, reinforced concrete ceilings and floors, and composite windows with double glazing. To reduce warming through sunlight, the windows on the south side have been given sunshades for the duration of the exhibition.

Measuring Equipment 

The foundation has until now had no experience with using the building as an exhibition area. For this reason there were very high demands on the quality and availability of the measurement data. The concept for the exhibition combines a large number of works of art made of the most varied and sensitive materials, understanding of measurements is developed over days, months and years.

“The Rotronic measuring system was convincing because of its high degree of data  security, but also because of its flexibility, low maintenance costs and simple operation.” Wulf Eckermann – Stiftung Preussische Schlosser, Germany

Rotronic Data Loggers

Suitable for a wide range of humidity and temperature monitoring tasks, Wireless transmission – Possible over distances of up to 100m.

log-hc2-rc_mit_clip_3Saves on wiring costs, and the data can be collected and recorded from inaccessible points quickly and easily. Thanks to the combination of wireless transmission and data logger, the greatest possible reliability against failure is ensured. Devices can be configured and read out via the HW4 software and now our latest web or server enabled RMS software. Application uses include: Meteorology, Food Industry, Building Technology, Museums, Environmental/Laboratory equipment, research an development, Pharmaceutical/chemical/logistics and textile industry.

Wireless data loggers for active monitoring

To monitor the climatic conditions reliably and flexibly, HL-RC-B wireless data loggers are used. The measured values are recorded locally and safe from manipulation in a memory with a capacity of 500,000 values. With no cabling requirement, and without provision of an infrastructure such as a LAN or power outlets, the loggers are mounted unobtrusively on walls and in glass cases, thus impinging only minimally on the exhibition concept.

For details on any of our products please visit our website