I just started development of some Hubitat apps, and I'm using IntelliJ as my IDE. I configured the project to use Java 1.8 and Groovy 2.4, but I can't find Hubitat or SmartThings binaries / library / sdk, so as you can see in my screenshot, IntelliJ doesn't recognize the Hubitat / SmartThings specific types, methods, etc. for code completion and static checking. Development would be much easier if someone could provide this.
OK, that's FUNNY. Thanks.
Yea, it's not open source, not available, never created. But again, thank you for the laugh.
There is no SDK.
There isn't even any real documentation. The closest is the ST docs.
I realize the SmartThings libs aren't publicly available, but they do obviously exist. I even know the URL where they can be pulled from because the SmartThings web IDE uses them, but it requires authentication (https://smartthings.jfrog.io/smartthings/libs-release-local).
Also, they don't need to be open source. If the Hubitat devs could just provide the compiled binaries relevant to app and device code, it would do the job without needing to provide source. We might be able to just grab them from the Hubitat if we could get access to the file system. But I was hoping a Hubitat dev could just provide them.
There is a bit of documentation at Developer Documentation - Hubitat Documentation. That plus the ST docs is enough to do pretty much anything, but it would still be nice to have some binaries for my IDE, even if Hubitat isn't going to provide an SDK.
This is pretty unlikely to happen. Personally, I edit in my IDE of choice, then usually paste it back into Hubitat from time to time to do some real testing with it.
I am (as I've recently said elsewhere) surprised nobody has at least re-implemented a SmartApp-type Groovy runtime environment as an open-source project, something that would address part of what you're asking for (although it would obviously not be the same environment and also subject to its quirks)--basically what Hubitat did to create their own platform, plus presumably a ton more work (this seems like the much harder part) creating the Z-Wave and Zigbee driver classes/methods in a similar manner. I guess the appeal might not be there on the ST side since this would be custom code and therefore force pretty much everything to run in the cloud, even though you're actually running a lot locally, so I see why this might not be as appealing over there...
Of course, to make this really usable, you'd need to re-implement at least LAN device specifics so you have a device to actually work with. "Simulator" devices like the ST IDE would probably do too, though. And of course it won't help a Z-Wave or Zigbee driver/DTH is what you're developing (I do not envy the job they had of trying to make those work). This was just a thought for apps.
Apologies if this is a naive question as I’m not a developer.
But if access to those libraries requires authentication, doesn’t that imply SmartThings has an interest in not freely/widely disseminating the info contained therein?
Yes, SmartThings doesn't, but that doesn't mean the Hubitat team has to make the same choice.
I might end up just stubbing out the classes and methods contained within the Hubitat developer docs so I can at least use autocomplete in my IDE and know which methods are available without having to refer to the docs every time.
I think we all who develop for this platform have solved our basic needs in different ways, although I'm sure non of them are perfect.
I also work in my IDE of choice, but I got tired of copy-paste so now I can at least push the changes straight from the IDE to HE. Not perfect, but at least something.
I'm not too surprised this has not been done, it is a lot of work to do alone, with the limited time I'm sure we all have we probably choose to do other projects which solve more direct problems. Like a new driver or app. There is actually this to begin with:
I have it on my list to try and it looks like a good start if nothing else.
Nice! That is exactly the sort of thing I was in search of. Will definitely give it a shot.
I'd love hear how that goes, I just haven't had time to try it out, it requires some adaptation to my environment and I've not yet spent the required time for that.
If anyone just wants autocomplete for their IDE, I created this and got that working for my environment: GitHub - gtg465x/hubitat-source-stub