In this two-part blog I am going to outline my own journey with IoT, IIoT, the cloud and cloud to cloud communications. IEC 61508 was published in 1998 and then revised in 2010. There is very little on it regarding new technologies including the cloud. There is however a bar on the use of AI in a safety system. To a large extent what goes in a standard depends on the skillfulness of the volunteer experts who write the standards as safety people for all sectors can be expected to be conservative and suspicious of new technology. Never-the-less safety documents including the machinery directive will suffice for the use of state of the art in safety (a future blog). 

I had often heard of cloud to cloud communications, restful APIs, JSON, etcetera but it was an academic knowledge. Last spring, I decided to buy a Samsung Home Automation system so I went out and purchased their starter kit; since then I have learned a lot more.

I chose the Samsung home automation system because it is the most open-source of the big name systems and it comes with Zigbee and Zwave if plugged into your wireless router and it has wired LAN and WAN capabilities with Bluetooth promised (since this is an Engineering blog, for a tear down of a SmartThings hub see here). 

Figure 1 - Samsung home automation starter kit

The starter kit comes with the hub, a smart plug, a multi-sensor for use as a door opening sensor, a PIR sensor and a presence sensor for putting in your car or on a pet. Setup was pretty easy, and I quickly bought more smart plugs, multi-sensors and PIR sensors. Within no time at all I had lights coming on when you walk into a room and turning off after your leave. This automation was based on already written smart apps which you could configure from your phone using a menu system – which light to turn on – which sensor to use as a detector.

Soon after I bought a few Fibaro relays which are small enough to go behind light switches and ideal to put in a heating system if you don’t want to buy a dedicated system like those from Nest. It is at this point that you need to start getting acquainted with the SmartThings IDE and write your own Smart Apps and Device handlers using the Groovy programming language.

Given the price of some of the peripherals the next stage is to wonder if you could integrate a Raspberry Pi and the answer is yes you can. However, some way down that path I discovered the Arduino and more precisely the ESP8266 implementation of the Arduino. These little modules can be bought for prices as low as Euro 2/$3 and can be programmed with the standard Arduino IDE. Most intriguingly they come with built in WiFi and a full TCP/IP stack.

Figure 3 - ESP8266 module

Bringing one up on your home WiFi network is very fast once you figure out how to connect them to the USB port for programming. Perhaps 20 lines of Arduino code to launch a webserver that will respond to commands from the local network.

For Euro 5/Dollar 6 you can buy a relay module on which to mount one of the ESP8266 and then you are able to turn off almost any load, DC or AC.  

Figure 4 - ESP8266 mounted on a relay board

Buying a plastic case to put it in costs almost more than the electronics. Sockets designed to be controlled using 433MHz transmitters are a lot cheaper than WiFi plugs and don’t require another hub or app to configure.

It turns out you can buy a 433MHz sniffer board and a transmitter board for a few euro/dollars and easily close a 433MHz controller. Paired with a web browser you can now control the older 433MHz plugs over the web and therefore from the SmartThings hub and app.

Paired with an easy to program ESP8266 board called a Wemos D1 Mini and an open source RCSwitch library for the Arduino and the previously mentioned library for WiFi you are good to go.

Sometime during the year, I acquired an Alexa and started using cloud to cloud communications. The Alexa can talk to the SmartThings hub so that if you ask Alexa to turn on or off the lights in the hall it happens magically and instantly. I then also discovered the Thingspeak IoT platform (sign up with a free account) with MATLAB analytics. Google online for the code to implement a Smart App for the SmartThings platform and you are very quickly able to upload the temperature readings from the SmartThings presence sensors to the web.

It was at this point I began to wonder what was so wrong with the thought of safety in the cloud provided the time constraints could be met.  The response timer for even the hacked together system above seems good and I’m sure a proper industrial grade system could do a lot better. However, my thoughts on that will be in part 2 of the blog. In a future blog I will examine what guidance is available for the use of cloud to cloud communications in a safety system.

This week’s video is not really related to the topic but does show the strength of the human spirit and is particularly appropriate at the start of the year where people might be considering a new year’s resolution to take up more exercise – see https://www.youtube.com/watch?v=X4A4n1T0fg0

However, I’m not sure I can vouch for the safety of it. 

Anonymous