Tuesday, 12 September 2017

Real World Examples of IoT (Internet of Things) - How will IoT change our lives?

IoT (Internet of Things) is going to change our lives to a large extent. In the coming years, we will realize the real potential of IoT. Below are some real world examples of IoT.

Lets consider IoT enabled Alarm Clock or say Smart Alarm.

Imagine you wake up at 7am every day to go to work. Your alarm clock does the job of waking you just fine. That is, until something goes wrong. Your train is cancelled and you have to drive to work instead. The only problem is that it takes longer to drive, and you would have needed to get up at 6.45am to avoid being late. Oh, and it’s pouring with rain, so you’ll need to drive slower than usual. 

A connected or IoT-enabled alarm clock would reset itself based on all these factors, to ensure you got to work on time. It could recognize that your usual train is cancelled, calculate the driving distance and travel time for your alternative route to work, check the weather and factor in slower travelling speed because of heavy rain, and calculate when it needs to wake you up so you’re not late. 

If it’s super-smart, if might even sync with your IoT-enabled coffee maker, to ensure your morning caffeine’s ready to go when you get up.

Now consider IoT enabled car or say connected cars.

Having been woken by your smart alarm, you’re now driving to work. On comes the engine light. You’d rather not head straight to the garage, but what if it’s something urgent? In a connected car, the sensor that triggered the check engine light would communicate with others in the car. A component called the diagnostic bus collects data from these sensors and passes it to a gateway in the car, which sends the most relevant information to the manufacturer’s platform. The manufacturer can use data from the car to offer you an appointment to get the part fixed, send you directions to the nearest dealer, and make sure the correct replacement part is ordered so it’s ready for you when you show up.

You are on your way to a meeting; your car could have access to your calendar and already know the best route to take. If the traffic is heavy your car might send a text to the other party notifying them that you will be late. 

Now consider IoT enabled homes or say smart homes.

Take an instance where you need to monitor your home or child when you are away. A simple solution would be to fix an IP camera and monitor its feed using a web or mobile application. You can even hire a babysitter. The former option can give you the complete monitoring data, while the latter cannot. If you fix sensors or devices, which can be reached from anywhere, you have the flexibility to monitor as well as control those devices to the best of their ability; this can make your home or baby 99.99% secure. 

Your home security system, which already enables you to remotely control your locks and thermostats, can cool down your home and open your windows, based on your preferences.

British Gas's Hive Active Heating enables consumers to control their home heating from their smartphone, laptop or tablet. It even has the ability to turn off when no one is home by detecting whether your smartphone is in the house or not.

IoT can help in reducing accidents and save valuable human life.

Let’s look at one example. In 2007, a bridge collapsed in Minnesota, killing many people, because of steel plates that were inadequate to handle the bridge’s load. 

When we rebuild bridges, we can use smart cement: cement equipped with sensors to monitor stresses, cracks, and war-pages. This is cement that alerts us to fix problems before they cause a catastrophe. And these technologies aren’t limited to the bridge’s structure.

If there’s ice on the bridge, the same sensors in the concrete will detect it and communicate the information via the wireless internet to your car. Once your car knows there’s a hazard ahead, it will instruct the driver to slow down, and if the driver doesn’t, then the car will slow down for him.

And thus bridges become smart bridges, and cars smart cars. And soon, we have smart cities, and….

Airplane manufacturers are building air-frames with networked sensors that send continuous data on product wear and tear to their computers, allowing for proactive maintenance and reducing unplanned downtime. 

Now consider some more examples of Real World IoT:

Some insurance companies, for example, are offering to install location sensors in customers’ cars. That allows these companies to base the price of policies on how a car is driven as well as where it travels. Pricing can be customized to the actual risks of operating a vehicle rather than based on proxies such as a driver’s age, gender, or place of residence.

Sensors in even the domestic animals. In the world of IoT, even the domestic animals will be connected and monitored with the help of embedded sensors. This allows farmers to monitor their animal's health and track their movements, ensuring a healthier, more plentiful supply of milk and meat for people to consume. 

Some more...

What if your office equipment knew when it was running low on supplies and automatically re-ordered more? 

What if your refrigerators can warn you when you’re out of milk. 

