This project was designed to facilitate deployment of a Wi-Fi relay. Advanced users can also extend its functionality with ease.
-
Open .ino file in Arduino IDE
-
Select COM port and Board in the tools
-
Change the following constants:
WIFI_SSID
- SSID of your Wi-Fi network,WIFI_PASSWORD
- Wi-Fi password,MQTT_HOST
,MQTT_LOGIN
,MQTT_PASSWORD
- as required to connect to your MQTT Broker.
It is also recommended to change your
OTAUSER
andOTAPASSWORD
. -
Flash the firmware to the ESP.
The MQTT Protocol is used in many smart home projects, and this repository is no exception. A server with a MQTT Brocker installed and a client that can handle requests are required.
To enable or disable the relay, send 1
or 0
to setStateTopic
.
Сurrent status of the relay can be obtained in stateTopic
.
light:
- platform: mqtt
name: "Light 1"
command_topic: "dvor/light1/state/set"
state_topic: "dvor/light1/state"
payload_on: "1"
payload_off: "0"
qos: 1
ipTopic
- returns the IP address after entering boot modebootTopic
- required for HTTP updatersetStateTopic
- necessary to get information from MQTT brokerstateTopic
- checks whether the relay is enabled
- Send
1
inbootTopic
to enable firmware update mode - Get relay's IP address from
ipTopic
(this can be done with MQTT-Explorer) - Go to
http://{ip}/firmware
in your Internet browser - Enter your username and password (Default:
admin
/admin
) - Select the file and click Update Firmware
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Feel free to contribute to this project.
Distributed under the MIT License. See LICENSE
for more information.
Sergey Karmanov - @serega404