Code Monkey home page Code Monkey logo

esp8266-relay's Introduction

ESP8266 Relay-Manager v001

Controlling a relay via web based ESP8266, as an example a powerstrip.

Features:

  • web based configuration of:
    • WiFi
    • Hostname
    • Relais
    • MQTT
    • file uploader
    • file manager
    • ESP8266 updater
    • Alexa integration
    • Google Assistant integration
  • web based WiFi configuration
    • auto connect to configured WiFi. If no WiFi configured, an Access Point with web based configuration starts
  • web based configuration of 1, 4 or 8 Relais
    • web based defined aliases for each Relay
  • web based MQTT configuration to publish and subscribe topics
  • multicast DNS query support
  • API (HTTP GET-Parameter) for remote control (e.g. Smarthome integration)
  • Web uploader for customized Webpages
  • Wep pages with Bootstrap design (CDN: Internet connect requiered)
    • local Bootstrap design
  • OTA updater via Web (control via web interface or API)
  • Alexa Support (coming soon)
  • Google Assistand support - maybe
  • EasySetup: Arduino binary for download and install
  • Source Code: After clean up and inline documentation the source code will be provided here, too

See Wiki pages for details like

  • setup instructions
  • how to use
  • example project with hardware list

ESP8266-Relay: Initial Configuration

  • the Hardware-Setup will be described in the ESP8266-Relay: Hardware Setup
  • the Firmware flashing will be described in the ESP8266-Relay: Firmware Setup
  1. WiFi Configuration
  2. uploading Webpages
  3. Relay configuration
  4. System Configuration (Hostname, MQTT-Server, MQTT-Queues, Firmware Update-Server,...)

WiFi Configuration

On first time starting the ESP8266-Relayserver no WiFi configuration will be found so the ESP8266-Relayserver will starting with it's own Accesspoint esp_relay and IP-Address 192.168.4.1

Connect with a WiFi client like Smartphone or Tablet to the Accesspoint esp_relay and open your browser. In most cases the WiFi software offers you to automatical open http://192.168.4.1 or http://esp_relay.local

If no automaticall redirect happens please open your browser an go to http://192.168.4.1 or http://esp_relay.local. Open Configure WiFi where the available WiFi Networks are listed or choose Configure WiFi (No Scan) to configure your WiFi settings manually.

Choose your WiFi network and fill in your WiFi password. Click safe and the Accesspoint esp_relay will be closed. Connect with your Smartphone, Tablet or PC to your regualr network.

The ESP8266-Relayserver will restarting and trying to connect to your configured WiFi.

Initial Configuration

Open with your Internet Browser http://esp_relay.local. With a simple upload formular you can upload the webpages.

Firstly upload the file upload.htm

...and click the button upload

...an automatical redircet should show you a simple file explorer. Click on /upload.htm. If the automatical redirect doesn't happens please go to URLi http://esp_relay.local/update.htm.

Now the upload form looks a little bit better now. Please choose as 2nd file to upload tools.js.

From now on all default web pages will got a navigation menue. Of course the navigation links will working after the upload of all necessary web pages is successully done. So please repeat the uploads for the other web files now.

Choose from the menue File Info. Now the SPIFF filesystem on your ESP8266-Realyserver should looks like this one: (Of course you can upload your own, modified web pages. To use your own web pages please have a look to the source code of the provided HTML pages or read the API documentation).

The menue call Home with the relay status looks still stand-by...

Also the menue Sys Info shows just a little bit...

Relais Shield Configuration

Calling the menu Relay Config will enable you to configure your relais. Depending on the installed Relay Shield you can choose here your configuration:

  • 1 Relay
  • 4 Relais
  • 8 Relais

Optional you can choose to protect your configurations with a password. It's not really secure but it will works for current "normal-non-hacker-people-and-kids".

If you choose the 1-Relay config you can fill in a "human readable" name for your relay.

When finished filling in please don't forget to click the button Save configuration !!!

If you choose the 4-Relais config you can fill in the "human readable" names for your relais:

When finished filling in please don't forget to click the button Save configuration !!!

If you choose the 8-Relais config you can fill in the "human readable" names for your relais:

When finished filling in please don't forget to click the button Save configuration !!!

Power-Status

After finishing successfully the relay configuration you can go via the menu Home to the Relay Status.

Here you got an overview of your configured Relais and their power status. Of course there's also an API available so you can power-on or power-off your relais remotely, as an example via a Raspberry Pi or your Smarthome Automatisation tool like Fhem or OpenHab and so on.

System-Infos

Now also the System-Informations on the menue Sys-Info show a little bit more now ... (some more configuration options will following with upcoming updates...)

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.