What if smart dustbins can signal when they need to be emptied.

What if smart tea maker that knows just when you’re in need of a cup of tea.

Truly speaking, you can think of infinite examples of IoT in the real world. It cannot be summarized in an article. There is no limit. Just keep thinking...

Other articles on IoT:

Internet of Things (IoT) - Next Stage of Information Revolution

Internet of Things (IoT) - Next Stage of Information Revolution

The term "Internet of Things" was first coined by Kevin Ashton, cofounder and executive director of the Auto-ID Center at MIT in 1999.

The "Internet of Things (IoT)" is the next stage of the Information Revolution. 

What is IoT (Internet of Things)?

IoT refers to the connection of devices (other than computers, smartphones and tablets) to the Internet via embedded sensors. It allows devices to talk to us and talk to each other. So, IoT can also be defined as a network of internet-connected devices able to collect and exchange data using embedded sensors. 

A thing, in the "Internet of Things", can be a person with a heart monitor implant, a farm animal with a bio-chip transponder, an automobile that has built-in sensors to alert the driver when tire pressure is low or any other natural or man-made object (almost anything else you can think of) that can be assigned an IP address and provided with the ability to transfer data over a network with the help of embedded sensors. 

Earlier the data was created by people on the internet, but now the data will be created by the things (living or non-living) without any human intervention.

IoT Devices

Any stand-alone internet-connected device that can be monitored and/or controlled from anywhere. It should have embedded sensors and on/off switch. It should have the ability to represent itself digitally means it can be assigned an IP address and have the ability to collect and transfer data over a network without manual assistance or intervention. 

Due to the limited address space of IPv4 (which allows for 4.3 billion unique addresses), IoT devices will have to use the next generation of the Internet protocol (IPv6) to scale to the extremely large address space required.

Examples of IoT Devices: Smartwatch, TV,  Refrigerators, Washing Machines, Kitchen Appliances, Thermostats, Cars, Switches, Lights, Blood Pressure and Heart Rate Monitors, Smart grids, Virtual Power Plants, Intelligent Transportation and anything you can think of.

Basically, if your fridge or TV has an Internet connection, then it becomes an IoT device.

If your coffee maker connects to an app on your smartphone that allows you to begin brewing with a tap on your screen, that coffee maker becomes part of the Internet of Things.

As per IoT, Anything that can be connected, will be connected. Connect everything in this world. The Ultimate Goal of IOT is to Automate Human Life. In this way, IoT creates a relationship among people-people, people-things, and things-things.

Applications of IoT

Wearables (like Smartwatches to track health and exercise progress, sleep patterns, send text messages and calls).

Smart Home (hundreds of products in the market that users can control even with their voices).

Smart Cities (solves traffic congestion issues, smart parking, reduces noise, crime, and pollution).

Connected Cars (to assist drivers and reduce accidents).

Internet of Things Devices & Examples

Amazon Echo - Smart Home: The Amazon Echo works through its voice assistant, Alexa, which users can talk to in order to perform a variety of functions. Users can tell Alexa to play music, provide a weather report, get sports scores, order an Uber, and more.

Fitbit One - Wearables: The Fitbit One tracks your steps, floors climbed, calories burned, and sleep quality. The device also wirelessly syncs with computers and smartphones in order to transmit your fitness data in understandable charts to monitor your progress.

Barcelona - Smart Cities: The Spanish city is one of the foremost smart cities in the world after it implemented several IoT initiatives that have helped enhance smart parking and the environment.

AT&T - Connected Car: AT&T added 1.3 million cars to its network in the second quarter of 2016, bringing the total number of cars it connects to 9.5 million. Drivers don't have to subscribe or pay a monthly fee for data in order for AT&T to count them as subscribers.

Other articles on IoT:

Real World Examples of IoT (Internet of Things) - How will IoT change our lives?

Monday, 10 July 2017

Computer Science Internationalization - Unicode Encoding & Decoding

Several years ago I devised this visual and fun way to teach and practise encoding and decoding Unicode. I used this method in my International Computing class. This method involves use of pencil and eraser.

The codepoints and the UTF-8 are all written in hexadecimal(hex). The binary bits are an intermediate form for the purposes of encoding and decoding.

