When I started with Meshtastic I had a small Mesh (I still have) but I wondered why can I not see a Meshtastic Node just as a single device in Home Assistant?
So this became my first real MQTT discovery; with a lot of wrong intents and ‘kommaneuken’ (read forgetting them, where HA insisted on them).
After a while I think I came to a satisfying result; pretty flexible and it only requires 1 automation for retaining and 1 script as an one-size-fits-all which can be used for creating the discovery for each Meshtastic Node.
If you require additional sensors than the BMP you will find it easy to add then to the script.
Ok, maybe there are better solutions out there but this is my NOOB-style of accomplishing it with everything already available in Home Assistant. Hope you like it.
PS to be honest I also needed for this example a Template Sensor created inside Helper. Everything can be done without any textual YAML-files, reloads or restarts.
(but yes this was grown out of necessity).
I think I missed this one, thanks for letting me know. I think JSON is only limiting in respect of additional steps and perhaps creating additional and perhaps unnecessary traffic.
This integration works very nice; so far my only observations are:
it does not supply device info like type and software which likely can also be extracted (type probably with an internal table).
some environment metric sensors are not present so wonder why these entities are created.
and last but not least the icon of voltage is a sinus wave
But this rest is very good and far beyond my skills.
I assume you are referring to kvj/hass_Mtastic_MQTT regarding your observations, best to open issues on the project if you feel others might miss the same things too.
I did not look too much into that integration as the MQTT based approach of directly consuming meshtastic mqtt messages seemed a bit tedious to setup (and requires wifi) and has some limitations on what messages are actually published depending on if the broker used is considered private or public by the meshtastic firmware.