Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If the MQTT server is offline #429

Closed
Satellietje opened this issue May 8, 2017 · 8 comments
Closed

If the MQTT server is offline #429

Satellietje opened this issue May 8, 2017 · 8 comments
Labels
enhancement Type - Enhancement that will be worked on

Comments

@Satellietje
Copy link

I have a Wemos D1 in my car.
There are 4 relay modules connected and 4 physical buttons.
If the temperature is below 4 degrees, the wemos turn on the webasto (heater) in my car.
But if I'm on my way and I want to turn on the webasto with the physical button I have to press a few times before the Wemos responds. This is because the MQTT server is not found on the way.

How can I bypass the wemos waiting and giving a timeout if the MQTT server is not online?

2017-05-08_20-53-43

@davidelang
Copy link
Collaborator

davidelang commented May 8, 2017 via email

@arendst
Copy link
Owner

arendst commented May 9, 2017

Or disable mqtt when on the road.

@Satellietje
Copy link
Author

But then I have to log in to the wemos every time i use the heater to turn off the MQTT.
Then it's faster I press the button a few times :-)

@khcnz
Copy link

khcnz commented May 9, 2017

I'd suggest
a) Change the retry time - its 10 seconds but in your case 5mins would probably be fine
b) Hook a GPIO into when the car is running and disable MQTT when running
c) I presume when on the road there is no wifi? Could we add a check just before MQTT connect to check wifi is connected? WiFi.status() != WL_CONNECTED?

@arendst
Copy link
Owner

arendst commented May 9, 2017

Option C is already implemented.

Considering the amount of inconvenience people have with the retry timeout I'll introduce a command to change the 10 seconds to a higher value and leave the consequences to the user.

@arendst arendst added the enhancement Type - Enhancement that will be worked on label May 9, 2017
@khcnz
Copy link

khcnz commented May 9, 2017

Yes you are correct (of course :)

It does raise an interesting question though, if wifi is not connected why does try connect and stall? Could be related to this arduino issue where still reports connected but RSSI =0 is it is disconnected? arduino-libraries/WiFi101#86

@arendst
Copy link
Owner

arendst commented May 9, 2017

I don't think the arduino-esp8266 project is using wifi101.

arendst added a commit that referenced this issue May 10, 2017
5.0.6 20170510
* Remove hyphen in case of a single DHT sensor connecetd (#427)
* Add command MqttRetry <seconds> to change default MQTT reconnect retry
timer from minimal 10 seconds (#429)
@Satellietje
Copy link
Author

Perfectly resolved in v5.0.6
Thank you 👍

curzon01 pushed a commit to curzon01/Tasmota that referenced this issue Sep 6, 2018
5.0.6 20170510
* Remove hyphen in case of a single DHT sensor connecetd (arendst#427)
* Add command MqttRetry <seconds> to change default MQTT reconnect retry
timer from minimal 10 seconds (arendst#429)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Enhancement that will be worked on
Projects
None yet
Development

No branches or pull requests

4 participants