mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-26 04:36:38 +00:00
fix esp8266 syslog
This commit is contained in:
parent
01fa5eedaf
commit
cd8d12d40d
@ -425,9 +425,9 @@ static void debugPrintTag(uint8_t tag, Print * _logOutput)
|
|||||||
void debugPrintPrefix(uint8_t tag, int level, Print * _logOutput)
|
void debugPrintPrefix(uint8_t tag, int level, Print * _logOutput)
|
||||||
{
|
{
|
||||||
#if HASP_USE_SYSLOG > 0
|
#if HASP_USE_SYSLOG > 0
|
||||||
if(!syslogClient) return;
|
// if(!syslogClient) return;
|
||||||
|
|
||||||
if(_logOutput == syslogClient) {
|
if(_logOutput == syslogClient && syslogClient) {
|
||||||
syslogClient->beginPacket(debugSyslogHost, debugSyslogPort);
|
syslogClient->beginPacket(debugSyslogHost, debugSyslogPort);
|
||||||
|
|
||||||
// IETF Doc: https://tools.ietf.org/html/rfc5424 - The Syslog Protocol
|
// IETF Doc: https://tools.ietf.org/html/rfc5424 - The Syslog Protocol
|
||||||
|
@ -244,7 +244,7 @@ void webHandleRoot()
|
|||||||
httpMessage +=
|
httpMessage +=
|
||||||
F("<p><form method='get' action='screenshot'><button type='submit'>Screenshot</button></form></p>");
|
F("<p><form method='get' action='screenshot'><button type='submit'>Screenshot</button></form></p>");
|
||||||
httpMessage +=
|
httpMessage +=
|
||||||
PSTR("<p><form method='get' action='config'><button type='submit'>Configuration</button></form></p>");
|
F("<p><form method='get' action='config'><button type='submit'>Configuration</button></form></p>");
|
||||||
|
|
||||||
httpMessage +=
|
httpMessage +=
|
||||||
F("<p><form method='get' action='firmware'><button type='submit'>Firmware Upgrade</button></form></p>");
|
F("<p><form method='get' action='firmware'><button type='submit'>Firmware Upgrade</button></form></p>");
|
||||||
|
@ -438,8 +438,8 @@ void mqttReconnect()
|
|||||||
snprintf_P(buffer, sizeof(buffer), PSTR("%sstatus"), mqttNodeTopic);
|
snprintf_P(buffer, sizeof(buffer), PSTR("%sstatus"), mqttNodeTopic);
|
||||||
mqttClient.publish(buffer, mqttFirstConnect ? "OFF" : "ON", true); //, 1);
|
mqttClient.publish(buffer, mqttFirstConnect ? "OFF" : "ON", true); //, 1);
|
||||||
|
|
||||||
Log.notice(TAG_MQTT, F("binary_sensor state: [%sstatus] : %s"), mqttNodeTopic,
|
Log.notice(TAG_MQTT, F("binary_sensor state: [%sstatus] : %S"), mqttNodeTopic,
|
||||||
mqttFirstConnect ? PSTR("OFF") : PSTR("ON"));
|
mqttFirstConnect ? F("OFF") : F("ON"));
|
||||||
|
|
||||||
/* snprintf_P(buffer, sizeof(buffer), PSTR("binary_sensor state: [%sstatus] : %s"), mqttNodeTopic,
|
/* snprintf_P(buffer, sizeof(buffer), PSTR("binary_sensor state: [%sstatus] : %s"), mqttNodeTopic,
|
||||||
mqttFirstConnect ? PSTR("OFF") : PSTR("ON"));
|
mqttFirstConnect ? PSTR("OFF") : PSTR("ON"));
|
||||||
|
@ -59,7 +59,7 @@ void wifiConnected(IPAddress ipaddress)
|
|||||||
#endif
|
#endif
|
||||||
Log.verbose(TAG_WIFI, F("Connected = %s"), WiFi.status() == WL_CONNECTED ? PSTR("yes") : PSTR("no"));
|
Log.verbose(TAG_WIFI, F("Connected = %s"), WiFi.status() == WL_CONNECTED ? PSTR("yes") : PSTR("no"));
|
||||||
haspProgressVal(255);
|
haspProgressVal(255);
|
||||||
|
debugSetup();
|
||||||
// if(isConnected) {
|
// if(isConnected) {
|
||||||
// mqttReconnect();
|
// mqttReconnect();
|
||||||
// haspReconnect();
|
// haspReconnect();
|
||||||
|
@ -57,7 +57,7 @@ void setup()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The network stack needs to be initialized before calling debugSetup, cause syslog needs lwip
|
// The network stack needs to be initialized before calling debugSetup, cause syslog needs lwip
|
||||||
debugSetup();
|
// debugSetup();
|
||||||
|
|
||||||
guiSetup();
|
guiSetup();
|
||||||
if(!oobeSetup()) {
|
if(!oobeSetup()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user