Chat freely about anything...

User avatar
By ian@eagland.co.uk
#17745 Hi

I finally got this compiled and flashed after a considerable learning curve being an ESP and C novice. However I am not sure I am not sure I have set it up correctly. The Coms ports shows this:-

URL changed to protect privacy
Free memory
TCP: Connect to ip ???.78.46.??0:1883
TCP: Reconnect to: ???.78.46.??0:1883
MQTT: Connected to broker ???.78.46.??0:1883
MQTT: Sending, type: 0, id: 0000

Then after a long delay I get:-
TCP: Disconnected callback
MQTT: Disconnected

Is this normal and what does it mean?
I am using mosquitto on a Pi as the broker.
Also what is the best method of updating the library when there are changes? I am using the version that came with Unofficial Development Kit for Espressif ESP8266 + eclipse.

Regards

Ian
User avatar
By Zennix
#17820 My solution was:

Change ->
Code: Select allvoid debounce_func(void *args) // Interrupt Routine Prell Timer
{
   MQTT_Client* client = (MQTT_Client*)args;
   MQTT_Publish(client, "/Wohnzimmer/Licht/1", "0", 1, 0, 1);
   gpio_pin_intr_state_set(GPIO_ID_PIN(0),  GPIO_PIN_INTR_NEGEDGE); // Interrupt wieder einschalten on any GPIO0 edge
}


to
Code: Select allvoid debounce_func(void *args) // Interrupt Routine Prell Timer
{
     MQTT_Publish(&mqttClient, "/Wohnzimmer/Licht/1", "0", 1, 0, 1);
     gpio_pin_intr_state_set(GPIO_ID_PIN(0),  GPIO_PIN_INTR_NEGEDGE); // Interrupt wieder einschalten on any GPIO0 edge
}


Greetings Zennix