SlideShare une entreprise Scribd logo
1  sur  12
We Power
Connected Things
Hardware development at the speed of software. www.wildernesslabs.co
Bryan Costanich
@bryancostanich
- The dream of connected things
- Controlling household electricity with a
relay
- Exposing control via a web API
- Connecting to that Web API from a
Xamarin App
Building a Netduino Powered
Connected Coffee Maker
Wilderness Labs
Relaunched Netduino in March.
Added Mac support.
Netduino stock at Amazon.com and
Mouser.com (international).
Building a vNext connected things
platform.
Actively working on Netduino.
developer.wildernesslabs.co
community.wildernesslabs.co
Connected Coffee Maker
Solution
Power Control
Household electricity (110V/240V) is
controlled by a relay.
Relays are electromechanical and isolate
circuits.
Controlled by a simple on/off via a digital
I/O pin.
Design @ 3D_Print_Designs repo
Assembly instructions in blog.
OutputPort relay =
new OutputPort(Pins.GPIO_PIN_D2, false);
relay.Write(true);
Web Server
Purpose-built for Netduino.
Modern, RESTful Web API/
Built-in JSON Support.
Maple Web Server Host
public class RequestHandler : RequestHandlerBase {
private static bool _isPowerOn;
public void getStatus() { StatusResponse(); }
public void postTurnOn() { TogglePower(true); StatusResponse(); }
public void postTurnOff() { TogglePower(false); StatusResponse(); }
private void TogglePower(bool val) {
_isPowerOn = val;
Ports.ONBOARD_LED.Write(val);
Ports.GPIO_PIN_D1.Write(val);
}
private void StatusResponse() {
this.Context.Response.ContentType = "application/json";
this.Context.Response.StatusCode = 200;
Hashtable result = new Hashtable { { "isPowerOn", _isPowerOn.ToString().ToLower() } };
this.Send(result);
}
}
get:/Status
post:/TurnOn
post:/TurnOff
Xamarin Mobile App
Xamarin.Forms + HttpClient
async private Task<bool> PowerCommand(string command) {
HttpClient client = new HttpClient();
client.BaseAddress = new Uri("http://" + _hostAddress + "/" + _apiBase);
var response = await client.PostAsync(command, null);
if (response.IsSuccessStatusCode) {
if (command == "turnon") {
App.ApplianceStatus = ApplianceStatus.On;
} else {
App.ApplianceStatus = ApplianceStatus.Off;
}
}
return response.IsSuccessStatusCode;
}
Possible Expansion Projects
On timer.
Feedback loop for heat control w/temp sensor; what temp do
you like your coffee?
Coffee done push notification.
Scheduler.
Thanks.
www.wildernesslabs.co
slideshare.net/bryancostanich
Code here
Github.com/WildernessLabs/Netduino_Samples/Connected_Coffee_Maker

Contenu connexe

Similaire à Hacking your coffee maker; building a connected appliance with Netduino and Xamarin

Embedded web server application based automation and monitoring system
Embedded web server application based automation and monitoring systemEmbedded web server application based automation and monitoring system
Embedded web server application based automation and monitoring system
sudhakar5472
 
Controlling the World with Arduino,JavaScript & Azure
Controlling the World with Arduino,JavaScript & AzureControlling the World with Arduino,JavaScript & Azure
Controlling the World with Arduino,JavaScript & Azure
Magnus Green
 
CaseStudy_EnergyETC
CaseStudy_EnergyETCCaseStudy_EnergyETC
CaseStudy_EnergyETC
Steve Jones
 

Similaire à Hacking your coffee maker; building a connected appliance with Netduino and Xamarin (20)

Embedded web server application based automation and monitoring system
Embedded web server application based automation and monitoring systemEmbedded web server application based automation and monitoring system
Embedded web server application based automation and monitoring system
 
Ionic event: March 2021
Ionic event: March 2021Ionic event: March 2021
Ionic event: March 2021
 
