Adding Driver Version to Device Info?

driver

#1

Is there a way to make your driver version show up on the device page somewhere, without it being in the name of the driver (that is my workaround if there is not a more "normal" method)? I want to be able to more easily tell which device is running which version as I try things out.


#2

You could put it in the state in the installed() method I suppose.


#3

I'm not sure this is what you are referring to but when I try out a driver where there are alternatives, I change the name in the metadata section of the driver code.

metadata {
definition (name: "ALT1 Dimmer Switch


#4

If you are talking about ‘custom’ drivers then it is very easy
Have a look at the code in any of my drivers
They all have version info

Http://hubitat.uk

Andy


#5

Thanks for the responses.

Andy (or do you prefer Cobra?), I actually had downloaded one of your drivers to look at (I searched GitHub for Hubitat) and had not actually seen your site, nor did I get a chance to review it yet. The Custom WU Driver specifically. A quick glance shows you had just what I was looking for.
Plus, besides just a driver version status (what I was looking for) the ability to check if there is a newer version?! That is awesome and I had not even thought of that yet. I could easily host updated versions on my domain... make some more use out of it.

Thanks again!


#6

@snell

I think most devs use some form of this since I released the code :slight_smile:

I put the json file on my own domain but I think it's easier to host the files on GitHub as you have an easily accessible source

BTW if you want to get my attention (or anyone else's) for a reply etc it's easiest to 'tag' me using @Cobra

Andy


#7

@Cobra: Of course. Many times, why remake it when someone has already created what you need... Although I am working on a driver that someone else already did to try to make it "slightly" better (mostly as practice). Of course I forgot about flagging it properly.

As for github... I like posting things on my own site since I have done that for many projects all along so it is force of habit.