Page 1 of 1

Auto-discover MQTT feature ?

Posted: 24 Feb 2018, 12:53
by vincen
Hi

Is it planned to implement in V2 the auto-discover MQTT feature implemented by Home automation systems like Home-Assistant ? It would be really nice and make stuffs a lot easier to config all the more for beginners ;)

Thanks

Vincèn

Re: Auto-discover MQTT feature ?

Posted: 24 Feb 2018, 14:03
by grovkillen
If you request stuff like this you should do the home work and provide as much info as possible. Links...

Re: Auto-discover MQTT feature ?

Posted: 27 Feb 2018, 16:19
by vincen
grovkillen wrote: 24 Feb 2018, 14:03 If you request stuff like this you should do the home work and provide as much info as possible. Links...
Oups you are right so here is the cooking book for it ;)
-> First you need to setup the root prefix for autodiscovery (should be a field to fill). For Home Assistant it's homeassistant basically. That field should be combined with a button to "activate" the discovery and a unique node ID (user fileable).
-> Once discovery button has been pushed and device restarted, it'll send automatically on MQTT broker setup in ESPEasy a configuration topic for each hardware device configured in ESPEasy (Home Assistant for example supports in autodiscovery binary sensors, covers, fans,lights, sensors and switches !!). The configuration topic should be formatted this way:

Code: Select all

<discovery_prefix>/<component>/[<node_id>/]<object_id>/<>
"component" being one of the type previously listed
"node_id" being an optional field to supply node providing the topic
"object_id" being the unique node ID filled by user in ESPEasy parameters
"<>" being the config or state to define current action.
-> The discovery button will be putted back in OFF state in ESPEasy interface.

For more details with Home assistant (basically same process with all MQTT clients that support auto-discovery): https://home-assistant.io/docs/mqtt/discovery/

If you need a tester I'm your man :)

Thanks

Re: Auto-discover MQTT feature ?

Posted: 27 Feb 2018, 21:27
by TD-er
Hmm that sounds like a cool feature.
Could you cut'n-paste that on the Github issue list?
There we can find things again to implement and fix.
On the forum I can't :)

Re: Auto-discover MQTT feature ?

Posted: 28 Feb 2018, 08:50
by vincen
TD-er wrote: 27 Feb 2018, 21:27 Hmm that sounds like a cool feature.
Could you cut'n-paste that on the Github issue list?
There we can find things again to implement and fix.
On the forum I can't :)
Just to be sure as there are multiple branches on github for ESPEasy, should I post in this one ? https://github.com/letscontrolit/ESPEasy or the specific to V2 stable ? https://github.com/letscontrolit/ESPEasy/tree/v2.0

Re: Auto-discover MQTT feature ?

Posted: 28 Feb 2018, 09:02
by grovkillen
Just post it on the repository. The branches use the same issue tracker.

Re: Auto-discover MQTT feature ?

Posted: 28 Feb 2018, 09:14
by vincen
grovkillen wrote: 28 Feb 2018, 09:02 Just post it on the repository. The branches use the same issue tracker.
oki, posted ;) https://github.com/letscontrolit/ESPEasy/issues/977

Re: Auto-discover MQTT feature ?

Posted: 29 Jan 2021, 21:05
by KnatteAnka
i wanted the auto-discover feature faster and less demending from each espeasy so i have created a Node-Red flow to do the work at creating devices according to the name of the variable
Current support of
* Sensors
* Switches
* Dimmer
* RGB Dimmer

Working on Termostat to get it to output set temperature

note that because there is not /Set to set a variable i do need to have rules on each device but i dont need to do anything inside configuration.yaml
and each device is under Devices and has all values there.
https://github.com/KnatteAnka/NodeRED_E ... oDiscovery