Compare commits

..

No commits in common. "abfa59f7da4541d662dcd0dcfe7804aeecf9e333" and "c4f18c671275fbc3dd8bc3dd6afa7168dc03d1ab" have entirely different histories.

1 changed files with 2 additions and 7 deletions

View File

@ -32,7 +32,6 @@ WebServer otaserver(80);
#endif
bool standalone = true;
char MQTT_BASE_TOPIC[20];
char AVAILABILITY_TOPIC[40];
uint8_t base_topic_length = 0;
char STATE_REQUEST_TOPIC[40];
bool MQTT_USE_AUTH = false;
@ -238,7 +237,6 @@ void loop()
*/
void eeprom_retrieve_init()
{
// EEPROM Data Retrival
#ifdef ENABLE_CLIMATE_MODULE
ac_mode = ESPMega_FRAM.read8(EEPROM_ADDRESS_AC_MODE);
@ -322,8 +320,6 @@ void eeprom_retrieve_init()
strcat(PWM_VALUE_TOPIC, "/pwm/00/value");
memcpy(INPUTS_TOPIC, MQTT_BASE_TOPIC, 20);
strcat(INPUTS_TOPIC, "/input/00");
memcpy(AVAILABILITY_TOPIC, MQTT_BASE_TOPIC, 20);
strcat(AVAILABILITY_TOPIC, "/availability");
#ifdef ENABLE_ANALOG_MODULE
memcpy(ADC_COMMAND_TOPIC, MQTT_BASE_TOPIC, 20);
strcat(ADC_COMMAND_TOPIC, "/adc/00/set/state");
@ -571,14 +567,13 @@ void mqtt_connect()
Serial.print("MQTT not connected, connecting . . .\n");
lcd_send_stop_bit();
if (MQTT_USE_AUTH)
mqtt.connect(HOSTNAME, MQTT_USERNAME, MQTT_PASSWORD, AVAILABILITY_TOPIC, 0, true, "offline");
mqtt.connect(HOSTNAME, MQTT_USERNAME, MQTT_PASSWORD);
else
mqtt.connect(HOSTNAME, AVAILABILITY_TOPIC, 0, true, "offline");
mqtt.connect(HOSTNAME);
if (mqtt.connected())
{
mqtt_subscribe();
Serial.print("MQTT connected\n");
mqtt.publish(AVAILABILITY_TOPIC, "online", true);
lcd_send_stop_bit();
publish_pwm_states();
publish_input_states();