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
Silent option for MQTT (for use alongside Native API) #375
Comments
+1 on this request.
This works nicely and is much faster the the HA automation I was previously using for the same task, however, a consequence of adding the mqtt config is that ESPHome is now publishing state using both NativeAPI (wanted) and MQTT (unwanted) |
Definitively a very important option to be added |
+1 for this. |
I'd love to have this option too. |
Adding my +1. I'd only like to use the publish action, on it's own. I've been instructed before to try setting topics to " ", but this does not properly solve the problem and will instead output everything on the top level of the topic. |
+1 on this request for the MQTT Room Presence use case! |
I've got a pull request open for this: esphome/esphome#4078 🤞 |
Hey Peeps here... @mvgijssel, @nagyrobi @LewisSpring @AlexDanault @SeByDocKy @danps1 @mklettke |
Hi @grillp, Just tried to test this out but getting an error: I added
|
As an aside, would it be possible to add an option for entities to allow them to expose over mqtt? (eg, as an override to the |
Hmmm... it seems that the 'PR' mechanism in esphome dos not pull in changes in the core components, which these are, so you may not be able to test these changes by using the pr mechanism.. bugger. The only way would be to build from my fork/branch grillp_mqtt_publish_state_option or from th esphome dev branch Sorry about that folks. |
That would be fairly trivial, but not something I will do in this first cut. |
I'm using Docker, this will be hard to test at present (dev docker image outdated) |
+2 ... we need silent mqtt version so much ;) |
as I'm adding more esp32's with battery (and using deep sleep and control over mqtt) I could use this. |
+10 😅 I have over 110 entities on my esp32, which i don't want to publish over mqtt, but one sensor I want to read.. |
Describe the problem you have/What new integration you would like
Add a silent option to MQTT Client which suppresses automatic reporting of ESPHome component (sensor, etc...) values but still allows one to use MQTT features in ESPHome such as triggers, actions (publish), and sensors (subscribe).
Please describe your use case for this integration and alternatives you've tried:
When using the Native API alongside the MQTT Client (with discovery set to false) the values of all ESPHome components are also reported over MQTT automatically creating a lot of unnecessary traffic which can add up over a lot of ESPs.
For example, one may wish to use MQTT alongside the Native API, for:
My primary use case (Room Presence) could also be done on the Home Assistant side with an automation (for each ESP32) and disabling MQTT on the ESP32 but I think that wouldn't be as clean a solution as directly on the ESPs (i.e. edge computing).
Additional context
I ran across this issue since I have just started using ESPHome (migrated from a custom solution and have been loving it so far - great job btw!) and wanted to setup Room Presence. This is fairly simply using the existing tools (BLE rssi sensor, lambda filter to convert to distance, on_value action with mqtt_publish_json) - I would like to write this up in the cookbook section when I get the chance. The only issue is the extra, unnecessary (IMO) traffic this creates when also using the Native API.
The text was updated successfully, but these errors were encountered: