Welcome to our final blog from the eBay Internet of Things collections series!
In our penultimate post in this series, we were showing you how to implement a low-tech version of home automation using NFC and the EVRYTHNG engine.
This time we’ll look at the bleeding-edge version of our connected home! A home where appliances can be piped together easily to create a dynamically reconfigurable home. Just like you can use IFTTT or Yahoo Pipes to create smart workflows for your data (e.g. if I tweet this, post this to my LinkedIn profile and update this Google Spreadsheet) you should be able to configure the real world just as it suits you. This is what we call: Physical Mashups, i.e. the fast and easy composition of the services of physical devices to create unforeseen applications that meet our needs! Sorry for getting over-excited here but Physical Mashups were a big chunk of my PhD 🙂
The Web is mashable mainly because of APIs (Application Programming Interfaces). This is a little revolution that started a few years ago whereby Websites slowly but steadily started to get APIs, making them Web apps rather than plain sites, the Programmable Web directory is here to witness it! So, the first step in building our futuristic house is to make sure all our devices are accessible via an API (a REST API Link), either directly or indirectly through a gateway or online service like the EVRYTHNG API.
While we won’t be able to review all appliances you have in your home here let us discuss three cases to see how they fit in the picture:
1) First, appliances that come directly with a Web API like the Hue Lamps we talked about in another recipe. These are very easy to integrate to Physical Mashups as they basically tick all the boxes: they are accessible on the IP network and offer a REST API!
2) Secondly, appliances that are hooked up to or proxied by a Web of Things Cloud service such as the EVRYTHNG API. As an example, consider the Smart Coffee Machine we created in a previous post in this series. These are also easy to integrate because the cloud service offers a Web API for the devices.
3) Thirdly, devices that are neither offering a Web API directly, nor through a Cloud service (how dare they in 2014? ;-)). A good example would be all the not-so-smart devices that you have at home like your plain-old-lamps, fans, kettles, old-school-TVs, etc. Well, for those not all hope is lost: we can still make them smart at least at the basic level (on/off) without too much effort. For this we will hack an 433Mhz AM power-switch transmitter, no clue what this is? Well it is a set usually containing a remote control and a number of radio powered power-switches like the one in our collection.
Then, thanks to the following tutorial we connect a $5 RF transmitter to an Arduino then connect these to a Raspberry Pi turning it into a 433Mhz RF remote control!
We finally need to Web-enable this so that we can trigger the Raspberry PI “remote control” by means of REST calls. There are several ways of doing this like the very neat heimcontrol.js or the more featureful Webiopi.
Regardless of which one you pick you should now be able to turn on and off literally any device connected to your RF power-sockets!
Last but not least, the mashability comes into play: “How do you wire all these devices together in the same way that you would create Web Mashups?” Well this is where Physical Mashup editors come handy: they let you rewire your home visually! Let me introduce you to two of them: WoT-a-Mashup is a prototyping tool that lets you create your mashups in a snap, directly from your browser (currently only Firefox is supported). It is built on ClickScript, an IDE and great visual language designed to teach kids the art of programming, so it is quite easy to grasp.
Basically each resource you want to integrate into your mashup (including the physical ones!) is a little box that accepts a number of inputs and has 0 or 1 output.
We created two simple EVRYTHNG modules, one that lets you read a property of a Thng (see here) and one that lets you update the property of a Thng.
Now, we can use these two simple modules and combine them with the default modules to create a workflow – workflow below is an example of combining modules. It fetches temperature data that you’ve pushed to the EVRYTHNG API. You can find code examples of how to do this with an OpenPicus Flyport (here) or an Arduino (here).
Then, we check if the temperature is greater than 10; if it is, we send an off command to a device controlled by the EVRYTHNG API (e.g., a heater).
We can also create the same type of workflow to include our Raspberry Pi remote controlled devices. All we need to do is to create our own mashup module. Let’s look at the code of the simple EVRYTHNG module I created as an example.
Basically, we create two simple Javascript methods, one for reading the property (GET), one for updating it (PUT). Both methods also contain the descriptions of the expected inputs and outputs of our module. We then place this file in a folder underneath the /lib folder and name it init.js and off we go, we have created a new module!
This tool is great for quick-prototyping but because it runs your workflows in the browser, it isn’t really a viable option for long-running mashups and real-world use cases.
This is when the great Node-RED enters the game! Node-RED provides a browser-based mashup editor that makes it easy to wire together flows using the wide range nodes in the palette, but it actually runs the mashups on Node.js which means that even when closing your browser they’ll still run!
Node-RED is slightly more complicated to use than the Clickscript language, but it offers a lot more options and is truly tailored for the IoT. To interact with the EVRYTHNG API you could simply use the provided HTTP module, but to make it even easier, we created a Node-RED library for the EVRYTHNG API which you can download and install from here. Note that it currently only offers the option to read and update EVRYTHNG Properties, but we’ll add more features soon!
You can see a sample workflow below where we connected our EVRYTHNG-connected Smart Coffee Machine to Twitter so that if we send a tweet with a special hashtag, we get our favorite coffee served straight away!
Adding our Raspberry Pi remote controlled devices is as easy as pi(e)! Indeed, because they are behind a REST API, all we need to do is to use the HTTP module to issue the REST calls. Finally, we need a place for our workflows to run. Fortunately, Node-RED runs can be installed on a Rasberry Pi as well (see here), so we can actually push it to our Pi where the workflows will be running until we terminate them.
Here we go, we closed the loop and can now start rewiring our home, thanks to the Web of Things and Physical Mashups!
behind the counter allergy medicine generic allergy pills how long do antihistamines take to work
sleeping pills prescription online purchase modafinil online cheap
deltasone 5mg brand buy prednisone 20mg without prescription
prescription heartburn pills brand glimepiride 4mg
best cure for teenage acne benzoyl peroxide order online strongest acne over the counter
best generic allegra buy generic ketotifen online claritin allergy sinus 12hr costco
most common nausea medication avapro for sale
isotretinoin 20mg us accutane price brand isotretinoin
where can i buy doxylamine buy generic meloset for sale
brand amoxil 500mg amoxicillin where to buy amoxicillin 1000mg uk
buy zithromax no prescription buy cheap generic zithromax buy zithromax 500mg pill
order neurontin 800mg pills gabapentin 800mg tablet
azithromycin 250mg without prescription oral azipro 250mg buy azipro 500mg without prescription
lasix 100mg without prescription buy furosemide pills
prednisolone 10mg usa omnacortil 40mg usa order omnacortil 20mg generic
buy prednisone tablets cheap prednisone 10mg
amoxil 500mg price amoxicillin without prescription amoxil 250mg brand
cheap doxycycline order doxycycline for sale
buy albuterol 4mg without prescription ventolin oral buy albuterol pills
buy augmentin 1000mg pill buy generic augmentin 625mg
levothroid pills levothroid medication order levothroid generic
generic vardenafil buy levitra 10mg online cheap
order clomiphene 100mg sale clomiphene sale clomid 50mg sale
Quando suspeitamos que nossa esposa ou marido traiu o casamento, mas não há evidências diretas, ou queremos nos preocupar com a segurança de nossos filhos, monitorar seus telefones celulares também é uma boa solução, geralmente permitindo que você obtenha informações mais importantes.
semaglutide 14mg us order semaglutide 14 mg online order rybelsus 14 mg for sale
buy rybelsus 14 mg buy rybelsus tablets semaglutide canada
prednisone 10mg ca deltasone 5mg uk cost deltasone 20mg
generic isotretinoin 10mg accutane without prescription accutane canada
brand albuterol inhalator how to get albuterol without a prescription purchase albuterol without prescription
amoxil us buy generic amoxicillin amoxil 1000mg uk
brand amoxiclav clavulanate cost augmentin 375mg oral
zithromax online order zithromax 250mg ca azithromycin over the counter
levothyroxine over the counter order synthroid sale synthroid 150mcg sale
prednisolone 10mg pill order prednisolone 40mg online cheap order prednisolone 20mg
serophene us buy clomid generic serophene tablet
buy neurontin 600mg without prescription neurontin 800mg pills order neurontin
real viagra pharmacy prescription order sildenafil 100mg generic cheap sildenafil generic
Localize por meio do software de sistema “Find My Mobile” que acompanha o telefone ou por meio de software de localização de número de celular de terceiros.
purchase lasix generic purchase furosemide without prescription buy furosemide 100mg for sale
rybelsus online order buy rybelsus cheap rybelsus 14 mg oral
order monodox online cheap order monodox without prescription buy doxycycline 200mg generic
order levitra 10mg pills levitra 20mg cost order levitra online cheap
online casino for real cash wind creek casino online games poker online for fun
hydroxychloroquine 200mg usa hydroxychloroquine 200mg canada order hydroxychloroquine for sale
pregabalin oral buy pregabalin without prescription order pregabalin online
cialis tadalafil 10mg tadalafil for sale online buy cialis 40mg sale
oral aristocort generic triamcinolone 10mg triamcinolone us
order cenforce 100mg cenforce without prescription cenforce for sale online
purchase clarinex sale clarinex 5mg usa clarinex usa
cheap aralen 250mg where to buy aralen without a prescription buy aralen pills for sale
order loratadine online loratadine price order claritin for sale
metformin tablet metformin pill order glucophage without prescription
buy dapoxetine 90mg without prescription misoprostol 200mcg without prescription buy misoprostol pills for sale
xenical 60mg sale buy xenical for sale diltiazem generic
lipitor 40mg oral brand atorvastatin 10mg generic atorvastatin 80mg
purchase amlodipine purchase norvasc amlodipine oral
purchase zovirax for sale buy acyclovir 400mg pill zyloprim 300mg generic
order lisinopril 5mg pills buy lisinopril 10mg for sale buy lisinopril medication
buy omeprazole pill prilosec cheap order omeprazole 10mg pill
order motilium buy sumycin pill order generic sumycin 250mg
buy generic metoprolol buy lopressor 100mg sale lopressor 50mg canada
where can i buy cyclobenzaprine ozobax online order lioresal over the counter
tenormin 50mg without prescription buy atenolol 50mg pills order atenolol 100mg without prescription
toradol price colcrys price colchicine for sale
depo-medrol order online medrol australia medrol 4 mg tablet
buy research papers online no plagiarism need essay written paperwriter
inderal 20mg ca buy plavix 150mg pill buy clopidogrel 150mg pill
buy methotrexate 10mg for sale order coumadin 5mg pill medex cost
mobic 15mg ca buy cheap mobic cheap celebrex 100mg
order metoclopramide 20mg without prescription purchase metoclopramide pill losartan 25mg sale
flomax 0.4mg tablet buy celebrex online cheap buy celecoxib 100mg pills
nexium 40mg over the counter buy esomeprazole pills for sale topiramate pills
ondansetron 8mg cost buy spironolactone no prescription brand spironolactone 25mg
imitrex for sale online buy levaquin 250mg pills oral levaquin 250mg
buy zocor 20mg generic order zocor 20mg sale valtrex uk
avodart over the counter buy zantac no prescription purchase zantac online cheap
purchase ampicillin for sale cheap amoxil generic cheap amoxil tablets
propecia 1mg generic oral proscar cost fluconazole 200mg
order generic baycip – order cephalexin 125mg pill order augmentin 625mg pill
baycip online – order generic cipro 500mg order augmentin 625mg generic
ciplox 500mg brand – amoxicillin over the counter
purchase erythromycin
order flagyl pills – cleocin buy online buy generic zithromax online
ivermectin order online – cefuroxime 500mg pill buy tetracycline online cheap
buy stromectol 6mg – ciplox over the counter buy sumycin 250mg for sale
valacyclovir over the counter – buy nemazole generic acyclovir drug
buy acillin buy acillin online amoxil buy online
oral flagyl – buy cefaclor pills buy azithromycin 250mg for sale
buy lasix 40mg online cheap – buy candesartan 8mg sale buy captopril paypal
glucophage 1000mg drug – buy generic lamivudine buy lincocin 500 mg without prescription
where can i buy cheap retrovir – order lamivudine generic zyloprim 300mg canada
buy generic clozaril for sale – buy generic clozaril online pepcid 20mg pills
cost quetiapine – zoloft order eskalith online
anafranil 50mg over the counter – order paroxetine online doxepin 25mg us
order hydroxyzine 10mg sale – purchase endep for sale order endep 25mg without prescription
clavulanate for sale – buy bactrim 960mg generic purchase cipro
cheap amoxicillin sale – amoxil over the counter order cipro 500mg generic
azithromycin 500mg ca – ofloxacin cheap where to buy ciprofloxacin without a prescription
cleocin 150mg generic – purchase chloramphenicol without prescription purchase chloromycetin for sale
ivermectin 12 mg for humans – stromectole online cefaclor 500mg uk
cheap albuterol inhalator – buy generic seroflo inhalator buy theo-24 Cr online
medrol buy – order zyrtec 10mg for sale buy azelastine 10 ml online cheap
desloratadine price – buy generic beclamethasone for sale albuterol 4mg without prescription
glucophage 500mg usa – januvia pills precose 50mg generic
purchase glyburide online cheap – buy dapagliflozin without a prescription purchase dapagliflozin without prescription
buy repaglinide 1mg generic – buy jardiance 10mg for sale buy jardiance pills
mexican border pharmacies shipping to usa: Online Pharmacies in Mexico – mexican pharmaceuticals online
top 10 online pharmacy in india http://indiaph24.store/# cheapest online pharmacy india
indian pharmacy paypal
order rybelsus 14 mg sale – buy semaglutide 14 mg online cheap buy DDAVP generic
lamisil 250mg pill – order fluconazole 200mg sale grifulvin v drug
how to buy ketoconazole – generic mentax itraconazole buy online