version 1.8.0 final

This commit is contained in:
Paul
2019-06-15 15:24:56 +02:00
parent 17928617e1
commit 3766780cab
9 changed files with 69 additions and 167 deletions

View File

@@ -106,7 +106,6 @@ command_t project_cmds[] = {
{true, "shower_alert <on | off>", "send a warning of cold water after shower time is exceeded"},
{true, "publish_wait <seconds>", "set frequency for publishing to MQTT"},
{true, "heating_circuit <1 | 2>", "set the thermostat HC to work with if using multiple heating circuits"},
{true, "tx_mode <n>", "0=classic ems logic, 1=@kwertie01 ems+ logic, 2=@susisstrolch logic, 3=@philrich logic for Junkers"},
{false, "info", "show data captured on the EMS bus"},
{false, "log <n | b | t | r | v>", "set logging mode to none, basic, thermostat only, raw or verbose"},
@@ -347,9 +346,8 @@ void showInfo() {
if (ems_getTxCapable()) {
char valuestr[8] = {0}; // for formatting floats
myDebug_P(PSTR(" Tx: Last poll=%s seconds ago, Tx mode=%d, # successful write requests=%d"),
myDebug_P(PSTR(" Tx: Last poll=%s seconds ago, # successful write requests=%d"),
_float_to_char(valuestr, (ems_getPollFrequency() / (float)1000000), 3),
ems_getTxMode(),
EMS_Sys_Status.emsTxPkgs);
} else {
myDebug_P(PSTR(" Tx: no signal"));
@@ -1058,9 +1056,6 @@ bool FSCallback(MYESP_FSACTION action, const JsonObject json) {
// shower_alert
EMSESP_Status.shower_alert = json["shower_alert"];
// tx mode
ems_setTxMode(json["tx_mode"]);
// publish_wait
if (!(EMSESP_Status.publish_wait = json["publish_wait"])) {
EMSESP_Status.publish_wait = DEFAULT_PUBLISHWAIT; // default value
@@ -1087,7 +1082,6 @@ bool FSCallback(MYESP_FSACTION action, const JsonObject json) {
json["shower_alert"] = EMSESP_Status.shower_alert;
json["publish_wait"] = EMSESP_Status.publish_wait;
json["heating_circuit"] = EMSESP_Status.heating_circuit;
json["tx_mode"] = ems_getTxMode();
return true;
}
@@ -1218,11 +1212,6 @@ bool SettingsCallback(MYESP_FSACTION action, uint8_t wc, const char * setting, c
}
}
// tx delay/ tx mode
if (((strcmp(setting, "tx_mode") == 0) || (strcmp(setting, "tx_delay") == 0)) && (wc == 2)) {
ems_setTxMode(atoi(value));
ok = true;
}
}
if (action == MYESP_FSACTION_LIST) {
@@ -1249,7 +1238,6 @@ bool SettingsCallback(MYESP_FSACTION action, uint8_t wc, const char * setting, c
myDebug_P(PSTR(" shower_timer=%s"), EMSESP_Status.shower_timer ? "on" : "off");
myDebug_P(PSTR(" shower_alert=%s"), EMSESP_Status.shower_alert ? "on" : "off");
myDebug_P(PSTR(" publish_wait=%d"), EMSESP_Status.publish_wait);
myDebug_P(PSTR(" tx_mode=%d"), ems_getTxMode());
}
return ok;
@@ -1689,11 +1677,7 @@ void setup() {
// set up myESP for Wifi, MQTT, MDNS and Telnet
myESP.setTelnet(project_cmds, ArraySize(project_cmds), TelnetCommandCallback, TelnetCallback); // set up Telnet commands
#ifdef WIFI_SSID
myESP.setWIFI(WIFI_SSID, WIFI_PASSWORD, WIFICallback);
#else
myESP.setWIFI(NULL, NULL, WIFICallback); // pull the wifi settings from the SPIFFS stored settings
#endif
myESP.setWIFI(NULL, NULL, WIFICallback);
// MQTT host, username and password taken from the SPIFFS settings
myESP.setMQTT(