change configuration
This commit is contained in:
parent
57b5d02f1e
commit
0581366f3c
@ -184,10 +184,10 @@ environment/project/io.sloeber.core.toolChain.release.1352205473/A.EXTRA.TIME.DT
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/A.EXTRA.TIME.DTS/value=0
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/A.EXTRA.TIME.LOCAL/delimiter=\:
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/A.EXTRA.TIME.LOCAL/operation=replace
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/A.EXTRA.TIME.LOCAL/value=1511799061
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/A.EXTRA.TIME.LOCAL/value=1511882449
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/A.EXTRA.TIME.UTC/delimiter=\:
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/A.EXTRA.TIME.UTC/operation=replace
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/A.EXTRA.TIME.UTC/value=1511795461
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/A.EXTRA.TIME.UTC/value=1511878849
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/A.EXTRA.TIME.ZONE/delimiter=\:
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/A.EXTRA.TIME.ZONE/operation=replace
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/A.EXTRA.TIME.ZONE/value=3600
|
||||
@ -469,7 +469,7 @@ environment/project/io.sloeber.core.toolChain.release.1352205473/JANTJE.COM_PORT
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/JANTJE.COM_PORT/value=/dev/ttyUSB4
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/JANTJE.ECLIPSE_LOCATION/delimiter=\:
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/JANTJE.ECLIPSE_LOCATION/operation=replace
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/JANTJE.ECLIPSE_LOCATION/value=${eclipse_home}
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/JANTJE.ECLIPSE_LOCATION/value=${eclipse_home}//////////
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/JANTJE.EXTRA.ALL/delimiter=\:
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/JANTJE.EXTRA.ALL/operation=replace
|
||||
environment/project/io.sloeber.core.toolChain.release.1352205473/JANTJE.EXTRA.ALL/value=
|
||||
|
@ -7,13 +7,13 @@ from Cheetah.Template import Template
|
||||
|
||||
configItems = [
|
||||
{"label":"_", "key":"magic", "type":"I", "default": ""},
|
||||
{"label":"Wifi SSID", "key":"wifiSsid", "type":"C", "length":32, "default":"EG-WLAN"},
|
||||
{"label":"Wifi Key", "key":"wifiKey", "type":"C", "length":64, "default":"shae3sheuthai2oluNgiqueiyahyumeiphughi8jequeil6taethooyeik1joh5"},
|
||||
{"label":"Wifi SSID", "key":"wifiSsid", "type":"C", "length":32, "default":"test"},
|
||||
{"label":"Wifi Key", "key":"wifiKey", "type":"C", "length":64, "default":"geheim"},
|
||||
{"label":"MQTT Broker", "key":"mqttBroker", "type":"C", "length":64, "default":"broker.hottis.de"},
|
||||
{"label":"MQTT Username", "key":"mqttUser", "type":"C", "length":32, "default":"esp1"},
|
||||
{"label":"MQTT Password", "key":"mqttPass", "type":"C", "length":32, "default":"geheim123"},
|
||||
{"label":"MQTT ClientId", "key":"mqttClientId", "type":"C", "length":32, "default":"espClient1"},
|
||||
{"label":"MQTT Topic", "key":"mqttTopic", "type":"C", "length":64, "default":"IoT/espThermometer2/espTherm1/measurement"},
|
||||
{"label":"MQTT Password", "key":"mqttPass", "type":"C", "length":32, "default":"geheim"},
|
||||
{"label":"MQTT ClientId", "key":"mqttClientId", "type":"C", "length":32, "default":"changeThis"},
|
||||
{"label":"MQTT Topic", "key":"mqttTopic", "type":"C", "length":64, "default":"IoT/espThermometer2/location/measurement"},
|
||||
{"label":"MQTT Port", "key":"mqttPort", "type":"I", "default":8883},
|
||||
{"label":"Measure Period", "key":"measurePeriod", "type":"I", "default":300}
|
||||
]
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
tConfigBlock configBlock;
|
||||
const uint32_t MAGIC = 0xC0DE0001;
|
||||
const uint32_t MAGIC = 0xC0DE0002;
|
||||
extern ESP8266WebServer webServer;
|
||||
|
||||
bool configSaved = false;
|
||||
@ -18,14 +18,14 @@ void configServeIndex() {
|
||||
bool configValid = (configBlock.magic == MAGIC);
|
||||
|
||||
if (! configValid) {
|
||||
strcpy(configBlock.wifiSsid, "EG-WLAN");
|
||||
strcpy(configBlock.wifiKey, "shae3sheuthai2oluNgiqueiyahyumeiphughi8jequeil6taethooyeik1joh5");
|
||||
strcpy(configBlock.mqttBroker, "broker.hottis.de");
|
||||
strcpy(configBlock.wifiSsid, "Test");
|
||||
strcpy(configBlock.wifiKey, "geheim");
|
||||
strcpy(configBlock.mqttBroker, "192.168.0.1");
|
||||
strcpy(configBlock.mqttUser, "esp1");
|
||||
strcpy(configBlock.mqttPass, "geheim123");
|
||||
strcpy(configBlock.mqttClientId, "espClient1");
|
||||
strcpy(configBlock.mqttTopic, "IoT/espThermometer2/espTherm1/measurement");
|
||||
configBlock.mqttPort = 8883;
|
||||
strcpy(configBlock.mqttPass, "geheim");
|
||||
strcpy(configBlock.mqttClientId, "changeThis");
|
||||
strcpy(configBlock.mqttTopic, "IoT/espThermometer2/locationChangeThis/measurement");
|
||||
configBlock.mqttPort = 1883;
|
||||
configBlock.measurePeriod = 300;
|
||||
}
|
||||
|
||||
@ -270,4 +270,4 @@ void showConfiguration() {
|
||||
|
||||
|
||||
Serial.println("---");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user