GithubHelp home page GithubHelp logo

jean-emile / esp8266_thermostat Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 2.63 MB

Thermostat Board is a WiFi connected running on ESP8266 SoC.

License: GNU General Public License v3.0

C++ 48.02% JavaScript 19.57% HTML 14.25% CSS 4.19% Shell 0.02% Python 13.95%

esp8266_thermostat's Introduction

WiFi Relay/Thermostat Board

Build Status

NOTE: this firmware is not yet usable.

This repo contains a new version of the firmware for the single-channel Wifi relay sold via the OpenEnergyMonitor shop [1].

Compared to the version provided by OpenEnergyMonitor, this version is based on Arduino ESP8266 core (2.4.2) with these features:

  • [WebSocket] support
  • [MQTT] support
  • [NTP] support
  • [SPIFF] support
  • [RF69] support (required to sold a RFM69W)
  • [OTA] support (no yet tested)

I plan to implement on my free time new features (e.g. integrate machine learning to optimize heating, the management of mutli-zone).

Installation

1. Install PlatformIO

See PlatformIO installation docs.

2. Clone this repo

$ git clone https://github.com/Jean-Emile/ESP8266_Thermostat

3. Compile

$ cd ESP8266_Thermostat
$ pio run

3. Upload

  • Put ESP8266 into bootloader mode by pressing the reset button then Upload main program:

$ pio run -t upload

  • Put ESP8266 into bootloader mode again and then

$ pio run -t uploadfs

Configuration

The thermostat configuration is available in the folder "src/data/config.json"

Config.json:

{
  "wifi": {
    "mode": 0,
    "ssid":"",
    "password":""
  },
  "mqtt":  {
    "server":"",
    "user":"",
    "password": "",
    "port":1883
  },
  "ntp":{
    "tz":7200
  },
  "smtp":{
    "server": "smtp.gmail.com",
    "login":"",
    "password": "",
    "from": "",
    "port":465
  }
}

Wifi

In the config.json file you have to configure your ssid and password.

MQTT

STMP Server (Notifier)

Using SMTP Authentication we provide only email and password,

by default Google uses more complex verification methods so we need to change settings.

Go to your Google account settings (https://myaccount.google.com/security#activity) and enable "Allow less secure apps" at the bottom of the page.

base64encode.org for encoding your login and password

References

[1] https://guide.openenergymonitor.org/integrations/mqtt-relay/

esp8266_thermostat's People

Contributors

jean-emile avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kylix34

esp8266_thermostat's Issues

HTML pages won't load

Hi Jean-Emille!

I managed to compile (there was some error about RFM69 library not having the promiscuous mode defined but I downloaded v1.4.0 of the library and it worked. I think v1.4.2 doesn't have anymore the promiscuous mode). The ESP8266 successfully connects to my WiFi network but I get: "404: File Not Found" error when accessing ESP8266's IP address into the browser.

PS C:\Users\Kylix\Desktop\ESP8266_Thermostat> pio run -t uploadfs Processing thermostat (platform: espressif8266; framework: arduino; board: esp12e) --------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp12e.html
PLATFORM: Espressif 8266 (2.6.2) > Espressif ESP8266 ESP-12E
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:

  • framework-arduinoespressif8266 3.20704.0 (2.7.4)
  • tool-esptool 1.413.0 (4.13)
  • tool-esptoolpy 1.20800.0 (2.8.0)
  • tool-mklittlefs 1.203.200522 (2.3)
  • tool-mkspiffs 1.200.0 (2.0)
  • toolchain-xtensa 2.40802.200502 (4.8.2)
    LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 36 compatible libraries
    Scanning dependencies...
    Dependency Graph
    |-- 6.11.3+sha.a6f029d
    |-- 2.6.0+sha.3416616
    |-- 3.1.0+sha.9dc9ad1
    |-- 1.4.2+sha.8814040
    | |-- 101.1.3
    | | |-- 1.0
    | |-- 1.0
    |-- 2.1.1+sha.2626b26
    | |-- 1.0
    | |-- <Ethernet(esp8266)> 1.0.4
    | | |-- 1.0
    | |-- 1.0
    | |-- 1.0
    |-- 0.0.0+sha.1574db4
    |-- 1.0
    |-- 1.0
    | |-- 1.0
    | |-- 1.2
    | | |-- 1.0
    |-- 1.0
    | |-- 1.0
    |-- 1.2
    | |-- 1.0
    |-- 1.0
    |-- 1.0
    |-- 101.1.3
    | |-- 1.0
    Building in release mode
    Warning! '-Wl,-T' option for specifying linker scripts is deprecated. Please use 'board_build.ldscript' option in your 'platformio.ini' file.
    Building file system image from 'src\data' directory to .pio\build\thermostat\spiffs.bin
    /config.json
    /schedule.json
    /thermostat.json
    Looking for upload port...
    Auto-detected: COM4
    Uploading .pio\build\thermostat\spiffs.bin
    esptool.py v2.8
    Serial port COM4
    Connecting....
    Chip is ESP8266EX
    Features: WiFi
    Crystal is 26MHz
    MAC: a0:20:a6:12:15:01
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 921600
    Changed.
    Configuring flash size...
    Auto-detected Flash size: 4MB
    Compressed 65536 bytes to 691...

Writing at 0x000eb000... (100 %)
Wrote 65536 bytes (691 compressed) at 0x000eb000 in 0.0 seconds (effective 23832.2 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
========================================================== [SUCCESS] Took 6.48 seconds ==========================================================

Environment Status Duration


thermostat SUCCESS 00:00:06.482`

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.