Summarized using AI

Sense and Sensibility

Sayanee Basu • June 24, 2016 • Singapore • Talk

In this talk at the Red Dot Ruby Conference 2016, Sayanee Basu, a technology consultant, explores the role Ruby on Rails developers can play in the burgeoning field of the Internet of Things (IoT), specifically in relation to low-powered connected sensors. She begins by reflecting on her journey as a beginner in web technologies and emphasizes the evolution of engineering through various technological eras.

Key Points Discussed:
- Layers of IoT Architecture: Sayanee details the three pivotal layers in IoT: the physical layer with sensors (pressure, light, humidity), the wireless communication stack (NFC, Wi-Fi, Bluetooth, 4G), and the application layer (HTTP, MQTT, CoAP).
- IoT Platforms: She defines what an IoT platform is and identifies six key features necessary for an effective IoT platform. The discussion highlights the Rails-based framework, ThingSpeak, as a practical tool for developers. The features include periodic data communication from sensors to the Rails server, event-triggered data sending, data visualization, and using hooks for additional actions upon data reception.
- Hardware Demos: Sayanee conducts practical demonstrations using three types of sensors connected through Wi-Fi: a switch (event-triggered), a proximity sensor (periodically sending data), and a temperature sensor (using MQTT). These demonstrations illustrate tangible applications of how raw data from sensors can be transmitted to a Rails server, processed, and visualized.
- Real-world Applications: She discusses how IoT can improve various sectors, such as waste management with sensors notifying public services when bins are full, and smart meters relaying energy consumption data to utility companies.
- Standards and Communication Protocols: Sayanee emphasizes the significance of protocols like MQTT for low-power sensor communications and touches upon the ongoing development of standards in IoT technologies.

Conclusion and Takeaways:
- Developers specializing in Ruby on Rails can significantly contribute to the development of IoT platforms.
- The integration of low-power sensors with web technologies paves the way for advanced data management and real-time analytics.
- Continuous learning and community engagement in this evolving field are encouraged, as it presents ample opportunities for future careers and innovations in technology. Sayanee encapsulates her talk with a philosophical quote, linking technology with human senses, and stresses the importance of exploring our surroundings through the lens of IoT.

Sense and Sensibility
Sayanee Basu • June 24, 2016 • Singapore • Talk

Speaker: Sayanee Basu, Technology Consultant, Ricoh Singapore

As the era of tiny low-powered connected sensors beckons, how can Ruby and Rails developers come to play a pivotal role? In this talk, we will explore the backend functionalities and features that a connected sensor will talk to and make sense of the data collected. Through the open source Rails-based framework ThingSpeak, we will explore the 3 key features such a platform requires and give practical hardware demos and code snippets. Audience participation is all welcome! So hey, let's explore and make sense together!

Speaker's Bio
Sayanee is an engineer with a focus on electronics and web technologies. She curates the developer and design community of Singapore through We Build SG and creates screencasts on developer tools with Build Podcast. At other times, she enjoys a good workout, reading her eBooks and slowly drinking some tea.

Event Page: http://www.reddotrubyconf.com

Produced by Engineers.SG

Help us caption & translate this video!

http://amara.org/v/ONqN/

Red Dot Ruby Conference 2016

