Add wifi manager portal (#161)

* Add Wifi manager web portal for ESP8266

#15
#83

* represent web page if MQTT failures at start

* add arduinojson library on CI and repo

* add parameter in test config for CI and correct ifdef

* add wifi manager library

* add possibility to manual setup esp8266 wifi credential

* add mqtt user and password into wifimanager

* Add MinimumWifiSignalQuality parameter

Following @ctripodi suggestion to remove AP with low signal quality
This commit is contained in:
Florian authored and GitHub committed 2018-01-27 12:10:00 +01:00
1 parent ea1711b7f0
commit 3b33aa7841
8 files changed
+216 -48

No files matched your search

+13 -7
View File
@@ -29,15 +29,15 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*-------------------VERSION----------------------*/
#define OMG_VERSION "0.6.2"
#define OMG_VERSION "0.7"
/*-------------DEFINE YOUR NETWORK PARAMETERS BELOW----------------*/
//MQTT Parameters definition
//#define mqtt_server_name "www.mqtt_broker.com" // instead of defining the server by its IP you can define it by its name, uncomment this line and set the correct MQTT server host name
#define mqtt_server "192.168.1.17"
//#define mqtt_user "your_username" // not compulsory only if your broker needs authentication
#define mqtt_password "your_password" // not compulsory only if your broker needs authentication
#define mqtt_port 1883
#define mqtt_user "your_username" // not compulsory only if your broker needs authentication
#define mqtt_pass "your_password" // not compulsory only if your broker needs authentication
#define Gateway_Name "OpenMQTTGateway"
#define WifiManager_password "your_password"
#define version_Topic "home/" Gateway_Name "/version"
#define will_Topic "home/" Gateway_Name "/LWT"
#define will_QoS 0
@@ -45,10 +45,16 @@
#define will_Message "Offline"
#define Gateway_AnnouncementMsg "Online"
//#define MDNS_SD //comment if you don't want to use mdns for discovering automatically your ip server, please note that MDNS with ESP32 can cause the BLE to not work
char mqtt_server[40] = "192.168.1.17";
char mqtt_port[6] = "1883";
//set minimu quality of signal so it ignores AP's under that quality
#define MinimumWifiSignalQuality 8
//#define ESPWifiManualSetup true //uncomment you don't want to use wifimanager for your credential settings on ESP
/*-------------DEFINE YOUR NETWORK PARAMETERS BELOW----------------*/
// Update these with values suitable for your network.
#if defined(ESP8266) || defined(ESP32) // for nodemcu, weemos and esp8266
#if defined(ESP32) || defined(ESPWifiManualSetup) // for nodemcu, weemos and esp8266
#define wifi_ssid "wifi ssid"
#define wifi_password "wifi password"
#else // for arduino + W5100
@@ -105,7 +111,7 @@ const byte subnet[] = { 255, 255, 255, 0 }; //ip adress
#elif ESP32
#define ZgatewayRF
#include "config_RF.h"
#define ZgatewayRF2
//#define ZgatewayRF2
//#define ZgatewayIR
//#include "config_IR.h"
#define ZgatewayBT