Auto-discover MQTT feature ?

Moderators: rtenklooster, Voyager, BertB, Stuntteam

Forum rules
You have entered the experimental forum, beware!!!
Post Reply
Message
Author
vincen
Normal user
Posts: 89
Joined: 26 Jun 2017, 07:15

Auto-discover MQTT feature ?

#1 Post by vincen » 24 Feb 2018, 12:53

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

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Auto-discover MQTT feature ?

#2 Post by grovkillen » 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...
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

vincen
Normal user
Posts: 89
Joined: 26 Jun 2017, 07:15

Re: Auto-discover MQTT feature ?

#3 Post by vincen » 27 Feb 2018, 16:19

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

TD-er
Core team member
Posts: 4272
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Auto-discover MQTT feature ?

#4 Post by TD-er » 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 :)

vincen
Normal user
Posts: 89
Joined: 26 Jun 2017, 07:15

Re: Auto-discover MQTT feature ?

#5 Post by vincen » 28 Feb 2018, 08:50

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

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Auto-discover MQTT feature ?

#6 Post by grovkillen » 28 Feb 2018, 09:02

Just post it on the repository. The branches use the same issue tracker.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

vincen
Normal user
Posts: 89
Joined: 26 Jun 2017, 07:15

Re: Auto-discover MQTT feature ?

#7 Post by vincen » 28 Feb 2018, 09:14

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

KnatteAnka
Normal user
Posts: 2
Joined: 26 Jan 2021, 22:59

Re: Auto-discover MQTT feature ?

#8 Post by KnatteAnka » 29 Jan 2021, 21:05

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest