ButtonBrick becomes stale
tamberg opened this issue · comments
Thomas Amberg commented
ButtonBrick becomes stale, might be fixed by sending a keep-alive.
Thomas Amberg commented
Added (millis() - t0) > 10000
see https://github.com/tamberg/fhnw-iot-bricks/blob/develop/Arduino/ESP8266_MqttButtonBrick/ESP8266_MqttButtonBrick.ino#L40
Thomas Amberg commented
Or use #define MQTT_CONN_KEEPALIVE 30
Thomas Amberg commented
Maybe also add a keep-alive on the Java side, using https://www.eclipse.org/paho/files/javadoc/org/eclipse/paho/client/mqttv3/MqttConnectOptions.html#setKeepAliveInterval-int-
Thomas Amberg commented
Done.