1
mirror of https://github.com/rvdbreemen/OTGW-firmware synced 2024-11-19 08:17:29 +01:00
OTGW-firmware/handleDebug.ino
sjorsjuhmaniac 0aee007732 add HA device and thermostat entity through mqtt discovery.
add 'availability' topic for HA entities (requires OTGW birth/will messages to be implemented)

add will message.

add birth message

don't default to retaining msg's, add option to retain if we want

update HA discovery to use <mqtt top>/value/<sensor> and <mqtt top>/set/<command> naming convention

update MQTT functions to use <mqtt top>/value/<sensor> and <mqtt top>/set/<command> naming convention

improve mqtt topic subscribe debugging

reset mqtt buffer size after sending ha discovery to free up memory

improved ha discovery and entity support added
2021-03-03 23:41:46 +01:00

18 lines
413 B
C++

void handleDebug(){
if (TelnetStream.available()>0){
//read the next
char c;
c = TelnetStream.read();
switch (c){
case 'm':
DebugTln("Configure MQTT Discovery");
DebugTf("Enable MQTT: %s", CBOOLEAN(settingMQTTenable));
doAutoConfigure();
break;
default:
break;
}
}
}