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 for this project was designed using Eagle.
Eagle project can be found in repository.
TODO
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:
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.
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.
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.
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