00:00:13.580 welcome everyone everybody can hear me
00:00:16.410 all right I am so so happy to be here
00:00:20.279 this is my third time that I'm here in
00:00:23.220 the red ruby conference and the first
00:00:25.680 time when I was here I was just a
00:00:28.079 beginner trying to learn the ropes of
00:00:30.509 web technologies the Ruby programming
00:00:32.790 language and the rails framework but it
00:00:35.730 has been a phenomenon and fun journey
00:00:37.890 since then because of many of you in the
00:00:39.870 audience the Ruby community of Singapore
00:00:42.629 and beyond well it's people like Winston
00:00:45.360 who has been so crucial about
00:00:47.880 programming and teaching are people like
00:00:49.739 juanito you know like spreading the love
00:00:51.780 and laughter or even getting some free
00:00:54.450 hardware like this in red dot ruby
00:00:56.790 conference just last year it has been a
00:00:59.100 fun journey but being a beginner is not
00:01:03.059 just a story of an individual it is a
00:01:05.700 story told repeatedly by generations of
00:01:09.540 engineers experienced engineers whether
00:01:12.450 it is the integrated circuits of the
00:01:15.240 1960s or personal computing of the 1980s
00:01:19.170 or even more recently the web and the
00:01:21.359 Internet engineers have always taken on
00:01:24.569 something new something unknown
00:01:26.340 something messy have kind of played with
00:01:29.039 it and made it so usable to the people
00:01:31.799 beyond that it almost became an
00:01:34.799 extension of who we are and so I thought
00:01:38.670 I should start with a code the wheel is
00:01:42.240 an extension of the foot the book is an
00:01:45.630 extension of the I clothing is an
00:01:48.869 extension of the skin electric circuitry
00:01:51.869 is an extension of the central nervous
00:01:53.880 system today I hope to share with you
00:01:57.539 something that is an extension of our
00:01:59.130 very own senses starting with the
00:02:01.859 sensors themselves and some of it I have
00:02:04.200 right here I want to be taking you down
00:02:07.590 from the traction layers from the
00:02:09.959 physical world the real world all the
00:02:12.569 way to the application layer which all
00:02:14.640 of us are familiar with and I want to
00:02:16.860 share with you exactly what is changing
00:02:19.170 in each of these layers so let's start
00:02:21.390 with the sensors that pressure sensor
00:02:23.410 as light sensors humidity sensors they
00:02:27.040 are becoming cheaper and more compact
00:02:29.710 than ever before which means it's just
00:02:32.170 much more accessible to us the next
00:02:35.620 layer is the wireless communication
00:02:36.970 stack which the sensors will be using to
00:02:39.760 transmit their values and all of us must
00:02:43.810 have heard of NFC or even Wi-Fi
00:02:46.230 Bluetooth and 4G which is kind of long
00:02:49.600 range there are new protocols coming up
00:02:52.840 such as Bluetooth Low Energy or even 5g
00:02:56.020 that will be coming up in a few years
00:02:57.490 and these are especially important for
00:03:01.090 tiny sensors low power sensors for
00:03:04.300 machine-to-machine communication the
00:03:07.060 next layer is the access layer so all of
00:03:09.250 us who are web developers here are very
00:03:11.740 familiar with these protocols the HTTP
00:03:14.140 the HTML JSON and so on i also want to
00:03:17.920 share with you two more protocols in the
00:03:20.320 application layer which is the MQTT and
00:03:22.600 the coop and these are very important
00:03:25.630 for machine-to-machine communication
00:03:27.850 once again and of course about these we
00:03:30.490 have the web of things layer which all
00:03:32.740 of you as real developers or web
00:03:35.260 developers will be playing with now for
00:03:37.780 today's talk I'll be specifically
00:03:39.850 focusing on the bottom three layers
00:03:42.250 focusing on the layers that will be
00:03:44.410 communicating with the physical layer
00:03:46.630 the analog layer with the digital layer
00:03:49.390 the application layer so before I get
00:03:52.870 started I'm going to talk a little bit
00:03:54.910 about what is an Internet of Things
00:03:56.920 platform so sure and how many of you are
00:03:59.800 rails developers wow that's about
00:04:04.230 seventy percent of you I agree with you
00:04:07.660 not all of our web developers so we
00:04:09.459 might be playing with the Ruby a lot so
00:04:11.410 as web developers as rails developers
00:04:14.830 all these talking about this framework
00:04:16.570 all things speak if you go to think
00:04:18.669 speak calm you can actually connect your
00:04:21.520 sensors and play with it so it is a
00:04:23.230 hosted platform but if you want to look
00:04:25.720 at the source code as developers you can
00:04:27.880 also go to github and you can also
00:04:29.830 download the source code so just a word
00:04:31.720 of caution the source code in github is
00:04:34.780 about a year
00:04:35.700 old so it will be based on Ruby 2 point
00:04:38.370 1 and the rails version is 4.2 but
00:04:42.390 nevertheless I still feel that we will
00:04:44.520 be able to catch on a lot of how the
00:04:46.680 controllers are made the models are made
00:04:48.840 and get a lot of ideas so essentially
00:04:51.090 what is an IOT platform so it has four
00:04:54.990 key features number one so you have a
00:04:57.270 sensor out there in the wild and that
00:04:59.970 kind of communicates periodically to
00:05:02.010 your ruby on rails server so that's a
00:05:04.350 key thing about what is an IOT platform
00:05:06.570 the second thing is when does the sensor
00:05:10.590 send these values it can be triggered by
00:05:12.720 event which can be by a human and it can
00:05:15.900 be by periodic like every few hours or
00:05:18.210 so the third key thing is what do we do
00:05:21.810 with the sensor data after it comes to
00:05:24.330 your ruby on rails server typically we
00:05:26.700 will plot charts and graphs so that's a
00:05:28.710 very key function of this the last
00:05:31.410 attribute is hooks and I think as real
00:05:34.050 developers we are very good at this like
00:05:36.210 when we get a post request or a get
00:05:38.280 request we might trigger a rake task or
00:05:41.160 we might generate a PDF or an email so
00:05:43.950 these are the hooks and triggers I
00:05:45.270 talked about so now that you know what
00:05:47.520 is an IOT platform I want to be giving
00:05:51.240 you a free demos in the course of this
00:05:53.760 talk and hopefully with these three
00:05:55.980 demos they are tangible enough for all
00:05:58.770 of you to take back something home get
00:06:01.230 excited and start playing with the
00:06:03.450 physical world so at three demos here
00:06:06.090 will be using Wi-Fi wireless protocol
00:06:08.400 for this purpose I have three kinds of
00:06:10.770 sensors or equipped actuators and being
00:06:13.410 a red dot attendee I've used emojis as
00:06:16.260 you can see the first one is a switch
00:06:18.810 the second one is a proximity sensor and
00:06:21.420 the third one is a temperature so let's
00:06:23.580 get started with the first one it will
00:06:25.950 be event triggered so before start with
00:06:28.860 the first one I want to be talking a
00:06:30.090 little bit about the wireless protocol
00:06:31.590 system so we are in today's was very
00:06:34.770 familiar with two kinds the Wi-Fi which
00:06:38.160 is like within a room or the cellular
00:06:40.650 which is like 2g or 3G so it's very
00:06:43.590 important to know where is the device of
00:06:45.630 the sensor
00:06:46.289 and where is the kind of the central
00:06:49.139 device that catches all these values in
00:06:51.779 the case of Wi-Fi it is the router so I
00:06:53.729 have a little router here so I've kind
00:06:56.699 of flash the firmware and connected it
00:06:58.649 to the SSID of this little guy and here
00:07:01.949 is the router and this is the sensor so
00:07:04.409 in terms of cellular it is the huge cell
00:07:07.020 tower now what's happening in the last
00:07:09.869 few years is this we are having more and
00:07:12.719 more chips which is the connectivity
00:07:15.089 chips available to us so this is an
00:07:17.399 example of a photon which is a def kit
00:07:20.069 and over here I have a Wi-Fi chip made
00:07:22.979 by broadcom BCM and it's all done up for
00:07:26.249 you in a tiny little PCB that you can
00:07:28.499 explore I have another example this is
00:07:31.379 based on the esp8266 it is a sub 3
00:07:34.619 dollar USD trip Wi-Fi connectivity once
00:07:37.800 again it's available as a dev kit same
00:07:41.069 thing you see in the cellular device now
00:07:44.279 the best part is the cost of course
00:07:46.080 whenever an innovation becomes more
00:07:48.180 prevalent is the cost in terms of Wi-Fi
00:07:51.059 you can use these sort of a little deaf
00:07:53.819 kids in sub 20 USD of course senses and
00:07:57.269 all you have to pay a little bit more
00:07:58.559 and in terms of the cellular
00:08:00.719 connectivity it's about seventy or
00:08:03.389 eighty dollars but just like our mobile
00:08:06.749 phone you need a data plan and cellular
00:08:10.349 is important you know because not all
00:08:11.939 our sensors will be in the room it might
00:08:13.830 be in the urban in the gardens or
00:08:15.689 something like that so I hope that you
00:08:17.369 gave a little bit of background about
00:08:19.589 what kind of wireless connectivity we
00:08:21.659 are talking about let me go on to the
00:08:23.849 very first example so this is the first
00:08:25.800 example i have here as i said i have a
00:08:28.680 little switch here so if you see the
00:08:30.419 switch here and this has stm32
00:08:33.779 microcontroller the switch is connected
00:08:35.219 to the microcontroller and that's where
00:08:37.500 i flash to the sea program to kind of
00:08:40.439 say how it will communicate and then of
00:08:42.719 course it has a Wi-Fi chip on board
00:08:44.250 which is talking to this little router
00:08:46.290 here alright so that is the thing and
00:08:49.259 with this Wi-Fi it kind of talks to my
00:08:51.779 Ruby on Rails over which is running in
00:08:53.699 my laptop alright so are we ready to see
00:08:56.910 what it does
00:08:58.140 okay so i'm going to go here and this is
00:09:00.990 completely wireless so let's see i'm
00:09:03.690 going to turn it on let's see
00:09:13.990 of course alright so let's go on and
00:09:21.430 I'll show you the channels this time
00:09:23.820 it's going to the switch so this is
00:09:29.740 where you will see the public switch
00:09:31.149 here the public view so this is how let
00:09:36.070 me see whether we got it no we didn't
00:09:38.380 get it oh well well even if you don't
00:09:41.020 get it I'll come back here and then i'll
00:09:44.170 show you the channel settings so what
00:09:46.000 happens every time I turn this on and
00:09:47.980 off it basically communicates with the
00:09:50.380 rails server right here and when it
00:09:52.930 communicates it gets a post request so
00:09:56.350 let me show you the API keys right here
00:09:58.240 so this is the API key you have here and
00:10:00.610 then the channel settings over here you
00:10:03.580 kind of set it up and then you say that
00:10:05.410 in this sensor node right here you have
00:10:07.990 eight different fields and one of them
00:10:10.690 is a switch so let's turn back here and
00:10:16.800 this is the API key now let me move on
00:10:20.260 and show you where this can be used this
00:10:23.410 little switch how many have heard of
00:10:25.870 Amazon dash many of you so this is
00:10:29.410 actually using the same broadcom Wi-Fi
00:10:32.290 chip as the Amazon dash here so what it
00:10:35.200 does every time you kind of switch or
00:10:37.029 push the button it connects to your
00:10:39.040 router at home and it basically creates
00:10:41.380 a line item in the e-commerce cart of
00:10:45.339 your Amazon and the cool thing is the
00:10:48.010 few months ago amazon even release the
00:10:50.529 iot button and the iot button is
00:10:54.459 available as a developer kit to go ahead
00:10:56.709 and play with it AWS iot button so
00:10:59.890 that's a brief about this but i want to
00:11:01.930 go to the forum where and the real code
00:11:03.970 where the communication happens so i
00:11:05.829 basically kind of flash the phone back
00:11:08.380 right here and even though this is C
00:11:11.079 code I want you to notice three things
00:11:13.329 about this firstly we have / update
00:11:17.010 secondly we have the API key right here
00:11:19.990 and thirdly we have the field which is
00:11:22.690 the on and off of the field
00:11:25.840 of course it's communicating to the
00:11:27.820 whole thing which is my laptop here and
00:11:29.650 the port so with this the things let's
00:11:32.800 go onto the rails and this is something
00:11:34.150 I think all of you are familiar with so
00:11:36.160 what happens in rails with flash update
00:11:38.290 it goes to the routes are be and it is
00:11:41.530 kind of defined as channels model and
00:11:44.800 then the method is post data so when it
00:11:47.620 gets this data it creates a new feed so
00:11:52.330 feed is also a model and of course it's
00:11:54.610 checks the API key and then field one it
00:11:57.850 kind of creates one line off the feed so
00:12:01.390 that's the meat of it all so let me go
00:12:04.120 to the second example that is the
00:12:06.370 periodic part of it and this time it
00:12:09.400 will be not triggered by a human being
00:12:12.010 with switch but it will be triggered by
00:12:14.620 proximity or in terms of every interval
00:12:18.220 so let me go on to show you this little
00:12:20.770 thing so here I have a very similar case
00:12:24.370 so this is the ultrasonic sensor that
00:12:26.380 you see here and ultrasonic sensor
00:12:29.080 basically means that when you have a
00:12:32.200 line of sight obstacle it can measure a
00:12:34.780 distance and this is a little different
00:12:37.210 previously i powered it up with a power
00:12:39.460 bank but this time i'm powering it up
00:12:41.260 with a lipo battery so if you kind of
00:12:44.440 sleep and wake it up every few hours
00:12:46.720 this can last for let's say a month or
00:12:49.390 so so this is an example of a proximity
00:12:52.390 sensor but it will not be triggered by
00:12:54.280 me this time so let's see an example so
00:12:57.700 I'm going to go to the channels and
00:12:59.500 let's see proximity
00:13:01.959 let's go to the public view and let's
00:13:06.619 see what's going on here let me turn it
00:13:09.379 on let's see whether it works even if it
00:13:11.389 doesn't work well
00:13:17.139 oh well it doesn't work all right but i
00:13:20.559 will show you something let's see once
00:13:22.899 again whether it works or not no
00:13:29.970 alright so i'm going to show you right
00:13:32.830 here and this part i want to show you
00:13:36.010 the data so if you click here now things
00:13:39.490 speak will give you how it you can able
00:13:43.060 to kind of communicate with it so if you
00:13:45.160 want to do a post request you can do a
00:13:47.680 slash update here and this is where you
00:13:50.350 they will actually generate the URL for
00:13:52.450 to write in the phone where and
00:13:54.220 communicate with the rails and then this
00:13:57.010 is the feed json that you can see here
00:13:59.170 so i think it might work let's see why
00:14:02.050 is it minus I it is working so you see
00:14:06.610 here it's minus 1 let's wait a bit
00:14:16.279 and you see 1719 alright so a bit far
00:14:25.370 away
00:14:33.590 and there you see so if you come back to
00:14:37.010 the graph right here number one if you
00:14:40.760 go to the public view there you see the
00:14:42.320 plots are being charted with this little
00:14:44.540 guy all right wait a bit
00:14:50.810 ok
00:14:53.820 probably have to be very very near but
00:14:57.090 you see if I show you one of the queries
00:14:59.820 that it's kind of working with where is
00:15:03.900 it
00:15:08.840 right here so this is an example of a
00:15:11.720 post request that's been done with the
00:15:13.670 fields it's minus one it's very very
00:15:16.610 nearby so there you see it's giving
00:15:19.100 minus one so it kind of updated the
00:15:20.780 chart now in this example let's look at
00:15:23.750 the data here because the IOT platform
00:15:26.210 is all about data so what I'm going to
00:15:29.120 do is I'm going to export it to csv file
00:15:31.850 and as you can see minus one minus one
00:15:35.240 and then 19 and then minus one right
00:15:37.520 here so it's immediately available in
00:15:39.740 your CSV format and of course it's also
00:15:42.530 available as JSON right here so let me
00:15:47.000 go back and explain a little bit about
00:15:50.090 the rail structure so this week uses
00:15:52.880 things like device and whenever jam and
00:15:55.850 many of the gems that we are very very
00:15:57.410 familiar with but I'm going to be
00:15:59.090 talking about three models that are very
00:16:02.120 very specific for IOT platform one of
00:16:04.370 them is something called a channel so
00:16:05.840 channel is something like this is a
00:16:07.640 sensor node so it might have one or more
00:16:10.820 sensors so all these are related to one
00:16:13.250 channel the second thing is all about
00:16:15.830 the feed so whenever this sensor or more
00:16:19.670 sensors kind of transmit something it
00:16:22.070 will record in the database as one feed
00:16:24.950 item and lastly of course is the API key
00:16:28.750 so let me go and also say that API key
00:16:32.630 in the terms of things week is basically
00:16:35.150 a 16 digit alphanumeric number and
00:16:37.930 finally the feed controller and this is
00:16:40.490 where the data the meat of the matter is
00:16:42.260 the data here's this week which is I
00:16:44.930 think is really good is kind of for
00:16:47.480 exporting five different types of data
00:16:50.290 HTML of course it's for the view Jason
00:16:53.510 is very important if you want to be
00:16:55.010 using it and kind of hooking up with
00:16:56.780 api's with other types of applications
00:16:59.300 and of course there's CSV if we're going
00:17:01.370 to download and do some spreadsheet
00:17:03.140 manipulation and of course text so let
00:17:07.640 me talk a little bit about application
00:17:09.290 so yesterday if you remember God free
00:17:11.930 stock you spoke about smart can so it's
00:17:15.290 the same thing here so imagine what can
00:17:17.240 happen if you put a proximity sensor not
00:17:20.540 in a garbage can in a
00:17:22.220 room but let's say the huge garbage can
00:17:24.860 underneath the buildings and there are
00:17:27.289 many of them and public utilities
00:17:29.179 personnel comes and collects the garbage
00:17:31.159 and wouldn't it be better if each of
00:17:34.039 visas has a little bit proximity sensor
00:17:37.280 connected to a cellular communication
00:17:39.350 and it just gives the ping when the
00:17:41.659 distance becomes smaller than a
00:17:44.090 threshold and then it says that hey you
00:17:45.799 know the logic six people are the the
00:17:48.980 public utilities people go and go to
00:17:51.409 this area and these are the exact
00:17:53.770 containers garbage bags that needs to be
00:17:56.450 emptied so that's the application the
00:17:59.299 practical application of this so I have
00:18:03.620 based my example a lot of things week
00:18:06.500 now there are nine platforms I've played
00:18:09.710 with and I think you can also play with
00:18:11.510 it you do not need to install race or
00:18:14.210 anything these are all hosted platforms
00:18:16.220 and then nine of them and whether you
00:18:18.620 say IBM Microsoft AWS Google they each
00:18:22.820 have a IOT platform of their own and out
00:18:25.820 of these guess what two are made of Ruby
00:18:29.000 on Rails so you can imagine some of you
00:18:31.490 in this audience in a few years will be
00:18:33.559 part of an IOT platform building team
00:18:36.320 working with electrical engineers on the
00:18:38.539 other side and interfacing with the
00:18:40.100 sensors while you all will be working to
00:18:43.220 collect the data and make sense of it so
00:18:45.740 Adafruit IO is one of them and they also
00:18:48.409 are basing their platform out of Ruby on
00:18:50.750 Rails i also want to talk about
00:18:53.960 standards that are being done because
00:18:55.850 standards are so important because right
00:18:58.250 now i OT is a very very new technology
00:19:00.890 there are so many messy things going
00:19:02.840 around it's crucial that we also follow
00:19:04.940 standards and follow the conversation so
00:19:07.460 there's web of things standards by w3c I
00:19:10.159 love to subscribe to the mailing list
00:19:12.230 and kind of look at what they're doing
00:19:14.240 they will talk about API endpoints and
00:19:16.700 restful URL things that are we are very
00:19:19.400 familiar with it and also some new
00:19:21.440 terminology so go and subscribe to the
00:19:23.150 mailing list so this is the last example
00:19:26.270 i'll be giving and this time i'll be
00:19:29.150 using a temperature sensor and instead
00:19:31.820 of http i'll be using MQTT so how many
00:19:34.070 of them use
00:19:35.040 q TT so that's like the last layer of
00:19:37.830 the application stack of the internet
00:19:39.420 protocol any if you use MQTT that that's
00:19:42.060 awesome i see a few of you like about
00:19:43.590 five hands in the audience so before i
00:19:46.740 go on to the example i want to explain
00:19:48.270 why MQTT so like i said HTTP MQTT or
00:19:52.380 even ftp dns these lie on the top layer
00:19:55.170 of the application layer and MPG genco
00:19:58.170 app are becoming increasingly important
00:20:00.810 for machine-to-machine low power
00:20:03.330 communication and the exchange model is
00:20:07.590 a little bit different for MQTT it is
00:20:09.810 based on publish and subscription as
00:20:12.060 compared to http which is a request and
00:20:14.550 response and I think as web developers
00:20:15.750 we are very familiar with this so what
00:20:18.630 publishin subscription model does is
00:20:21.000 that you can do a many-to-many
00:20:22.610 propagation so you can imagine many
00:20:25.140 sensors connecting to a single MQTT
00:20:28.770 broker and that kind of publishers are
00:20:31.580 subscribes to other real service now
00:20:35.970 here's the interesting thing why is MQTT
00:20:38.160 and co-op especially suited for low
00:20:40.710 power sensors two reasons firstly look
00:20:43.800 at the header size HTTP has a huge
00:20:46.530 header size as compared to MQTT or co-op
00:20:49.530 and secondly HTTP is also based on ascii
00:20:52.560 or text whereas MQTT and co-op is based
00:20:55.470 on binary so that really really does a
00:20:57.780 huge effect on your battery so remember
00:21:00.420 i said if you're doing a prototype
00:21:01.950 you're having it at home sure you can
00:21:03.510 plug in the battery power and kind of
00:21:05.370 plug it back but if you're trying to do
00:21:07.020 something urban like in a waste
00:21:08.640 management system you have to ensure
00:21:10.410 that the battery probably last in the
00:21:12.480 order of years and that's where using
00:21:15.540 protocols that are made for low power
00:21:18.330 sensor systems machine-to-machine
00:21:19.950 communication is so important so let's
00:21:22.500 go into the last example shall we here i
00:21:25.170 will be using something different it's
00:21:26.670 not photon it's based on esp8266 and it
00:21:30.720 is the first sub three dollar USD chip
00:21:33.720 this is Wi-Fi chips I have a little
00:21:36.170 temperature sensor here what do you
00:21:38.760 think is the temperature right now when
00:21:40.350 I'm going to on it
00:21:41.440 any numbers 19 24 22 who is right who is
00:21:49.899 right let's see so I'm going to go here
00:21:55.779 and go to my channel and all right and
00:21:59.830 let's see so once again I'm doing it
00:22:02.529 every three seconds but in reality
00:22:04.029 probably want to be doing every three
00:22:06.129 hours so let's see I've on dit oh there
00:22:09.850 you go it's happening you know the stage
00:22:12.220 is a little warmer I think so there you
00:22:15.970 go it's good so it's about 24 Gusev 24
00:22:18.929 Winston thank you Miss I owe your drink
00:22:23.080 anyway thank you for what you did for
00:22:25.120 the community alright so that's 24 23
00:22:29.139 and and so one thing about data is that
00:22:32.980 you might want to have a huge dashboard
00:22:35.200 in your office and that's where
00:22:36.730 WebSockets come in also very handy so
00:22:38.889 once again II detail matters what you do
00:22:41.379 with the data so I'm going to talk a
00:22:44.799 little bit about MQTT so in terms of
00:22:46.539 MQTT like i said it is a publishing
00:22:49.419 subscription model so i'm running a most
00:22:51.639 creature server which is the MQTT broker
00:22:54.940 in my laptop here so once again i have
00:22:57.730 already a kind of flash the firmware in
00:23:01.000 my micro controller here and the form
00:23:03.610 where so here you will also see how the
00:23:05.710 MQTT protocol works api key / field
00:23:09.610 which is very similar and then of course
00:23:11.950 i'm going to my host which is my laptop
00:23:14.889 right here and I'm basically doing a
00:23:17.590 client publish and it's for course
00:23:20.440 talking to my router here and then my
00:23:23.919 real side will basically subscribe to
00:23:26.200 this MQTT sensor value and what it does
00:23:29.889 is it will also check exact value the
00:23:33.610 API key and the field and just like the
00:23:36.490 HTTP way we will create a new feed for
00:23:39.940 this every sensor value so application
00:23:43.539 i'm going to be talking about
00:23:44.259 application how many have seen your home
00:23:46.600 meters home power meter everybody has
00:23:48.429 one how many have seen it
00:23:50.250 alright that's about ten percent of you
00:23:52.590 this is how my home power meter looks
00:23:54.900 like and by the way I moved into a new
00:23:56.670 house and this is the latest i believe
00:23:58.980 how do you think meters are red pretty
00:24:03.120 manual nowadays I think we are trying to
00:24:05.100 do it automatically by think by a large
00:24:06.840 it's pretty manual and this is the you
00:24:09.360 see it's 2015 is by last year but
00:24:12.480 imagine one day we add a cellular
00:24:15.420 connectivity to this and every few hours
00:24:18.390 we just send this tiny little value from
00:24:21.990 your home power meter to your powers
00:24:24.390 utility and from there it just
00:24:25.770 propagates as data to all your accounts
00:24:28.710 or all your mobile phones imagine how
00:24:31.650 much aware we will be of the energy we
00:24:34.050 are using in every day of our lives I
00:24:36.120 think that has an impact directly on our
00:24:38.820 behavior and the planet we care for so
00:24:42.510 LT IOT platform at the end of the day
00:24:44.700 it's all about data sure we can go in
00:24:46.920 lot charts about it it will already give
00:24:49.710 a visibility of our usage of our
00:24:52.230 consumption but what are we gonna do
00:24:55.410 with the data is an even more important
00:24:57.690 question I'm going to stop something we
00:25:00.300 said something do a physical manual
00:25:03.060 deployment to the site notify social
00:25:06.210 media trigger a rake task generate a PDF
00:25:09.980 create an email trigger something or
00:25:13.560 change something about ourselves at the
00:25:16.980 end of the day I OT platforms have a
00:25:19.770 huge impact on every possible industry
00:25:22.440 around us whether it's logistics energy
00:25:24.960 transportation and so I thought I should
00:25:28.830 end with a code the wheel is an
00:25:32.190 extension of the foot the book is an
00:25:35.130 extension of the I clothing is an
00:25:37.980 extension of the skin electric circuitry
00:25:41.010 is an extension of the central nervous
00:25:43.020 system the extension of any one sense
00:25:46.850 displaces the other sense and alters the
00:25:50.190 way we think the way we see the world
00:25:52.530 and ourselves let's explore the senses
00:25:56.790 around us thank you so much
00:26:04.519 I did you have some questions yeah we
00:26:07.820 have some questions from the audience
00:26:08.749 please come on
00:26:14.610 are you doing this sort of work in on
00:26:17.780 professionally right now or just
00:26:19.500 currently so it's a hobby and that's a
00:26:22.200 great question you know like this graph
00:26:23.880 I showed right at the beginning you know
00:26:27.929 so I feel in terms of IOT we are kind of
00:26:31.500 like at an inflection point and if you
00:26:34.440 remember the era of web or web or
00:26:37.080 personal computing there were a lot of
00:26:38.400 hobbies that got started first and then
00:26:40.980 the industry kind of came together like
00:26:43.020 I said there are a lot of Industry
00:26:44.280 protocols being made but i'm personally
00:26:46.140 doing it as a hobby hope to make it a
00:26:47.669 career out of one day when you guys
00:26:49.799 ngness that's what we do first right
00:26:51.330 anything you just just go on and have
00:26:53.340 fun thanks for the great question any
00:26:55.140 other question
00:27:01.120 I think
00:27:03.360 oh ok why
00:27:06.060 hello hi okay uh I'm a beginner to
00:27:11.000 trying to hack my way to some stuff can
00:27:14.810 you suggest any starter kits too yes so
00:27:19.510 you see my slide link here at the end
00:27:24.370 right and I have three more slides here
00:27:27.500 I've linked to all the hardware links
00:27:30.080 here that's the most frequently asked
00:27:32.480 question so i would highly recommend you
00:27:35.030 to go to Adafruit or sparkfun like I
00:27:37.490 said they're deaf kids here and it will
00:27:38.960 be so easy to just get started just for
00:27:41.120 yourself yeah check out the links here
00:27:43.190 my slide link is also here I hope I if
00:27:46.190 not talk to me thank you yeah
00:27:53.410 any more questions
00:27:57.830 well I have one comment yes so South
00:28:00.830 show obvious a keynote speaker from
00:28:02.510 yesterday works as in power and I would
00:28:04.970 love to have him attach our power meters
00:28:08.929 to the cellular network so that we can
00:28:10.669 hack it you can we can tell him hahaha
00:28:14.950 okay so many you started it so we're
00:28:21.590 gonna bring me in the game right anyway
00:28:24.590 I just want to tell you that in the
00:28:26.570 single power we have already rolled out
00:28:28.279 like 100,000 smartest around the island
00:28:30.740 they are connected and it should be
00:28:33.470 rolling out to the rest of the island in
00:28:35.960 the next couple of years so it's gonna
00:28:41.120 come true no more manual thank you song
00:28:46.809 Thank you Thank You sanity thank you
Explore all talks recorded at Red Dot Ruby Conference 2016
+17