We start with the following form which is designed for encoding Unicode codepoints to UTF-8 and decoding UTF-8 to Unicode codepoints.
Encoding: We will start with encoding Unicode codepoints to UTF-8.

The first thing we can do is fill in the fixed bits. They are the fixed bits defined by the encoding scheme. I have entered the fixed bits in red to make them distinct from variable bits.
Now we will write one or more Unicode codepoints on the form. These will be the codepoints we will encode into UTF-8. The codepoints should be written in hexadecimal. I will use the codepoints U+0444 and U+597D.

So, how do we determine where the codepoints go on the form. We need to look at the free bits to determine the range of values that can be accommodated.

  • 1 byte row - 7 free variable bits giving a range of 0 ➔ 7F
  • 2 byte row - 11 free variable bits giving a range of 80 ➔ 7FF
  • 3 byte row - 16 free variable bits giving a range of 800 ➔ FFFF
  • 4 byte row - 21 free variable bits giving a range of 10000 ➔ 1FFFFF (the actual maximum value of a codepoint is 10FFFF)
Now we know the ranges we can put U+0444 and U+597D in the correct places of the form.

We have empty boxes into which we write the binary values of the codepoints.
Finally, we take the complete bytes and write them as hexadecimal values to form the UTF-8 encoded forms. U+0444 encoded is D184, U+597D encoded is E5A5BD.
Decoding: Now onto decoding from UTF-8 to Unicode codepoints. We will decode the UTF-8 F0AA9FB7 which I have entered onto the form. I have used spaces on the form to make the byte boundaries more obvious.
Complete the bytes by writing the binary variable values.
Extract the variable binary values to form the hex Unicode codepoint U+2A7F7.
Whilst I was at it, I completed a single byte entry. The single byte characters are ASCII characters. ASCII is a subset of Unicode.

It is a Unicode convention, when writing codepoints, to use a minimum of four hex digits. So for codepoints <1000, one should left pad with zeroes. Hence my entries U+0444 and U+0057 rather than U+444 and U+57.

Sunday, 2 July 2017

Computer Science Internationalization - Text Search

So, you have just written some Cool Code which will search for and find occurrences of specified text strings. You have access to Big Data text eg all the text in all public webpages. You will,of course, want to test your Cool Code. Letสผs perform some, seemingly, very simple tests.

Letสผs search for the word 'Scorpion'. Your code works just fine and hence finds all occurrences of the word 'Scorpion'.

Now test with the following two words.

  • Scorpion
  • Scorpion

Your Cool Code works fine as all I have done is applied some CSS styling, thus giving each of the two words differing appearance.

Now test you Cool Code with the following two words.

  • ๐‘†๐‘๐‘œ๐‘Ÿ๐‘๐‘–๐‘œ๐‘›
  • ๐’๐œ๐จ๐ซ๐ฉ๐ข๐จ๐ง

If you have only programmed for ASCII text then your now not so Cool Code will fail. These two words have differing appearance because they are not made up of the ASCII characters you are familiar with. These words use characters from the Unicode Math Alphanumeric Symbols block, U+1D400-1D4FF.

Should the Math Alphanumeric Symbols Scorpion be treated the same as the ASCII Scorpion wrt the search results of your code? In this context I think "Yes", most definitely. A person reading this blog, for example, will just perceive the word Scorpion whatever characters are used to write the word. The reader may well also visualise the insect with a "sting in the tail"๐Ÿ˜ฑ

What of current working practice?

With twitter, a user has no means of changing text style within a tweet. It has thus become common to use Unicode Math Alphanumeric Symbols to change appearance. I could, for example, use Unicode Math Alphanumeric Symbols to emphasise a word (eg Scorpion) or phrase within a tweet. The meaning of the tweet remains the same.

Google returns the same number of search results whichever of the above forms of Scorpion I use. At time of writing this is "About 144,000,000 results". I deduce Google is treating ASCII Scorpion and Unicode Math Alphanumeric Symbols ๐‘†๐‘๐‘œ๐‘Ÿ๐‘๐‘–๐‘œ๐‘› & ๐’๐œ๐จ๐ซ๐ฉ๐ข๐จ๐ง as equivalent.

