1
mirror of https://github.com/rvdbreemen/OTGW-firmware synced 2024-11-16 04:33:49 +01:00

Fix state of otgw flags

This commit is contained in:
Robert van den Breemen 2022-01-05 21:29:27 +01:00
parent caec1dea1b
commit 4c71eb08ad
3 changed files with 14 additions and 13 deletions

View File

@ -547,7 +547,7 @@ bool doAutoConfigureMsgid(byte OTid)
String sLine = fh.readStringUntil('\n');
// DebugTf("sline[%s]\r\n", CSTR(sLine));
if (!splitLine(sLine, ';', lineID, sTopic, sMsg)) { //splitLine() also filters comments
MQTTDebugTf("Either comment or invalid config line: [%s]\r\n", CSTR(sLine));
//MQTTDebugTf("Either comment or invalid config line: [%s]\r\n", CSTR(sLine));
continue;
}
@ -556,7 +556,7 @@ bool doAutoConfigureMsgid(byte OTid)
// check if this is the specific line we are looking for
if (lineID != OTid) continue;
DebugTf("found line in config file for %d: [%d][%s] \r\n", OTid, lineID, CSTR(sTopic));
MQTTDebugTf("Found line in config file for %d: [%d][%s] \r\n", OTid, lineID, CSTR(sTopic));
// discovery topic prefix
MQTTDebugTf("sTopic[%s]==>", CSTR(sTopic));
@ -584,7 +584,8 @@ bool doAutoConfigureMsgid(byte OTid)
// sub topics
sMsg.replace("%mqtt_sub_topic%", CSTR(MQTTSubNamespace));
Debugf("[%s]\r\n", CSTR(sMsg)); DebugFlush();
MQTTDebugf("[%s]\r\n", CSTR(sMsg));
DebugFlush();
//sendMQTT(CSTR(sTopic), CSTR(sMsg), (sTopic.length() + sMsg.length()+2));
sendMQTT(sTopic, sMsg);

View File

@ -1381,7 +1381,7 @@ void processOT(const char *buf, int len){
//If the Boiler messages have not been seen for 30 seconds, then set the state to false.
bOTGWboilerstate = (now() < (epochBoilerlastseen+30));
if (((bOTGWboilerstate != bOTGWboilerpreviousstate) || (cntOTmessagesprocessed==1)) {
if ((bOTGWboilerstate != bOTGWboilerpreviousstate) || (cntOTmessagesprocessed==1)) {
sendMQTTData(F("otgw-pic/boiler_connected"), CBOOLEAN(bOTGWboilerstate));
bOTGWboilerpreviousstate = bOTGWboilerstate;
}

View File

@ -2,15 +2,15 @@
#define _VERSION_MAJOR 0
#define _VERSION_MINOR 9
#define _VERSION_PATCH 2
#define _VERSION_BUILD 1572
#define _VERSION_GITHASH "3f1bdcb"
#define _VERSION_BUILD 1576
#define _VERSION_GITHASH "caec1de"
#define _VERSION_PRERELEASE beta
#define _VERSION_DATE "04-01-2022"
#define _VERSION_TIME "23:00:07"
#define _VERSION_DATE "05-01-2022"
#define _VERSION_TIME "21:28:27"
#define _SEMVER_CORE "0.9.2"
#define _SEMVER_BUILD "0.9.2+1572"
#define _SEMVER_GITHASH "0.9.2+3f1bdcb"
#define _SEMVER_FULL "0.9.2-beta+3f1bdcb"
#define _SEMVER_NOBUILD "0.9.2-beta (04-01-2022)"
#define _VERSION "0.9.2-beta+3f1bdcb (04-01-2022)"
#define _SEMVER_BUILD "0.9.2+1576"
#define _SEMVER_GITHASH "0.9.2+caec1de"
#define _SEMVER_FULL "0.9.2-beta+caec1de"
#define _SEMVER_NOBUILD "0.9.2-beta (05-01-2022)"
#define _VERSION "0.9.2-beta+caec1de (05-01-2022)"
//The version information is created automatically, more information here: https://github.com/rvdbreemen/autoinc-semver