Git Product home page Git Product logo

esphomecontroller's Introduction

ESPHomeController

Generic IOT platform for Home Automation based on the ESP8266/ESP32.

After a few times of implementing IOT devices for home automation, i have recognized that each new one looks better and better, but this is always copy-paste approach... And not so easilly to back to previous implementation and merge innovation. For instance after implementing simple IOT for Relay switching I have did another project to control RGB strip (WS2811/2812 ) and finally get to sketches which I have to support... Instead of that i decided to develop universal sketch to support code once, but with possibility to upload to different IOT controllers for my Home Automation. Main targets are :

  1. Support ESP32 and ESP8266 with the same code
  2. Native Apple Home Kit Integration
  3. The same skecth should support different devices, the difference must be outside in the configuration file. Like Lego bricks...
  4. Updatable via the web (OTA), some times not easilly to physically access device, when it's altready installed
  5. Nice web interface to controll devices as well to setup them
  6. RAW file browser to upload/change configuration files or HTML for the WEB
  7. MQTT integration to be able control devices via any Home controller
  8. On board automation scripts/triggers.. Some times is not easy to setup this one via Home Kit or Home Kit doesn't exists
  9. Configuration portal after firts start (captive portal)
  10. Suports of RF 433 Mhz control by any existing transmitters
  11. More and more

Ok, let's describe basic thing how it works Major element of this solution is service, like in windows unix , android etc. Each service are responsible to control one device wired to ESP. Hovewer it's possible to run 2 instances of the same service to control similar devices. List if services is configurable by json file with their properties Second and maybe last major element is trigger . It define interaction between services and fulfill automation. The list of of triggers as well configurabel

Few examples:

  1. You need device to control only one Relay (for any reason: light, heater,...) Just define configuration services.json with one service RelayController, define pin, where relay is physically wired, that's all ! You will get a device ready and able to controll your lights via Web or Home Kit (Home Kit integration possibilities will be explained later)
  2. Additionally to previos you want to control your Relay by Light sensor . Yo need to add LDRController to listen wired LDR. Web and Home will automatically detect this and you can see your lumens over the or Home Kit). But you can configure LDR to Realy trigger with barier values, and than when LDR is higher that barier trigger will send command to Relay to switch off or vice verse..
  3. More and more examples and combination within services and triggers...will come

Used External Libraries

This project uses libraries and code by different authors:

-rc-switch small changes are done to works with ESP32 as well

-ESPHap this is library for native Apple Home Kit integration

Parts of the code were taken or inspired by the following sources:

  • SPIFFS Webserver by Hristo Gochkov This part is adapted fo the following following staff:

    • Supports ESP32 file system
    • Enhanced filebrowse.html
    • "Prefly" request and headers for cross domain areas
    • overwritten within new code when skecth is uses AsyncWebServer

Thank you to all the authors for distributing their software that way. I hope I didn't miss any sources and mentioned every author. In case I forgot someone please let me know and I will fix it.

Goals are reached :

  • Adapted ESP8266HTTPUpdateServer , now it's supports ESP32. Have a look of ESP32HTTPUpdateServer.h/cpp implementatation with traditional WebServer;
  • Adapted ESP8266HTTPUpdateServer for working withis ESPAsyncWebServer. Have a look of ESPAsyncUpdateServer.h/cpp
  • Second core of ESP32 can be used with proper service configuration. Now a few services can run on second core of ESP32;
  • Built-in web site implemented on React js, and browser content is very fast, compatible with native mobile application, Thanks to React developers;
  • Sketch can be compiled within VS 2017, by using Arduino IDE for Visual Studio
  • Adapt WS2812FX library to perfectly works on ESP32, see details here
  • Native Apple Home Kit Integration

WebSite

ESPHomeController has own web site. Ready sources located in the data directory. You just need to upload them into your spiff. This Web site is builded on ReactJS, therefore to change anything you need to use sources

For technical infomation see Wiki

Please have a look https://github.com/Yurik72/esphapcontroller , there is a clone of code base adapted for ESP-IDF Projects using this firmware

Fireplace lamp with temperature sensor

Bed Room Lamp Ws2812

Weather station

P.S. !! This is starting project not all parts already comitted. Will come soon after testing. If you are interested feel free to contact me

esphomecontroller's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  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.