Sogou ๆœ็‹— is a Chinese search engine. Using Sogou: ASCII Scorpion returns 93,341 results, Math Alphanumeric Symbols ๐‘†๐‘๐‘œ๐‘Ÿ๐‘๐‘–๐‘œ๐‘› returns 4,738, Math Alphanumeric Symbols ๐’๐œ๐จ๐ซ๐ฉ๐ข๐จ๐ง returns 61. I think it evident that Sogou does not treat my three forms of Scorpion as equivalent.

I side with Google on this.

Here is a taster of what is happening in the behind the scenes technicalities of Unicode. Letสผs take just one of the Unicode Math Alphanumeric Symbols I have used, ๐’ MATHEMATICAL BOLD CAPITAL S U+1D412. If you visit codepoints.net/U+1D412 you will see a wealth of information about this character. Of relevance to this blog is the Decomposition Mapping which is to the, oh so familiar, ASCII uppercase capital S. This Unicode information can be used to compute string equivalents which can then be used for search thus providing all relevant results.

The moral of this "Sting in the Tale" is: If you do not already know it, you must learn Unicode, it is essential.

Friday, 28 April 2017

Computer Science Internationalization - Hieroglyphs in Domain Names

I have been aware for a long time that domains such as .com support many human language scripts. Verisign's .com includes support for Hiragana, Gurmukhi, Han, Tibetan, Sinhala, Devanagari, Hangul and many more.

But what of Verisign's .com equivalents .ใ‚ณใƒ  (Japanese) and .๋‹ท์ปด (Korean)? Both of these support a multitude of human language scripts. The supported scripts for many, but not all, Domains are listed in the IANA Repository of IDN Practices iana.org/domains/idn-tables.

Whilst browsing this repository, I discovered there are sixteen domains, all belonging to Verisign, which support Egyptian Hieroglyphs which I think is totally cool! Verisign's .com, .ใ‚ณใƒ  and .๋‹ท์ปด all support Egyptian Hieroglyphs. This means one can register domain names such as:-

  1. ๐“‡‹๐“ˆ–๐“๐“‚๐“‚‹๐“ˆ–๐“„ฟ๐“๐“‡‹๐“ฏ๐“ˆ–๐“„ฟ๐“ƒญ.com
  2. ๐“‡‹๐“ˆ–๐“๐“‚๐“‚‹๐“ˆ–๐“„ฟ๐“๐“‡‹๐“ฏ๐“ˆ–๐“„ฟ๐“ƒญ.ใ‚ณใƒ 
  3. ๐“‡‹๐“ˆ–๐“๐“‚๐“‚‹๐“ˆ–๐“„ฟ๐“๐“‡‹๐“ฏ๐“ˆ–๐“„ฟ๐“ƒญ.๋‹ท์ปด

It is possible you do not have an Egyptian Hieroglyph font on your device so here are the domain names in image format.

Google provide a free Egyptian Hieroglyph font which you can download from google.com/get/noto/

Does the Egyptian Hieroglyph string I have used above mean anything? It is actually a transliteration of the English word international. I used ngm.nationalgeographic.com/ngm/egypt/translator.html for the transliteration. The hieroglyphs translator presents the Egyptian Hieroglyphs as images. So, no simple copy and paste of Egyptian Hieroglyph text. I had to match with the appropriate Unicode characters by visual inspection. I cannot guarantee I made all the correct matches but I think I have them correct.

Here are some registered and live Egyptian Hieroglyph Domain Names egyptianhieroglyphic.com/egypt/egyptian-hieroglyphics/

Friday, 31 March 2017

Computer Science Internationalization - Adaptive URL

A URL can consist of a Domain Name and a pathname. In the examples below x.y.z represents the Domain Name, the remainder being the pathname. My experience of the internet is that the pathname is usually written in English or more accurately ASCII. The below ASCII pathname represents a multi-page website in the form of a journey from home to a hotel in Korea.

x.y.z/home/bus/airplane/korea/taxi/hotel

Websites, such as Google, adapt the language of their text content according to the browser preferred display language (BL). This browser preferred language can be set by the user. Letสผs go one step further than Google and adapt the language of the URL pathname according to the BL. Here is the ASCII pathname rewritten into Chinese, Japanese and Korean.

x.y.z/ๅฎถ/ๅ…ฌๅ…ฑๆฑฝ่ฝฆ/้ฃžๆœบ/้Ÿฉๅ›ฝ/ๅ‡บ็งŸ่ฝฆ/้ฅญๅบ—

x.y.z/ใƒ›ใƒผใƒ /ใƒใ‚น/้ฃ›่กŒๆฉŸ/้Ÿ“ๅ›ฝ/ใ‚ฟใ‚ฏใ‚ทใƒผ/ใƒ›ใƒ†ใƒซ

x.y.z/ํ™ˆ/๋ฒ„์Šค/๋น„ํ–‰๊ธฐ/ํ•œ๊ตญ/ํƒ์‹œ/ํ˜ธํ…”

So, how do we implement these language adaptive URL parthnames? Firstly, we need to programmatically determine the BL. One way of achieving this is to examine the Accept-Language http header sent from the browser to the server. This will contain one or more language tags. If there is more than one language tag they are presented in priority order. Language tags can take many forms. They include: zh, zh-CN and cmn for Mandarin Chinese; ja for Japanese and ko for Korean. Now that we can determine the BL we can select the appropriate URL pathname, thus internationalizing our website with a language adaptive URL pathname.

On a Linux machine, each component of the pathname will be a directory. In my schema I am assuming an index.html or index.php, per directory. A requirement of this schema is that we do not want a directory hierarchy for each language, nor do we want an index.html or index.php for each language.

My native language is English so I will make my master pathname directory names English ie home, bus, airplane, korea, taxi and hotel. I will make the Chinese, Japanese and Korean directory names as aliases to the English named master directories. This can be easily achieved on Linux with the ln -s command, where ln means link and the -s option means create symbolic link, as opposed to a hard link.

ln -s home ๅฎถ
ln -s home ใƒ›ใƒผใƒ 
ln -s home ํ™ˆ

ln -s hotel ้ฅญๅบ—
ln -s hotel ใƒ›ใƒ†ใƒซ
ln -s hotel ํ˜ธํ…”

What if your native language is not English? In that case, create the master pathname directory names in your native language. If your native language is Korean then the master directory names will be ์ง‘, ๋ฒ„์Šค, ๋น„ํ–‰๊ธฐ, ํ•œ๊ตญ, ํƒ์‹œ and ํ˜ธํ…” and your links will be:

ln -s ํ™ˆ home
ln -s ํ™ˆ ๅฎถ
ln -s ํ™ˆ ใƒ›ใƒผใƒ 

ln -s ํ˜ธํ…” hotel
ln -s ํ˜ธํ…” ้ฅญๅบ—
ln -s ํ˜ธํ…” ใƒ›ใƒ†ใƒซ

Emoji are hugely popular so letสผs construct a totally cool Emoji pathname.

x.y.z/๐Ÿก/๐ŸšŒ/✈️/๐Ÿ‡ฐ๐Ÿ‡ท/๐Ÿš•/๐Ÿจ

ln -s home ๐Ÿก
ln -s bus ๐ŸšŒ
ln -s airplane ✈️
ln -s korea ๐Ÿ‡ฐ๐Ÿ‡ท
ln -s taxi ๐Ÿš•
ln -s hotel ๐Ÿจ

I have never encountered an Emoji URL pathname on a website and so implementing such a pathname on your website would be both totally cool and unique. You could also use an Emoji pathname for those languages your website does not support. My schema only supports Chinese, English, Japanese and Korean. If the BL was an unsupported language, such as Arabic, then the Emoji pathname could be displayed in the browser address bar instead of, for example, defaulting to English.

I have used x.y.x to represent the Domain Name, the implication being it is ASCII. We can complete the language adaptive equation by having Domain Names in supported BL languages. Thus my completed equation schema would have Chinese, Japanese and Korean Domain Names in addition to an ASCII Domain Name.

Friday, 17 March 2017

Computer Science Internationalization - EAI

