It would be great if one could track FW versioning info for ESPHome, including:
ESPHome version
User-defined version for the yaml script
Compile date
Perhaps also optionally add user-definable fields so one could include “Author” or perhaps a custom comment/memo.
The more ESPHome devices I have and the more that ESPHome introduces new “breaking” changes, it becomes harder and harder to track version info related to uploaded firmware.
It would be great if on reboot, ESPHome devices would print out the above info (#1-3).
This would require truly minimal amounts of flash to store such info (a few tens of bytes at most) and would require no extra cpu power except the truly trivial amount at startup to print out the versioning info to the log.
This all sounds so trivial and obvious that I am surprised that it has not been implemented yet to date.
I know one can “fake” this by creating additional “text sensor” but that is surely klugey at best – and presumably would consume significantly more memory and processing resources.
You know that you don’t have to upgrade your device if they’re working fine and there isn’t a security issue, right? What’s your reason for keeping up with upgrades?
My suggested workaround would be some template sensors. You would need a couple of tricks to set the data, like making a wrapper compile script to manipulate the YAML.
Except for the author info, all info is already there:
And for the author, as @parautenbach mentioned, you can just create a template text-sensor for that (which would take just as much effort (or less) as creating an additional field
And 2 things:
how would esphome know the author?
since most people run their esphome local, wouldn’t that automatically mean, you are the author? (I wouldn’t run an unknown firmware🤔)
Well, the last several updates claim substantial increases in efficiency and speed so updating made sense for some of my display-intensive devices.
Also, given that there are regular backward-incompatible changes, I find it helps to update as they come rather than potentially waiting years and then having to figure out why it no longer works or even compiles.
As I wrote in the original post, I know you can create template text sensors but as I wrote that is serous overkill resulting in something that is both more klugey and less efficient (both in terms of space and efficiency) than defining several optional fixed fields…
Regarding an (optional) author field, I have contributed code for several esphome projects… and conversely I have used esphome code written by others.
Finally of course ESPHOME doesn’t “know” who the author is. Rather you would specify that field – the same way that you would specify a version field or any other versioning field in any software project.
This is all pretty standard in FW for just about any project or device – for all the obvious reasons…
That seems to be what I am looking for.
It would be nice to add some additional optional fields such as: compile date, author (versus currently where it is recommended to use .<project_name>)
As well as 1 or more generic optional fields
Finally, is there a way to determine the actual version of ESPHome used to compile the FW – that can be helpful in troubleshooting to see if there is a version conflict causing problems.
This shows up in the logs for the device when you view them: both the version and date/time of compilation. There’s also this if you want it all in HA: