When creating a new device there is a drop down box with all the available drivers in it. Is there anyway to duplicate this in an app? Specifically would like to have a drop down of just the user created drivers. And if this is possible, could I query the version from it?
is there a way to send the version (or any data) from the driver to a device, like we can from an app?
I get this error:
2019-08-21 05:47:32.922 pm errorgroovy.lang.MissingMethodException: No signature of method: java.lang.String.sendAWinfoMap() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl) values: [AppWatchdog2DriverVersion:v2.0.0] on line 50 (sendAWinfoMap)
No, I'm trying to 'send' the version to another device. This is for my App Watchdog app. Each of my apps 'sends' the version data to a device for storage. The device adds all the different apps/versions into a map, App Watchdog then takes this data and compares it with Github. Works great for apps but drivers don't seem to have the same ability to 'send' the info anywhere.
This is what I'm trying to do in the driver, again it works great in an app. This should look familiar to you @stephack, I was actually looking at how you added names into your Virtual Container driver, very interesting.
input("awDevice", "enum", title: "Device to send Version to", options: ["App Watchdog Data"])
lol, too confusing! Basically I just need to be able to pull the version info from the driver at will so I can compare it to Github. Anyway that you know of to do that? Not a device using it but from the actual driver itself?
Yeah...I just got that..I can be a bit dense sometimes. I don't think it's possible but @chuck.schwer could confirm.
I believe you can query a device for it's version but I don't believe it's possible to check driver code without actually selecting a device that is using said code.
Only thing I can think of off the top would be to have the user select at least one device from every "type" of device that needs to be kept up to date. Then you could have the app issue the sendAWinfoMap command to those devices on a schedule. Sounds painful, but may be doable...I havent really thought it through though.
Do you have a list of "supported" drivers that you maintain?
You could create one input for every supported type and the user could just add an existing device using that driver. If they don't have a device using it, then I doubt they would care if it's up to date or not.
You could narrow down the input selection for each by specifying the driver name in the input type. For example, if Virtual Containers were supported your input would look something like:
input("vcDevice", "device.VirtualContainer", title: "Select a Virtual Container device")
In the above, only Virtual Container devices would be listed.