We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

APIs all the way down or free software as IoT enabler

00:00

Formal Metadata

Title
APIs all the way down or free software as IoT enabler
Title of Series
Part Number
8
Number of Parts
110
Author
License
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
19
20
Thumbnail
44:46
23
30
Thumbnail
25:53
69
Thumbnail
25:58
76
78
79
96
97
Product (business)Software developerSoftwareMotion blurMathematical analysisInternetworkingBridging (networking)ArmData analysisCommunications protocolTape driveRevision controlSummierbarkeitTwitterEndliche ModelltheorieDependent and independent variablesPhysical systemFood energyResultantVariable (mathematics)TheoryBasis <Mathematik>MereologyNoise (electronics)Level (video gaming)Insertion lossWordMoment (mathematics)Goodness of fitQuicksortBitWhiteboardSoftware developerPhysical lawRootMultiplication signInformationHypermediaState of matterGod1 (number)InternetworkingWeb 2.0SharewareWeb-DesignerPoint cloudTerm (mathematics)Proper mapFocus (optics)Extension (kinesiology)Computer wormMessage passingClient (computing)ComputerInternet der DingeCommunications protocolServer (computing)Virtual machineSoftwareComputer fileImplementationMobile appSoftware development kitComputer hardwareRoundness (object)Module (mathematics)Line (geometry)Projective planeOpen setStandard deviationOpen sourceKernel (computing)XMLLecture/Conference
Computer hardwarePoint cloudIntegrated development environmentMotion captureCodeSample (statistics)Client (computing)SoftwareThermische ZustandsgleichungDiscrete element methodAnalogyMathematical analysisPulse (signal processing)Endliche ModelltheorieMereologyWordResultantGame controllerSoftware developerUniverse (mathematics)Focus (optics)Arithmetic meanStudent's t-testVelocityData storage deviceOpen sourceProjective planeInformationForm (programming)MathematicsMultiplication signGoodness of fitSound effectWell-formed formulaProduct (business)CausalityTheorySharewareComputerNoise (electronics)Virtual machineArmComputer fontPoint cloudFreewareMicrocontrollerCodeBefehlsprozessorOpen setoutputScripting languageComputer hardwareCommunications protocolRadical (chemistry)SoftwareComponent-based software engineeringSpherical capSoftware bugImplementationPhysical systemPartition (number theory)Uniform resource locatorClient (computing)Musical ensembleComputer animationLecture/Conference
User interfaceSoftwareDiscrete element methodThermische ZustandsgleichungMetropolitan area networkFinite element methodPrototypeMaxima and minimaIntegerSineTerm (mathematics)SharewareInformation securityInformationGoodness of fitNumberContent (media)Arithmetic meanHypermediaLatent heatMeasurementTwitterKälteerzeugungRight angleLogic gateEstimatorWeb serviceFrequencyCASE <Informatik>ComputerProof theoryParsingComputer wormScripting languageGastropod shellCausalityFacebookProjective planeInterface (computing)Sampling (statistics)HierarchyCodeInternetworkingBit rateMobile appRevision controlAnalogyUniqueness quantificationSoftwareServer (computing)32-bitLimit (category theory)Web 2.0Moment (mathematics)Data conversionPoint (geometry)WordMathematical analysisPhysical lawResultantSound effectNetwork topologyVector spaceMereologyCategory of beingCodierung <Programmierung>Video gameElectronic mailing listGroup actionMultiplication signAssociative propertyWeb pageReading (process)Existence
Core dumpGoogolComputer animation
Transcript: English(auto-generated)
Ok, our next speaker is Antonia Almeida, big round of applause. I can start with a little bit of bad news.
So I don't have internet here, so I cannot do that. Because right now what happens is that there's a Wi-Fi port, so this is an old casino. And there's a Wi-Fi port, but the Wi-Fi is not working. This is a very old, so I don't know if you know this, this school art computer? Do you know this thing?
So it's manufactured by a Bulgarian company. It's called Thinko Open Hardware. This is a pretty old version. The question is, the thing that I'm using on it, which is the audio drivers, don't you go to the Linux main line project. So you have to use this Linux project.
And the idea is that this kernel is way behind the main line, in terms of features. And so what happens is that you have to use this very old kernel, and I couldn't get, I didn't try even to install a new version, so it's really tricky. And so I could not make the Wi-Fi as an old world or a Wi-Fi to work,
so I have to use internet. But unfortunately we don't have internet here, so I cannot do the demo. So my name is Antonia Almeida, I'm now working as a developer for this company, Waylayer. So my background is, I came from web development, mostly back home. And I've been working on this for more than a month.
And for me it's interesting when you are a web developer, because what you see here in the internet of things, is the extension of the things you already saw coming up in web development. So we know that now the systems are becoming more and more complex. We have distributed systems coming everywhere, present everywhere.
We are going to be all around. And you see that the internet of things pushes that even further, because now what you have is that not only we have something that runs from the user, and from the user to the cloud, and something that runs on the cloud uses distributed systems,
but when you have internet of things, you have multiple devices, already on the other hand you also have distributed systems, so the things become more complex. For me as a developer, as a web developer, this is really interesting. So on the other hand, I'm also an audio geek, so the reason why I bought this computer was to make a streaming server for my stereo,
and the reason I didn't use a part is because the file at the time was only 1A, and the USB implementation was kind of crappy, and so I wanted to interface that with the USB. I wanted something that was good, and not a bad USB implementation. So what I'm going to show you here is what you can do with just an ID you have on your head,
and you can really sidestep all the very complex things here right now. So what I want you to see here is measuring noise. I know you work on open spaces, but noise is a big issue, especially if you're a developer, because if there are other people that do other things, which is not development,
you always have to have your headphones on. And this is not good for communication, right? You're supposed to be communicating with other people, but there's too much noise that you cannot focus. So noise sensing, I think, is a very important thing. So I think the IOG is really a must-know. It's not the proper term, because it's not things.
What you're connecting with is APIs, okay? You have API on the devices, you have an API from the bridging devices that connect to the cloud, and then from the cloud, you have even more APIs. So, and I think also that there's been a focus on hardware, and the focus also on the sensor part.
And the sensors are interesting, but what do they produce? They produce data, okay? And I think the big value is in data. And all the companies right now that are coming to this IOP thing, what they see is, how can they use this data and save money, or make more money using this data?
And this is where I think free software plays a big role, because we already go to software. We just need to show to these people that the software is here. We just need to know how to work with it and have ideas how to play with it. And that's what I'm doing here with this demo, which, unfortunately, I cannot show it. I even had a sound of an office, but there's no internet, so that's what we have.
So I think that's also that's been overhyped, this thing on the internet of things. And people thought the internet of things that go to the box, you are putting your fridge into it. I don't think it's interesting if your fridge wins. I don't care what you have in your fridge. So I think this is internet into junk. It's not internet of things.
So we as a company, we are interested in connecting all those things, and we work with these things. So like I said, this VSA, this Bosch series, this Bosch, what they want. They are very old washing machines. And they want to know what's happening with the machines. You know, because you buy a washing machine,
if it's a good quality, you're not going to buy a new one next year. So what they want to do is retrofit something in this machine and then get data out of it. And with this data, they can say, okay, your machine has a problem on the pump. You need to replace it. And then maybe they can provide to the client a proposal and say, why, instead of you replacing the pump, we can propose you a new one just for a little bit more.
So it's interesting for the client and for the company. So when we started, so this company Relay, when it started, was recently brought from this project. And they developed this thing, which is a starter kit. Anyone play with this? In here? No? So it's a starter kit for the Internet of Things.
So it has a master module. It has Wi-Fi. And then it has a bunch of sensors that connect via Bluetooth. So you have a warning app that you run on your phone. And then you can have this thing. It has temperature, humidity, noise level. But the noise level is not very good. Just gives you an idea.
It has luminosity. Yeah, luminosity. And yeah, this is a big deal. And so they're all app batteries. So you can cut all these modules and put them wherever you want. And they all communicate with the master module. So this is the dashboard where we have the solution.
And you can import a device. And then you can manage your devices on this dashboard. So we use a lot of protocols in the Internet of Things, like MQTT. This morning, we talked about co-app, HTTP, WebSockets, et cetera. And I was here in the first talk.
And Peter said that MQTT is really not open, because you cannot extend the protocol. It's true. It was initially a thing that IBM invented. And they saw, wow, this Internet of Things is coming up. Let's see if we can squeeze something in and ride the wave, ride the tiger. So they opened the source of the project.
And now it's supposed to be an official standard, completely open official standard. It's true. It's a very limited protocol. You only have pops up. You cannot request response. So you have to do kind of text on it. And what you do is since you cannot extend it, you modify the payload. And you put the payload. And you can send commands. But then you don't have a response.
So it's an interesting protocol, because it's very lightweight. I think even if you work as a web developer, when I look at it, I see it's interesting for this microservice thing. Now that it's overrated, sometimes people use very complicated solutions for you, for a single message. And you could use MQTT instead, which is much simpler.
It's already there. You just think that they're not aware of it, because you just see HTTP and WebSockets and you just look at it, and you don't notice protocols. So the modern protocols are open and fully standardized. And we have APIs built on that. And I think the value comes from this data, like the washing machine, what you're going to know.
It's you as a client, as a user, as the owner of the machine, one that was going on with the machine. And the company that manufactures the machine wants to know also, because they want to manufacture better machines, and maybe try to sell a new one when they see that that one is starting to have problems. So I think also that IoT, the focus, what I have seen is mostly on hardware, okay?
And they exclude everything else. But I think the most interesting thing is, I mean, the hardware is interesting for sure, and now it's really easy to get, and it's becoming a commodity. What's really interesting is what you can do when you use your hardware and use free software, okay? So all the APIs you can build, that are there, that you can build and use, to utilize that hardware
and make all this change from end to end, where you have the devices on one hand, and you have the data that you get to use devices, and then you can process this data and do many things with it. So hardware is just a tool. I'm using this, some people prefer to use the Pi, you can use other things, you can use microcontrollers if you want.
So we've built a nice sensing device that uses MK2T published to the cloud. It is the cloud, it's a closed cloud, like it is Amazon cloud, but in fact it's built on free software. So there was a person here talking about Postgres. This pushes through a database,
and the database, it pushes this Cassandra, which is completely open project, free software project. I didn't want to raise the issue when that discussion was, because I think there's, who knows here about the CAP theorem, okay? So this gentleman was talking about Postgres, I didn't want to raise the issue about
what happens when you have network partitions, how do they handle this thing, because this is between the data. So he overlooked that aspect, and Cassandra was developed from the start thinking about this issue of every network partitions and distributed systems. So everything is both. In fact, although the cloud is closed, everything is built on open source. Cassandra for the database,
for the weather store, it's Moscow for the MPTT, which is a node.js implementation of MPTT broker, and the HTTP API is built on the cloud. So everything, although I'm pushing through this cloud, everything is, you can build your own if you want, okay?
So I think noise is very important. It's a health issue. And also I think that more and more silence is becoming a rare thing. So we have pipe music everywhere. We have the noise in the cities. So it's really important for you to assess it's a health issue. I think it's a health issue. And it's also a question of you being more productive in your work.
If you have a nice environment, a nice environment, you're not happy, you always feel stressed and you don't want to be here and you wake up in the morning and say, I'm going to go there and be there and set up, being to put up with all this noise, all these people chatting, and you start hating your coworkers because they shout
or they laugh very loud all the time. So I think this is really a very important issue. So this is, so I think in the 18th century, they had much less noise than we have now. So this is the only we've seen of A13. Unfortunately, I cannot do the demo. So this is basically an ARM computer.
It uses an ARM Cortex-A8, ARM core. That's what you use CPU. And then it has, I think the big thing, and this is what we're taking advantages here, it has an audio codec, which is basically an audio input without which it is microphone input. And you can run Linux in it
and you run Linux in it, you just use Alsa, and with Alsa, which is a free software project, you can capture sound. You put a microphone and you capture sound. And this is the whole idea of this project. It's like using only what you really have and try to do something which is useful,
like noise sensing, with just standard components because they are, of course, professional things for measuring noise, but they are really, really expensive. So the demo, unfortunately, I have to skip it. So there are, I can show it here on the terminal. I can show the code running on the terminal here,
but it's not as interesting as there, and I'll do that. So this, what you're going to see here is just a start. Of course, it just built with a bunch of soft scripts. It just used the mosquito clients, the bug sub-clients, the mosquito, which is a reference implementation for MTT as a broker and as clients.
And, but you can go further just with this thing. You will have already something which is really useful and you can go further. And if you want to have, so the microphone that I have here for the demo, it's like an omnidirectional microphone. So it means you capture sound from all directions, but you can have like directional microphones and have a microphone array and you can have a multiplexer
that goes to those microphones and you can do sampling on the room or in the big room. You can do a sampling and know exactly what's going on in each location and not have cross-talking or interference between the noise that comes in one location to the other. So,
let's see. I can do demo here.
Okay, did everyone see this or do you want the, the font to be bigger?
Is everything okay? Bigger? Probably use control plus. Yeah, but I'm not sure it works on this terminal.
Better? So, what I have here is just two scripts. The project is on GitHub. I'll show you this. The project is on GitHub. What I have is two scripts. There's one script that publishes to the gray light cloud
and I'll show you here this working. And you have a script that just subscribes to this topic. So MQTT, everyone here is familiar with MQTT. We talk MQTT topics and all this stuff. It works with topics. You publish according to a topic and this topic can define a hierarchy of topics like you have your house and you have your temperature in your house,
the humidity in your house. So you can say slash house or slash home and then you can say slash home temperature, slash home humidity, slash home luminosity, things like this. Here I'm just using a very simple, just one topic without any hierarchy. In fact, there's kind of a hierarchy, but it's inside. It's in the payload and you see this.
There's this thing that, it's called path. All right? Cause they're called path and it's the path. It's called path just because we didn't found, we had to find a name that was not prone to confusion when you have different devices when you build a project for a fridge. But it's not directly related to this MQTT topic.
And so this published this topic. So MQTT can have like semantic and this means like, this is the MQTT topic. So this is the API version in one and this is the topic. As you see, it's just a UUID. It's a 128 byte unique number. And what happens is this,
this thing here doesn't have any mini. It's just a way for you to associate a physical or logical device with a, yeah, with a topic, nothing more. So going to do here and you will see this. So how does this work? So this uses SOX. This uses SOX. So SOX, everyone here knows SOX,
like it's a kind of a Swiss tool for working with sound. You can do a lot of things with it. So it uses SOX. It does a sample of a sound of what's the second long sample. I'm just interested in here in things that affect humans.
And this means that the sample frequency is half, it's just 22 kilohertz, okay? I'm not using like the CV specification because I don't, it's not about, I'm interested to know what some affect humans and you know that above, it's something around the three kilohertz. So I'm cutting this on the 10 kilohertz.
So this is what I did. So we published this. We published this, it sent, and then we have here the data. So there's three things that are sent on this payload.
So here's the path, which is the RMS value. And this is a relative value, okay? This is, so this is represented as a 32-bit sine integer and sine integer. So this is a relative value of the amplitude. And so the meaning is the number
this has to do with the specification in terms of the way we have a region to develop through this. And then because this is an RMS value, this is a mean value, and this is a rough estimate of the frequency, okay? Of the frequency that the microphone is the microphone. Okay, now I can see here if I want, I can hit here,
subscription, okay? I can see here, publish it in, get this thing here, receive the value here.
So if I want to share you,
so this is the thing I'm using here for the demo that unfortunately I wouldn't be able to do. I can use this demo if you find the internet cable, I can show this working for you. So this is the device I'm using.
So this is a small ARM computer. So what I've shown here, this was done with a very prepping microphone, I can show you. This is just from some cheap headphones. This is not even a high quality microphone, but this is enough for you to get an idea, okay? But if you want to be really serious, you can use like a professional microphone.
You have this thing here, costs around like $80. This is an American thing. This is a professional microphone. This is calibrated, which means that the values that you have relative, then you can, when you calibrate it, then you can have a million in terms of dBs, SPL, and some version.
So other things, yes. So the code is here. It's on GitHub. Just a bunch of shell scripts. Yeah, this is what we have here. So this is the publish. This is what it is.
Very simple. Just uses Mosquito Publish uses GQ. It's like a JSON parser on the command line just to show the payload nicer. And it has a bunch. Just a very simple thing. And the subscribe is even simpler. So this is just an idea which I cannot do the demo. What you can do with just free software
using the APIs this free software provides and the sky's the limit. This is just an idea about sound sensing. And it's a really important problem. And most solutions out there are really too complex I think because they are focused towards hardware, use like analog to digital
converters. But you already have an analog to digital converters if your device has an audio codec on it. So you can use that and start playing with it. You can even if you want to do a basic measurement you can use this also. If you want. So unfortunately you can't do the demo
so that's it. Any questions? A comment about the information from your refrigerator to the Twitter.
I mean I agree this is not a very good use case. I think this is a proof of the concept that you can connect the constrained device to web services. Unfortunately in this case the reason we chose social media like Twitter or
Facebook because they actually provide an interface to do your apps. I mean the idea is for one example if I send my heart rate information to my health care web server. But unfortunately at this moment it's very hard to
have such a server support. Yes. This is a good point. I think that the reason why they use social media because I think they do it just as a marketing device because it's like it gets marketing. It gets interesting. It gets clicks. I think it was just this. Frankly I don't see any
interest in sending your fridge contents to Twitter. On the other hand if you can tell that the fridge has a problem I think this is really useful. It's really useful for you as the owner of the fridge and it's really useful for you as the manufacturer of the fridge. I just think it was just a marketing thing and it got a lot of bad press for IOT because there are
a lot of security issues with it. Good. That's right. I'm sorry I think we have to cut this. Thank you very much.