Browse Source

store passwords externally

main
Hendrik Langer 7 years ago
parent
commit
2c39325b52
  1. 2
      .gitignore
  2. 9
      src/main.cpp

2
.gitignore

@ -7,4 +7,4 @@ lib/
local/
share/
src/password.txt
src/passwords.h

9
src/main.cpp

@ -27,13 +27,14 @@ extern "C" {
#include <XD0OTA.h>
#include "main.h"
#include "passwords.h"
const char* server = "ingress.opensensemap.org";
#define MQTT_MAX_PACKET_SIZE 512
const char* mqttserver = "home.xd0.de";
const char* mqttusername = "esp-weatherstation";
const char* mqttpassword = "password4";
const char* mqttpassword = PWD_MQTT;
constexpr unsigned int postingInterval = 60000; //Uploadintervall in Millisekunden
constexpr unsigned int dhcp_interval = 60*60*1000;
@ -240,9 +241,9 @@ void ICACHE_FLASH_ATTR sendValues() {
delay(1); // yield();
WiFi.persistent(false); // don't load and save credentials to flash
WiFi.mode(WIFI_STA);
wifiMulti.addAP("nether.net", "password1");
wifiMulti.addAP("LNet", "password2");
wifiMulti.addAP("hw1_gast", "password3");
wifiMulti.addAP("nether.net", PWD_NETHERNET);
wifiMulti.addAP("LNet", PWD_LNET);
wifiMulti.addAP("hw1_gast", PWD_HW1);
wifiMulti.addAP("Freifunk", "");
if ( ip != INADDR_NONE && dns != INADDR_NONE && gateway != INADDR_NONE && subnet != INADDR_NONE

Loading…
Cancel
Save