Rails and the internet of things
by ehuard on Jul 25, 2009
- 2,858 views
The internet of thing is hot. This talk describes the trends that led to this phenomenon....
The internet of thing is hot. This talk describes the trends that led to this phenomenon.
Augmented reality links online content to physical object - i talk about the different ways this can happen.
Then i talk about physical computing: making things talk, using Arduino, mainly.
Accessibility
Categories
Tags
More...Upload Details
Uploaded via SlideShare as Apple Keynote
Usage Rights
© All Rights Reserved
Statistics
- Favorites
- 11
- Downloads
- 113
- Comments
- 0
- Embed Views
- Views on SlideShare
- 2,569
- Total Views
- 2,858
I’m going to talk about Rails and the Internet of things.
Well, more accurately, I’m going to talk about the Internet of Things and Rails. It’s a vast subject. There’s so much to say - I’m going to attempt to give you a feel of what’s going on.
Hopefully this will make you want to pull up your sleeves, and start experimenting.
I love the framework, but it’s not the first I’ve used: I’ve been in software for about 8-9 years. Before this I’ve done C, C++, Java.I like to keep up with what’s happening. I’m a big science fiction fan.
See this article from BBC news, where the UN predicts the internet of things.When the UN notices a trend, you can be sure it has been around for a while.
It was mostly linked with the brief hype around RFID tags. I’m going to talk about RFID tags as well, as they are part of the ecosystem.
The wikipedia entry was only created in 2008.
What are the trends that cause this subject to be hot right now ?
Commoditizing of wireless networking. Everyone and his neighbour has a wireless network at home, and many pubs, cafés, airports are starting to see it as a selling point. Public free wifi is not yet a reality, but it’s already fairly common.
The IEEE 802.11 protocols on 2.4GHz band.
3G (or UMTS) is actually fairly recent in Belgium, although it has been around for a while, since they were developed in 2001 in Japan, and used in Asia in 2002. The speeds of 3G are around 380 Kb/s. This gives more possibilities, like VOIP, teleconferencing.
3.5G, or High-Speed Downlink Packet Access is already used in the Netherlands - up to 14Mb/s
3 and 3 quarters G HSPA+ (evolved high-speed packet access) up to 42MBits/s
4G or International Mobile Telecommunication Advanced is being developed to acommodate better Quality of Service requirements for multimedia, and higher rates.
There have been talks about wireless mesh networks, and wimax, but in the end, the successful model is to use what’s there, and that is the existing mobile phone network.
Ubiquitous connection is a reality. Information is everywhere - around us, on the waves. We’re traversed by invisible waves of information.
And enter the second reason why the internet of things is coming up now.Who here has a smartphone ?
Who here has a smartphone ?
Who had a smartphone 2 years ago ?
2 years ago, smartphones were fairly rare - mainly in possession of business men and a few geeks who had money.
I had one or two friends with palms, but that was about it.
I believe that Apple changed the game with the iPhone, by bringing it into the public consciousness, and making it a desirable object.
The other smartphones benefited indirectly, because now, suddenly, you had to have a smartphone, and you could make a statement with your choice. By for instance not buying an iPhone, or something else.You chose a blackberry because you’re more about messaging, an HTC with windows mobile because you need to sync with your windows computer, a Nokia because it’s a decent, stable environment, etc etc.
And this trend is expected to continue.
I’m not talking about fancy graphics or virtual worldsThe first step is augmented reality. We have loads of information about the world around us. Now we have the devices to bring the internet and real life together, there are lots of new possibilities.
Although i do hope the colors will be better. The least we can ask for is full-color, HD image, i think.
From the moment they’re packaged. The moment they pass the cash registry, they cease to be useful.But this doesn’t have to be the case.
It is by no means the only 2D barcode, but it is the most successful one.
You can encode up to 4300 characters in a QR code. (and in the case of japan - about 1800 kanji/kana)It’s success is partly due to the fact that
1. you can encode a URL with it
2. it has a lot of duplication, which means that it errors have relatively little consequence, and the code can be read better.
The phone operators , like NTT Docomo, have made sure that phones are equipped with a bar code reader.This means that if you vaguely point your phone towards such a barcode, the page corresponding to the opened URL is opened automatically.
you come to a busstop, and you want to know when your bus will arrive.
So you point your phone to the QR code, and it opens a list of the next buses that are going to arrive, with their current position.
but another example of the use of barcodes.
barby does many types of barcodes, and is quite flexible in the output.
RQR only does QR code, but in a very user-friendly way.
Think of how powerful it could be: impulse buy ‘on the object’
If you want to implement a phone client yourself that interacts with your Rails app, you can have a look at ZXing. It does a good number of the most common barcodes.
It allows you to check a barcode of a product in a shop, and see the corresponding product information.
One of the coolest projects I’ve read about in this context was 2 years ago in IEEE spectrum i think. It was a help to the blind: combination of barcode reading and voice generation, as a cheap way to help a blind person to shop on their own.
It’s not exactly snappy, and some people may find this difficult, especially if the barcodes are small, damaged or folded.
There are many kinds of RFID. And their prices vary accordingly.You have passive RFIDs, which have no energy sources, and use the energy of incoming signal to respond.You have semi-active RFIDs, which have their energy source, but only respond when activated.Then you have active RFIDs, which send out a signal at regular intervals.Also, there’s a wide range of frequencies, from 125kHz to 2,45GHz. The higher the frequency, the longer the range (but also the more energy required).
Data content of a tag can also vary from a few bits to 1megabit.
The cheapest kind can be made with transformed inkjet printers - you print onto metal sheets with an acid solution.
The most effective is when you and your suppliers have an agreement and implement a common system.
they’re used to track expensive equipment, supplies, and patients.
RFID is all very well and handy, but you and I usually don’t walk around with a reader.
These are the NFC enabled phones i could find on the market. As you can guess from the look, they’re not that recent - there have been phones since 2004 - but somehow they never caught.I think this is going to change, because there are more and more initiatives using NFC for mobile payments.
You might remember that there was talk of payments over bluetooth, but these were abandoned because they were not safe.The same worry might apply to NFC - but the advantage of NFC is that the range can be made much smaller.
So we might see them appear again soon.
Well, there are more solutions for RFID that make it really easy to combine them with web applications. One of them is a Belgian spin-off, touchatag.
What they do is to offer a client that converts the identifier of the RFID tag into whatever action you want. For instance, into an URL.I was asked to develop a prototype for the VUB (free university of brussels). This prototype is aimed in the first place at students going around on a campus.If the WIFI works i can even make a small demo.
This is an extremely difficult problem universities have been working on for ages, throwing all kinds of self-learning or statistical algorithms at the problem.
Facial recognition, for instance, is used in modern digital comeras.
This patent, on something called Apple ID, recognizes an object based on a combination of visuals, an RFID reader or geocoordinates, and then fetches data from related databases.
Another patent would use facial recognition to give you information about a person, just by pointing the camera at him.
With the trends we talked about, smartphones and ubiquitous networking, there are many new possibilities in this area too.
These are examples of what the press, in 2006, called “blogjects” - objects that blog. You see, this is also an idea that has been around for a while.
Arduino is very special: it’s an I/O board with both open source hardware and software. What is meant by open hardware is that the hardware designs are distributed under a creative commons license. This means that there are several producers making them, and even improving them: the designs are out there.
The Arduino project started in Italy in 2005, aiming to make student-built interaction design less expensive.
The software is really easy to program, using a variant of C or C++, and it’s own IDE.
It communicates via a serial connection, but there’s an USB to serial adapter chip, which allows you to just plug it into a modern laptop.
You can buy a decent starter kit, arduino included, for about 60€.
You’ll have enough to start playing: some pushbuttons, some basic sensors, a bunch of resistors and some capacitors. And of course a few LEDs.
I’m told the art of electronics is a must-read, the other end of the spectrum as it were.
But actually, it turned out that you don’t really need a lot of theory to get started.
you can process the signal, and you can even initiate some kind of action with a servo motor.There are many resources online (Arduino Playground, LadyAda).
It’s a space where artists, designers, tech people can come together and create, you don’t have to do it alone.
In this context, or to catch the spirit of the thing, i would also recommend Cory Doctorow’s novel Makers, which is now being published online.
It’s been started by architects. They have a fairly ambitious vision of making a globally connected architecture - a sort of living environment. They’re developing a markup language, in XML, the Extended Environments Markup Language.
Interestingly, it’s also built in Rails. It’s a kind of hub for all kinds of sensor data. You can push your own, if you have a web server.It’s full of fairly useless data, like the temperature in a room somewhere in Kuala Lumpur.
The main point of this site is to have a common API, and the possibility to get data in XML, JSON, CSV.
after all, once objects start communicating with the network, the interaction can be managed partly in the object and partly online.