ButtonBrick becomes stale
tamberg opened this issue · comments
ButtonBrick becomes stale, might be fixed by sending a keep-alive.
Added (millis() - t0) > 10000
see https://github.com/tamberg/fhnw-iot-bricks/blob/develop/Arduino/ESP8266_MqttButtonBrick/ESP8266_MqttButtonBrick.ino#L40
Or use #define MQTT_CONN_KEEPALIVE 30
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-
Done.