As I stated in schappo.blogspot.co.uk/2017/01/chinese-email-address.html both DataMail and Google mail support Email Address Internationalization (EAI). DataMail provides a complete EAI service which includes both support and creation of Internationalized email addresses. Google Mail provides a partial EAI service, in that, it supports EAI but does not yet provide for creation of internationlized email accounts with internationalized email addresses. Thus organisations using Google Mail have an advantage over those organisations having an ASCII addresses only email service and have a head start in provision of a complete EAI service.

Given the Domain name of an organisation, the Unix host command can be used to determine the mail service provider. Here are some of the organisations using Google Mail:


่‹นๆžœ็”ต่„‘ ~: host spotify.com
spotify.com has address 194.132.198.198
spotify.com has address 194.132.197.198
spotify.com has address 194.132.198.149
spotify.com mail is handled by 10 ASPMX3.GOOGLEMAIL.com.
spotify.com mail is handled by 1 ASPMX.L.GOOGLE.com.
spotify.com mail is handled by 10 ASPMX2.GOOGLEMAIL.com.
spotify.com mail is handled by 5 ALT2.ASPMX.L.GOOGLE.com.
spotify.com mail is handled by 10 ASPMX5.GOOGLEMAIL.com.
spotify.com mail is handled by 5 ALT1.ASPMX.L.GOOGLE.com.
spotify.com mail is handled by 10 ASPMX4.GOOGLEMAIL.com.

่‹นๆžœ็”ต่„‘ ~: host twitter.com
twitter.com has address 104.244.42.129
twitter.com has address 104.244.42.1
twitter.com mail is handled by 30 aspmx3.googlemail.com.
twitter.com mail is handled by 10 aspmx.l.google.com.
twitter.com mail is handled by 20 alt1.aspmx.l.google.com.
twitter.com mail is handled by 30 aspmx2.googlemail.com.
twitter.com mail is handled by 20 alt2.aspmx.l.google.com.

่‹นๆžœ็”ต่„‘ ~: host mixi.jp # ใƒŸใ‚ฏใ‚ทใ‚ฃ
mixi.jp has address 52.198.59.66
mixi.jp has address 54.92.71.226
mixi.jp has address 52.198.89.90
mixi.jp mail is handled by 30 aspmx2.googlemail.com.
mixi.jp mail is handled by 10 aspmx.l.google.com.
mixi.jp mail is handled by 20 alt2.aspmx.l.google.com.
mixi.jp mail is handled by 20 alt1.aspmx.l.google.com.
mixi.jp mail is handled by 30 aspmx3.googlemail.com.

่‹นๆžœ็”ต่„‘ ~: host bristol.ac.uk # University of Bristol
bristol.ac.uk has address 137.222.0.38
bristol.ac.uk mail is handled by 5 ALT1.ASPMX.L.GOOGLE.COM.
bristol.ac.uk mail is handled by 10 ASPMX2.GOOGLEMAIL.COM.
bristol.ac.uk mail is handled by 1 ASPMX.L.GOOGLE.COM.
bristol.ac.uk mail is handled by 10 ASPMX3.GOOGLEMAIL.COM.
bristol.ac.uk mail is handled by 5 ALT2.ASPMX.L.GOOGLE.COM.

่‹นๆžœ็”ต่„‘ ~: host bathspa.ac.uk # Bath Spa University
bathspa.ac.uk has address 194.83.160.0
bathspa.ac.uk has address 162.13.24.154
bathspa.ac.uk has address 72.47.217.0
bathspa.ac.uk mail is handled by 10 ALT4.ASPMX.L.GOOGLE.COM.
bathspa.ac.uk mail is handled by 5 ALT2.ASPMX.L.GOOGLE.COM.
bathspa.ac.uk mail is handled by 1 ASPMX.L.GOOGLE.COM.
bathspa.ac.uk mail is handled by 5 ALT1.ASPMX.L.GOOGLE.COM.
bathspa.ac.uk mail is handled by 10 ALT3.ASPMX.L.GOOGLE.COM.
Providing a full EAI service involves going beyond ASCII. It entails supporting Unicode email addresses. Unicode email addresses such as my Chinese email ๅฐๅฑฑ@็”ต้‚ฎ.ๅœจ็บฟ