Skip to content

palivoda/esper-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is application template for Esper.

Development environment

  • Source code projects are setup in Platformio for Atom community edition. All steps below assume this environment folders structure.

Creating application with Esper:

  • Git clone of the esper-app
  • Git modules update (use recursive update).
  • Open [platformio.ini] file and setup your board configuration.
  • In main.cpp select the board pinout and include <Esper.hpp> file of the library:
#define USE_WEMOS_D1_MINI_BOARD     //Select board pinout
#define ESPER_DEBUG                 //Enable debug output
#include "Esper.hpp"                //Esper library file
  • Then during setup call:
ESPER_DEBUG_SETUP(74880);           //Default ESP baud rate
Esper.begin();                      //Init EEPROM and other stuff
  • During the loop you need to call only
Esper.run();                        //Loop

ESPER provides you 3 new callbacks that are already defined in the application template:

Function Description
connected() Triggered by ESPER when device setup is completed - it's connected to Wi-Fi and MQTT and connection parameters saved to EEPROM. MQTT init message sent.
disconnect() Triggered if Wi-Fi, MQTT connection lost or ESPER OTA is initiated and device is going to reboot.
tictac() Timer that is active only when device is online and ready. Intended to sensor readings.
  • Connect your ESP chip to USB port and Run build. For ESP-01 it takes 10 seconds to start AP.
  • Connect to 'ESPER device' WiFi AP and open URL "esper.iot" to setup WiFi and MQTT settings.
  • After save device will reboot and send esper/init MQTT message.

Setting up MQTT environment

As ESPER communicates via MQTT here is proposed software stack that you can get to kick start your first DIY IoT project, like smart home:

  • Orange PI Zero board with 8+ Gig SD card
  • 8+ GB SD Card with (TODO: ready to burn SD card image):
  • Burn the SD card image and Boot Orange Pi Zero
  • Burn your ESP8266 firmware with DHT11 example, reboot, connect to "ESPER device" network and configure it
  • Now you should be able to see humidity and temperature charts.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages