Import Code from Website - Driver Code

Hey all,

I noticed this morning that none of my Drive Code "Import Code from Website" URLs will save like they do for App Code.

Seems like they used to save, can't be 100% sure however

Did something change or am I missing something?
Rick

I just checked and was actually surprised to see that the Apps actually do remember the Import URL. That's actually very nice.

I mostly work on Drivers and do not recall that they have ever saved the Import URL. It would be very handy if the URL was preserved.

Tagging @chuck.schwer to see if he can shed any light on to this.

It will be wonderful if they will save it for drivers as well and then create an app that checks daily if page has been changed since existing driver and in case send a notification.

Nope, for Drivers, it never saved that.

We handle drivers and app differently, we still need to unify our handling of these. For Apps, it gets stored in a setting in the database automatically, for Drivers you can include it as part of the definition.

metadata {
    definition(name: "ExampleDriver", namespace: "example", author: "Example", importUrl: "http://example.com/ExampleDriver.groovy") {
...
}
8 Likes

Ahhh! This is awesome. Thank you for explaining this!

Tagging some others who would probably like to know this as well - @Cobra, @stephack, @srwhite, @bptworld, @veeceeoh, @ritchierich

6 Likes

Thats a very useful thing to know..

What would be even better is if there were plans to allow apps to self-install drivers? It would be really useful for my upcoming release of HubConnect.

3 Likes

Thanks for the tag!

@chuck.schwer - How is adding importUrl: to a device driver useful? I tried adding it to a device driver and don't see the driver import URL field auto-populate when I hit the [import] button while viewing that driver's code.

Did you reload the page? It should be there after a reload of the page.

1 Like

Ah, okay. Yes, it works beautifully!

So does the importUrl definition parameter also create a string object that allows the associated code text at that URL to be examined (for versioning checks, for example)?

No, what you see is what you get.

2 Likes