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
Change ->
void 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
void 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