I’ve been setting up some NodeMCUs with various sensors and it’s working great. I want to avoid the step of configuring HA for every new sensor/nodemcu that gets created. I seem to have two options:
MQTT Discovery
I was able to get this working however, I found two issues. HA will duplicate the sensor every time you pub the config topic. If you don’t submit the config topic, you can’t post data. So getting the sensor defined once and only once appears to take more than just MQTT discovery.
HTTP Post
This works great, even better than MQTT discovery. One post with the value and name and HA creates and/or updates the value. All I do is set the unique name in the code, upload the firmware and I’m done. Data shows up in HA.
However I notice that most everyone is going the MQ direction. If I don’t intend to send this data to another broker, what am I giving up by going http post only? Will mqtt on the esp be any more reliable than http?