My goal is to add the Comet Pro to my list of firmware monitored devices. This requires a website and possibly an API feature, with many devices I parse a pull of the public website for firmware releases and, if available, make an API call to the device itself to see the installed firmware.
Currently, $ curl 'https://dl.gl-inet.com/kvm/rm10/stable' (or some other URL) is geared around browsers and fails for anything not supporting JavaScript, but a tag could produce reasonable content like a JSON listing of releases or even just filenames. This would allow me to store the current latest firmware locally and send a push notification (via Slack and Discord in my case) whenever the latest release gets bumped.
I notice that the pikvm API call curl -k https://{kvm_host}/api/redfish/v1 returns the Redfish version 1.6 on Comet KVM firmware 1.7.2.1. Perhaps there is a better API call to use, or there could be an augmented /api/glinet/v1/version path added?
The use case here is that my RM10 devices are low use, I only log into them when SSH fails to one of the servers. As such, I may end up several releases out of date instead of generating a push notification that an update is available. The API access to the firmware release is a nice-to-have, several of my devices are offline or rarely powered on (for example, I have a Bluetooth bike helmet which has no network access and a BBQ power draft controller which is rarely powered on).
That's perfect! Now I can see the latest available release for my devices which is the important bit.
Ideally I'd also love to expose the contents of /etc/version (reformatted as JSON or something a bit more sane) someplace on the device accessible via an API call, I may explore trying to find a safe spot I can deposit a PHP file on the device (so I can do a once-and-done script if it's missing) but I probably need to spin up a device versioning database anyway so storing it off-device is not a show-stopper.
That is very nice, I particularly like the consolidated data (/api/all.json). I have some RM1s floating around that I may repurpose. Any chance this could make it to the main site at some point?
Now I know, the Admon username and shield had me fooled
As an aside, this is turning into a bigger project where I now have a script to check the latest firmware version and initially will fail to pull the installed version and alert that I should run a setup program (which will likely be needed on cert rotations as well as firmware updates).
This setup program will:
Set a DNS entry for the device with an FQDN
Setup .ssh/authorized_keys
Reformat the /etc/version into JSON and publish it to the webserver
Push valid TLS certs
Whatever else I think of in the future