Coder Social home page Coder Social logo

wifiswitch's Introduction

wifiSwitch

MQTT wifi wall switch using ESP8266-01

Description

Switch can be controlled via MQTT or touch button.

it is well suited for 68mm Europe wall boxes.

Switch is based on wifi board ESP8266-01.

Code is implemented in Arduino. Source files can be found in repository.

This project requires 220V mains to operate properly

If you are not familiar with mains DO NOT TRY TO INSTALL THIS SWITCH

Proceed only if you know what you are doing !!!

Board can be ordered on OSH park: https://oshpark.com/shared_projects/9JxnbNwu

Schematics

Schematics for this project was designed using Eagle.

Eagle project can be found in repository.

Eagle Scheme

Board

Eagle Board

BOM (Bill Of Materials)

TODO

3D model

3D model was designed in Sketch-Up and exported to STL files.

Model consists of 3 parts: box, frame and button cover.

3D model files and exported STL files can be found in repository.

Exploded view looks like this:

3D exploded view

Setup

Wiring

Be sure you know what you are doing! Never touch any live wires ! Be sure to turn off electricity when dealing with mains!

If you do not have Neutral wire in the wall box (which you probably don`t), you will have to wire new cable and connect it to Neutral.

wiring diagram

MQTT broker

To use this switch you need to have an MQTT broker like Mosquitto installed on a server or RaspeberryPi in your local wifi network.

To install Mosquitto, please follow this guide: Setup mosquitto MQTT broker

or this guie for RaspberryPi: Setup mosquitto MQTT broker on RPi

The bast practise is to set static IP address to the MQTT broker server or raspberryPi running mosquitto.

WifiSwitch settings

This switch is using WifiManager project to set-up switch parameters.

When the switch is connected to mains, it tries to connect to configured Wifi network and MQTT broker. If it is not able to connect or is not configured, it enters the configuration mode.

Configuration mode

When in configuration mode, the switch creates its own wifi network. This network`s SSID consists of string "ESP_HOME" followed by its MAC address

e.g: ESP_HOME A1:B2:3A:4E:2D:E2

This network has no Password.

After you connect to this network (e.g using smartphone) enter IP address

192.168.4.1

Then configure:

wifi SSID

wifi Password

MQTT broker IP (or DNS name)

MQTT broker port

MQTT username

MQTT password

MQTT topic

Final Product

Assembled board

Assembled board 1

Assembled board 2

Assembled switch

Assembled switch 1

Assembled switch 2

Assembled switch 3

wifiswitch's People

Contributors

marekstenchlak avatar

Watchers

James Cloos 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.