Giter Club home page Giter Club logo

webcontrolledswitch's Introduction

Web and Cloud Controlled Switch

A web controlled switch based on ESP8266 devices such as the NodeMCU and WeMos D1.

Development Environemnt

The code is written in modern C++ using Visual Studio with VisualMicro add-on.

Before opening the solution make sure that you've installed both Esp8266 and Azure IoT SDK libraries. The best way is to use Arduino IDE (download from http://https://www.arduino.cc/en/Main/Software).

Note: use the Win32 application (Windows Installer) and not the "Windows App" version.

Setting Esp8266 support

First add esp8266 boards to board manager:

Install esp8266 boards

  • Open boards Manager (Tools -> Board:xyz -> Boards Manager)
  • Navigate to esp8266 by esp8266 and click install
Add Azure IoT SDK libraries

The project needs the following libraries:

  • AzureIoTHub
  • AzureIoTProtocol_HTTP
  • AzureIoTProtocol_MQTT
  • AzureIoTUtility

All of those can be installed using Arduino Library Manager (Sketch -> Include Library -> Manage Libraries...)

After adding board support and installing the libraries above you can open the solution file using Micro Studio and compile.

Running the code

Build the circuit by following the instructions here

Download files for printing from here.

Look at the configuration.h file, here you can set the default access point mode router credentials.

Once you flash the device, you should point your computer/phone/tablet to the device Access Point SSID, and go to settings: http://192.168.4.1/appkey/setup

Once you select the local Access Point and reset the device. Use a browser that is connected to the same network and browse to: http:///appkey

to make the communicationm with the device secured, change the appkey in the configuration file to any secret path you like.

Enjoy,

Alon Fliess.

webcontrolledswitch's People

Contributors

dhelper avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.