I just had a weird thing happen and now I'm curious.
I lost some code updates I did for a driver (mis-copy/paste between hubitat and github). So when trying to redo it, I just had hubitat throw an error saying version mismatch, versions 42 and 44 don't match (I think I had done version 43 in separate tab while 42 was still open).
Does that mean there's some versioning going on behind the scenes, and if so, how do I access it?
I think there is some sort of versioning going on, though it might just be a "change number" for sanity purposes. I've not managed to pull a previous version though.
I have a node red flow that pulls all my driver's to disk and names them with version numbers so I don't lose too much when I mess up
I scrape http://hubitat/driver/list
looking for anchors matching #devicetype-table a (really just to get the driver "id")
convert the url from "http://hubitat/editor/[deviceID]" to http://hubitat/ajax/code?id=[deviceID]
then extract the
"source" and "version" attributes from the JSON response
I make the name of the groovy file up from the value enclosed in the NAME tag after fixing up iffy characters