2020-10-05 16:55:57 +03:00
2020-10-05 16:55:57 +03:00
2020-10-05 16:55:57 +03:00
2020-09-18 19:03:39 +03:00
2020-10-05 16:55:57 +03:00

MIT License IDE

About The Project

This project was designed to facilitate deployment of a Wi-Fi relay. Advanced users can also extend its functionality with ease.

Example device

alt text

Installation

  1. Open .ino file in Arduino IDE

  2. Select COM port and Board in the tools

  3. 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 and OTAPASSWORD.

  4. Flash the firmware to the ESP.

Usage

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.

Home Assistant template config

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

MQTT Topics

  • ipTopic - returns the IP address after entering boot mode
  • bootTopic - required for HTTP updater
  • setStateTopic - necessary to get information from MQTT broker
  • stateTopic - checks whether the relay is enabled

OTA Update

  1. Send 1 in bootTopic to enable firmware update mode
  2. Get relay's IP address from ipTopic (this can be done with MQTT-Explorer)
  3. Go to http://{ip}/firmware in your Internet browser
  4. Enter your username and password (Default: admin / admin)
  5. Select the file and click Update Firmware

Libraries

Contributing

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.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Sergey Karmanov - @serega404

Description
No description provided
Readme MIT 1.8 MiB
Languages
C++ 100%