Internet of Things - Christmas tree project

Internet of Things - Christmas tree project

With IoT a 2015 buzz word, I thought I would connect my christmas tree to the internet and secure access to it using 2 factor authentication. See below video.

Hardware...

- Arduino Uno
- Ethernet shield
- Relay
- 4-way adapter

Software\Services...

- Arduino IDE 1.6.6
- Pushingbox as an easy way to email out from the project.
- AirWatch 8.2 (kinda!)

Arduino code: Download


Description...

So the code is pretty easy as there are 'includes' available to setup the ethernet fundamentals so that you only then have to give basic information like IP address and MAC address to gain a DHCP address and connect to the internet. The Relay again very simple to implement as you just need to define the PIN that is going to control the on\off function of the relay.

I am using the Arduino as a HTTP server to host the controls in HTML to flick the switch on and off. Arduino code is based on C/C++ so in order to create HTML you need to print lines of HTML using C. This is interesting as there are variables that I wanted to pass from the C code into HTML and JavaScript. It gets tricky as double quotes cannot be sent to HTML as they break in C. So some thought is needed to code using quotes. The switching of the relay is flicked using when the "submit" checkbox in the HTML form is enabled. Using JavaScript this was only enabled if the correct token was entered by the user hence the 2 Factor Auth.

The 2 Factor Auth is again really basic. When the client accesses the HTTP Server a random number is generated in C. This variable is transferred to a JavaScript variable for validation when the user enters the emailed PIN. Also there is a call to pushing box with this random number. Pushing box is a free push notification service that allows you to email, tweet or Push to any platform with a HTTP call. I have used this in the past to mail me when a camera motion detector goes off for example. Calling the API and sending the random number will email me my token. 

The end user experience is that I load the HTTP server, a random code is generated and emailed to me. I enter this code from my email into the form and it enables the checkbox to flick the Christmas Tree on and off.

Merry Christmas!!!

Steven Horton (family)

Senior Electronics Design Engineer at Haldex Brake Systems

9 年

Hi Dave, check out this year's IOT Christmas tree lights. This year I am using a Particle Core to locally sequence the Christmas lights. PWM outputs are used to drive automotive low-side drivers to give the 36V required by the lights. This means that I can re-code the lighting sequence algorithm from any internet enabled device over our wi-fi and read back the local spark variables. Two local potentiometers allow the fade time and dwell at end settings to be adjusted without changing the code. Dad.

回复
Felipe San Román

Presales Engineer at Okta, really interested in identity management, cloud and infrastructure.

9 年

Always learning from you!! Merry Christmas, mate.

回复
Dor Zakai

Sr. Director, Solutions Engineering, EMEA

9 年

WOW!!!! next year cert based auth for your main door. You're the MAN!!!

回复
Stefan Tacke

Technical Product- and Sales Manager Omnissa Modern Private Cloud (MPC)

9 年

Awesome!!

回复
Karl Seaton

EMEA & LATAM Technical Lead, GSI Systems Engineering @ Palo Alto Networks | Cyber Security | DDI | Digital Workspace | EUC | Cloud | SaaS | GRC

9 年

You the man Dave!

要查看或添加评论,请登录

Dave Horton的更多文章

  • The CISSP certification journey

    The CISSP certification journey

    The CISSP from ISC2 is widely regarded as the pinnacle of security certifications. Once you start reading into the…

    3 条评论
  • GDPR and Business Mobility - Part 2

    GDPR and Business Mobility - Part 2

    In Part 1, we set the scene for the impact that General Data Protection Regulations (GDPR) was going to have on the…

    3 条评论
  • GDPR and Business Mobility - Part 1

    GDPR and Business Mobility - Part 1

    General Data Protection Regulations or GDPR is likely to be something you'll hear about quite often over the next two…

    7 条评论
  • Keynote: iOS 10 and enterprise.

    Keynote: iOS 10 and enterprise.

    For a mobility tech geek, June is a great time of year to see what problems Apple have seen in the current use of their…

    5 条评论
  • Consumer IoT in 2016

    Consumer IoT in 2016

    2015 was certainly a momentum gaining year for Internet of Things, or at least for the buzz word. Consumers are feeling…

社区洞察

其他会员也浏览了