openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.7k forks source link

[MQTT Binding] Request support for retrying initial broker connection #5679

Open enboig opened 5 years ago

enboig commented 5 years ago

Expected Behavior

Using internal mqtt broker, there should not be any connection problem between client and broker.

Current Behavior

What happen is that when system is booting, MQTT Binding tries to connect to the MQTT embedded broker, it hasn't started.

Possible Solution

Maybe starting services before bindings should be enough to solve this problem. But MQTT binding should try again if server is not available.

Context

Maybe the I experience the problem because my board is an old cubieboard (the single core one).

Your Environment

I am using openhab 2.3 on a Armbian (xenial)

9037568 commented 5 years ago

A clarification.

This is a request to have the MQTT binding support retrying the initial connection to the broker if it fails. Currently, if the initial connection fails, no retries are attempted.

The workaround is to have the broker be ready before starting OH.

enboig commented 5 years ago

The problem with the "workaround" is when using embedded broker. The reasons I cannot use the broker is it don't allow external access in 2.3 (but appear it will change in next release), and not working at all with mqtt binding because at first fail it stops.