Comments (3)
Only the connection messages are retained - this is by design. When connected over MQTT, the module will set its LWT message. Your MQTT server should see the ESP32 has disconnected and publish the "DISCONNECTED" payload itself. If you're not seeing this happen, the problem likely lies in your MQTT server rather than in the module itself.
The purpose of retaining the message is to ensure that Home Assistant is aware of the connectivity state after a reset. There are no periodic publish events of connectivity - only on connect or disconnect. Thus, retention of the message payload is required in order for Home Assistant to understand the correct state at time of boot.
I am not able to reproduce this issue in my Home Assistant instance.
from esp32-mqtt-room.
Maybe what happened is that the mqtt server went down before those ESPs -
Later mqtt restarted and ESPs were still down
Can you confirm that in that case retained states no longer reflect the state of the ESPs
from esp32-mqtt-room.
You're correct, if the MQTT server goes down, the LWT message information will likely be lost. At that point, the retained states will not reflect the connectivity state of the ESPs. You'd need to reset them by publishing a null or empty payload with the retain flag.
from esp32-mqtt-room.
Related Issues (20)
- Static IP setup HOT 2
- Add tracking by name. HOT 1
- BLE Beacon Not Showing HOT 2
- Question/Feature Request: Support of PIR and maybe other sensors HOT 2
- Not connecting to WiFi HOT 5
- humidity and temperature sensor library suggestion HOT 1
- Add a white list of devices to reduce useless publishing on the MQTT server HOT 5
- Add BLE to name or description/summary
- Web UI HOT 2
- No devices are found HOT 8
- No wifi network connection HOT 2
- DTTerastar fork: manual wifi ssid HOT 6
- Not seeing any BLE devices HOT 5
- Updated Settings for a ESP32 and it no longer detects info for Home Assistant HOT 8
- Link to Person in HomeAssistant HOT 3
- allowedListCheck by UUID and not Mac Add HOT 1
- Can't get OTA to work HOT 3
- T18_3.0 18650 Battery Monitoring Support
- ESP32-wroom-32 not responding after 5-10 min HOT 1
- Team Up - DHT 11/22 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp32-mqtt-room.