|
@ -67,6 +67,14 @@ class PubMqtt { |
|
|
sendIvData(); |
|
|
sendIvData(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void tickerMinute() { |
|
|
|
|
|
if(mAddressSet) { |
|
|
|
|
|
char val[40]; |
|
|
|
|
|
snprintf(val, 40, "%ld", millis() / 1000); |
|
|
|
|
|
sendMsg("uptime", val); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
void setCallback(MQTT_CALLBACK_SIGNATURE) { |
|
|
void setCallback(MQTT_CALLBACK_SIGNATURE) { |
|
|
mClient->setCallback(callback); |
|
|
mClient->setCallback(callback); |
|
|
} |
|
|
} |
|
@ -218,13 +226,10 @@ class PubMqtt { |
|
|
return; |
|
|
return; |
|
|
|
|
|
|
|
|
isConnected(true); // really needed? See comment from HorstG-57 #176
|
|
|
isConnected(true); // really needed? See comment from HorstG-57 #176
|
|
|
char topic[32 + MAX_NAME_LENGTH], val[32]; |
|
|
char topic[32 + MAX_NAME_LENGTH], val[40]; |
|
|
float total[4]; |
|
|
float total[4]; |
|
|
bool sendTotal = false; |
|
|
bool sendTotal = false; |
|
|
bool totalIncomplete = false; |
|
|
bool totalIncomplete = false; |
|
|
snprintf(val, 40, "%ld", millis() / 1000); |
|
|
|
|
|
|
|
|
|
|
|
sendMsg("uptime", val); |
|
|
|
|
|
|
|
|
|
|
|
sendMsg("wifi_rssi", String(WiFi.RSSI()).c_str()); |
|
|
sendMsg("wifi_rssi", String(WiFi.RSSI()).c_str()); |
|
|
|
|
|
|
|
|