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

Feature request: MQTT Discovery #224

Closed
Dinth opened this issue Nov 14, 2018 · 11 comments
Closed

Feature request: MQTT Discovery #224

Dinth opened this issue Nov 14, 2018 · 11 comments
Labels
enhancement integration topices related to integration such as MQTT

Comments

@Dinth
Copy link
Sponsor

Dinth commented Nov 14, 2018

MQTT is not a very intuitive system and a lot of users struggle with setting it up (not only with ebus). There's a system which allows autodiscovery of MQTT services:

https://www.home-assistant.io/docs/mqtt/discovery/

I dont know C++ but i bet it wont be easy to implement this. This being said, i believe that this system would allow ebusd to grow it's userbase faster.

@andig
Copy link
Contributor

andig commented Nov 14, 2018

Looking at the link I'm assuming that you're suggesting that ebusd should support Homeassitant's proprietary device discovery protocol?
Imho that is not core responsibility of ebusd but could be implemented outside of it, e.g. using the output of ebusctl find with the help of mosquitto_pub.

@splatch
Copy link

splatch commented Nov 14, 2018

@andig I think there is a universal way described in Homie convention: https://homieiot.github.io/.
As you can find there - it is supported in OpenHab 2.4 (to be released soon) as well as in Home Assistant. By following rules described above it will be possible to plug ebusd directly in any tool which understands appropriate topic names.

@andig
Copy link
Contributor

andig commented Nov 14, 2018

Isn't your link to hassio is a different thing from homie? The hassio link explains how to tell hassio which devices exist on mqtt while homie describes a self-describing mqtt topic hierarchy for compatible devices?

Or I'm getting this all wrong, sigh.

Please don't get me wrong- I'm not debating this is isn't useful, I just don't think that its core ebusd responsibility.

@Dinth
Copy link
Sponsor Author

Dinth commented Nov 14, 2018

No, you're right @andig, i never used Homie, but i was under impression that HA Discovery is just an implementation of Homie. This means that there are two very similar although different standards of discovery, both already quite well estabilished with hardware support, etc.
Anyhow, this is not a "core functionality" feature request, but just a "it would be nice to have it in the future" kind of request :)

@andig
Copy link
Contributor

andig commented Nov 18, 2018

Does anyone know of a comparison which discovery convention is "more" universal or has best support?

@Dinth
Copy link
Sponsor Author

Dinth commented Nov 18, 2018

Does anyone know of a comparison which discovery convention is "more" universal or has best support?

Both have some decent hardware support, but they differ with software support:
Home Assistant Discovery obviously works with HA.
Homie seems to have some initial OpenHAB support (but wait till someone confirms it) and i believe that Domoticz also supports it.
Home Assistant Discovery should work almost out of the box though, while according to posts i found about Homie, it needs some tinkering to make it work even on systems which support it.

Maybe instead of looking which system has more compatibility, check which system's philosophy suits your project better.

@andig
Copy link
Contributor

andig commented Dec 2, 2018

Btw, I have just implemented Homie for GoSDM in gonium/gosdm630#85. Homie looks definitely interesting- it remains to be seen how far adoption will go. I.e. iobroker does not offer it yet although its conceptual approach seems quite close.

One interesting aspect for the implementation is that it makes sense- since homie devices are retained in mqtt- to unpublish the entire device tree upon startup in case structure has changed.

@Dinth
Copy link
Sponsor Author

Dinth commented Dec 25, 2019

Seems that HA discovery gets a wider adoption so far - Sonoff switches, Valetudo (robotic vacuum open firmware), Zwave2MQTT, Zigbee2MQTT.

@john30
Copy link
Owner

john30 commented Dec 25, 2019

this is really not an easy one as each message would have to mapped to some HA device if I understood the documentation correctly. This is especially tricky as combined values (like temperature and status) as seen on eBUS can not be easily integrated like that. Somebody with deeper knowledge of HA or willing to spend a lot of time would be needed here. I don't have that time available.

@Dinth
Copy link
Sponsor Author

Dinth commented Dec 25, 2019

Hi. You're right, HA would need to create a entity for each of the values, that's the point of autodiscovery. I think it would actually work great with eBus, as everybodys setup has different values, a lot of values, so manual creation of sensors for HA may take many, many hours and cannot be just copied and pasted to another setup.
I wish i could help with that, but im a really lousy hello world level coder. Can help with translations, documentation or testing.

@john30 john30 added enhancement integration topices related to integration such as MQTT and removed needs analysis labels Jan 30, 2022
@john30
Copy link
Owner

john30 commented Mar 19, 2022

implemented

@john30 john30 closed this as completed Mar 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement integration topices related to integration such as MQTT
Projects
None yet
Development

No branches or pull requests

4 participants