Home Energy Management Gateway
Home Energy Management GatewayHome Energy Management Gateway
Home Energy Management Gateway
 
VJUG - Reacting to an event driven world
VJUG - Reacting to an event driven worldVJUG - Reacting to an event driven world
VJUG - Reacting to an event driven world
 
FYP PPT
FYP PPTFYP PPT
FYP PPT
 
HyPPO - Hybrid Performance-aware Power-capping Orchestrator
HyPPO - Hybrid Performance-aware Power-capping OrchestratorHyPPO - Hybrid Performance-aware Power-capping Orchestrator
HyPPO - Hybrid Performance-aware Power-capping Orchestrator
 
Graduation Project on "SMART HOMES & RENEWABLE ENERGY" PowerPoint Presentation
Graduation Project on "SMART HOMES & RENEWABLE ENERGY" PowerPoint PresentationGraduation Project on "SMART HOMES & RENEWABLE ENERGY" PowerPoint Presentation
Graduation Project on "SMART HOMES & RENEWABLE ENERGY" PowerPoint Presentation
 
Electric Cloud
Electric CloudElectric Cloud
Electric Cloud
 
Automation of residential electricity cut off using network embedded controller
Automation of residential electricity cut off using network embedded controllerAutomation of residential electricity cut off using network embedded controller
Automation of residential electricity cut off using network embedded controller
 
IOT: Home Automation using Android Application
IOT: Home Automation using Android ApplicationIOT: Home Automation using Android Application
IOT: Home Automation using Android Application
 
vensoft technologies http://www.ieeedeveloperslabs.in/ pc controlled pick an...
vensoft technologies http://www.ieeedeveloperslabs.in/  pc controlled pick an...vensoft technologies http://www.ieeedeveloperslabs.in/  pc controlled pick an...
vensoft technologies http://www.ieeedeveloperslabs.in/ pc controlled pick an...
 
Development of Smart Home security system using Raspberry Pi
Development of Smart Home security system using Raspberry PiDevelopment of Smart Home security system using Raspberry Pi
Development of Smart Home security system using Raspberry Pi
 
Controlling the world with Arduino & JavaScript
Controlling the world with Arduino & JavaScriptControlling the world with Arduino & JavaScript
Controlling the world with Arduino & JavaScript
 
Controlling the World with Arduino,JavaScript & Azure
Controlling the World with Arduino,JavaScript & AzureControlling the World with Arduino,JavaScript & Azure
Controlling the World with Arduino,JavaScript & Azure
 
Karsten Held: Internet Of Things (IOT), SmartBuilding & SmartHome Research (J...
Karsten Held: Internet Of Things (IOT), SmartBuilding & SmartHome Research (J...Karsten Held: Internet Of Things (IOT), SmartBuilding & SmartHome Research (J...
Karsten Held: Internet Of Things (IOT), SmartBuilding & SmartHome Research (J...
 
Jfokus - Reacting to an event-driven world
Jfokus - Reacting to an event-driven worldJfokus - Reacting to an event-driven world
Jfokus - Reacting to an event-driven world
 
Embedded Web Server based Home Automation using Raspberry PI
Embedded Web Server based Home Automation using Raspberry PIEmbedded Web Server based Home Automation using Raspberry PI
Embedded Web Server based Home Automation using Raspberry PI
 
Home automation under wi fi through android apps from any smart phone
Home automation under wi fi through android apps from any smart phoneHome automation under wi fi through android apps from any smart phone
Home automation under wi fi through android apps from any smart phone
 
CaseStudy_EnergyETC
CaseStudy_EnergyETCCaseStudy_EnergyETC
CaseStudy_EnergyETC
 
Iot based load control over wifi 14000
Iot based load control over wifi 14000Iot based load control over wifi 14000
Iot based load control over wifi 14000
 

Plus de bryan costanich (7)

Futures in Computing
Futures in Computing Futures in Computing
Futures in Computing
 
Advanced android app lifecycle + Patterns
Advanced android app lifecycle + PatternsAdvanced android app lifecycle + Patterns
Advanced android app lifecycle + Patterns
 
C# rocks
C# rocksC# rocks
C# rocks
 
Cross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with XamarinCross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with Xamarin
 
Going mobile - A Technical Job Prep for Vassar Students
Going mobile - A Technical Job Prep for Vassar StudentsGoing mobile - A Technical Job Prep for Vassar Students
Going mobile - A Technical Job Prep for Vassar Students
 
Cross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual StudioCross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual Studio
 
Cross Platform Development with Xamarin
Cross Platform Development with XamarinCross Platform Development with Xamarin
Cross Platform Development with Xamarin
 

Dernier

Dernier (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Hacking your coffee maker; building a connected appliance with Netduino and Xamarin

  • 1. We Power Connected Things Hardware development at the speed of software. www.wildernesslabs.co Bryan Costanich @bryancostanich
  • 2. - The dream of connected things - Controlling household electricity with a relay - Exposing control via a web API - Connecting to that Web API from a Xamarin App Building a Netduino Powered Connected Coffee Maker
  • 3. Wilderness Labs Relaunched Netduino in March. Added Mac support. Netduino stock at Amazon.com and Mouser.com (international). Building a vNext connected things platform. Actively working on Netduino.
  • 7. Power Control Household electricity (110V/240V) is controlled by a relay. Relays are electromechanical and isolate circuits. Controlled by a simple on/off via a digital I/O pin. Design @ 3D_Print_Designs repo Assembly instructions in blog. OutputPort relay = new OutputPort(Pins.GPIO_PIN_D2, false); relay.Write(true);
  • 8. Web Server Purpose-built for Netduino. Modern, RESTful Web API/ Built-in JSON Support.
  • 9. Maple Web Server Host public class RequestHandler : RequestHandlerBase { private static bool _isPowerOn; public void getStatus() { StatusResponse(); } public void postTurnOn() { TogglePower(true); StatusResponse(); } public void postTurnOff() { TogglePower(false); StatusResponse(); } private void TogglePower(bool val) { _isPowerOn = val; Ports.ONBOARD_LED.Write(val); Ports.GPIO_PIN_D1.Write(val); } private void StatusResponse() { this.Context.Response.ContentType = "application/json"; this.Context.Response.StatusCode = 200; Hashtable result = new Hashtable { { "isPowerOn", _isPowerOn.ToString().ToLower() } }; this.Send(result); } } get:/Status post:/TurnOn post:/TurnOff
  • 10. Xamarin Mobile App Xamarin.Forms + HttpClient async private Task<bool> PowerCommand(string command) { HttpClient client = new HttpClient(); client.BaseAddress = new Uri("http://" + _hostAddress + "/" + _apiBase); var response = await client.PostAsync(command, null); if (response.IsSuccessStatusCode) { if (command == "turnon") { App.ApplianceStatus = ApplianceStatus.On; } else { App.ApplianceStatus = ApplianceStatus.Off; } } return response.IsSuccessStatusCode; }
  • 11. Possible Expansion Projects On timer. Feedback loop for heat control w/temp sensor; what temp do you like your coffee? Coffee done push notification. Scheduler.

Notes de l'éditeur

  1. Imagine waking up, grabbing your phone, and turning on your coffee pot from bed.
  2. We’re building the world’s first Connected Things OS. Secure, ultra low power features, over the air updates, managed from the cloud. Runs on real connected things hardware; microcontrollers like the ARM Cortex-M series. Full .NET standard apps + Javascript support. Developer Platform: Target .NET developers first. Full .NET Standard 2.0 Support. Then JavaScript (Node + Johnny Five) Open OS for other platforms.
  3. Great Netduino documentation Electronics tutorial Etc.
  4. A place to get help and meet other netduino developers