Code Monkey home page Code Monkey logo

esp-now-switch's Introduction

ESP-NOW switch for ESP8266

ESP-NOW based switch for ESP8266. Alternate firmware for Tuya/SmartLife/eWeLink WiFi switches.

Features

  1. After turn on (or after rebooting) creates an access point named "ESP-NOW switch XXXXXXXXXXXX" with password "12345678" (IP 192.168.4.1). Access point will be shown during 5 minutes. The rest of the time access point is a hidden.
  2. Periodically transmission of system information (every 60 seconds), availability status (every 10 seconds) and state status (every 300 seconds) to the gateway.
  3. Saves the last state when the power is turned off. Goes to the last state when the power is turned on.
  4. Automatically adds switch configuration to Home Assistan via MQTT discovery as a switch.
  5. Possibility firmware update over OTA (if is allows the size of the flash memory).
  6. Web interface for settings.
  7. Optionally support one external one wire digital climate sensor (DS18B20, DHT11 or DHT22) with automatically added sensor configuration to Home Assistan via MQTT discovery as a sensor. Periodically transmission sensor status (every 300 seconds) to the gateway.
  8. Normal or reverse relay mode (normal by default).

Notes

  1. ESP-NOW mesh network based on the library ZHNetwork.
  2. Regardless of the status of connection to gateway the device perform ESP-NOW node function.
  3. For show the access point for setting or firmware update, send the command "update" to the device's root topic (example - "homeassistant/espnow_switch/E8DB849CA148"). Access point will be shown during 5 minutes. Similarly, for restart send the command "restart".

Tested on

See here.

Attention

  1. A gateway is required. For details see ESP-NOW Gateway.
  2. ESP-NOW network name must be set same of all another ESP-NOW devices in network.
  3. If encryption is used, the key must be set same of all another ESP-NOW devices in network.
  4. Upload the "data" folder (with web interface) into the filesystem before flashing.
  5. For using this firmware on Tuya/SmartLife/eWeLink WiFi switches, the WiFi module must be replaced with an ESP8266 compatible module (if necessary).

Any feedback via e-mail would be appreciated. Or... Buy me a coffee.

esp-now-switch's People

Contributors

azholtikov avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.