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

The MQTT ONLINE status does not work as expected #112

Open
gitpower2017 opened this issue Dec 8, 2020 · 4 comments
Open

The MQTT ONLINE status does not work as expected #112

gitpower2017 opened this issue Dec 8, 2020 · 4 comments

Comments

@gitpower2017
Copy link

Describe the bug
After Power ON, the MQTT sends an ONLINE once in the field McL/config. A connected client receives this status. A new client or a new query brings an OFFLINE, although the McL is still switched on and working.

To Reproduce

  1. MQTT Broker Mosquitto
  2. MQTT-client Node-Red
  3. MQTT-Client Laptop
  4. ESP McL with SK6812

a) Node-Red is connected to the broker. The field McL/config is subscribed.
Power on ESP. Node-Red MQTT says ONLINE
b) Laptop establishes a new connection to the broker The McL/config field is subscribed to. I see an OFFLINE. But the ESP is ONLINE
c) Node-Red MQTT-Client makes a reconnect to Broker. Subscribes to new McL/config. The answer is OFFLINE. But the ESP is ONLINE
d) Power OFF from ESP all MQTT clients get an OFFLINE

@bpohvoodoo
Copy link
Member

Have to check that

@bpohvoodoo
Copy link
Member

bpohvoodoo commented Dec 15, 2020

Can't reproduce.
Please send your http://your_device_ip/esp_status

@unbekannt3
Copy link

Works as expected here but i think that the out message for the new status could be sent faster e.g my HASS shows the "old" state for around 5-10 seconds after switching on/off as it waits for the feedback...
image

@ryancasler
Copy link

There is a programmable delay in the definitions.h file.
#define DELAY_MQTT_HA_MESSAGE 5
This is so that it doesn't flood HA with too many messages all at the same time. It waits for it to be in a stable state and then sends the message. But it is configurable in the sketch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants