Is there a way to get the current (and latest) version information for all core Pi-Hole components so
Pi-Hole
Web Interface
FTL
using the API? According to Pi-hole API this seems to be impossible right now.
I´m looking for a smarter way than chopping strings output of "pihole -v" to get those 6 needed information. Thought API would be the best place to look at...
Other ideas welcome. Otherwise I´ll need to start the string chopping action.
Final goal by the way is to get the current and latest Pi-Hole components version information available in Home Assistant. Once a component has an update available, a notification will be sent and the update can be triggered - completely remotely (by using SSH). Unfortunately current Pi-Hole integration in HA is far behind this, so I´m building it on my own.
Thanks. That new v6 API looks promising, definitely something I could work with.
So for the moment (as I don´t know what´s the time schedule for major 6 version) I´ll stick with the pihole -v output. Which will hopefully (likely?) continue to work with next major release so my work/time is not wasted
I´m done meanwhile hacking pihole -v. I use Perl based RegEx directly in grep command instead of handling fixed character cut mechanism so it´s more flexible (v5.9 or v5.9.1 or v5.99 or... - everything will work as long as the basic structure of pihole -v output will be unchanged).
Pi-Hole current --> pihole -v | head -1 | grep -oP '(?<=\is v)(\d*\.)+(\d*)'
Pi-Hole latest --> pihole -v | head -1 | grep -oP '(?<=\: v)(\d*\.)+(\d*)'
Web current --> pihole -v | head -2 | tail -1 | grep -oP '(?<=\is v)(\d*\.)+(\d*)'
Web latest --> pihole -v | head -2 | tail -1 | grep -oP '(?<=\: v)(\d*\.)+(\d*)'
FTL current --> pihole -v | tail -1 | grep -oP '(?<=\is v)(\d*\.)+(\d*)'
FTL latest --> pihole -v | tail -1 | grep -oP '(?<=\: v)(\d*\.)+(\d*)'