Simple App and Driver Example

I am new to Hubitat, at this point I am looking to write my own Apps and Drivers. I am having a hard time finding documentation. Does anyone have any simple examples of Apps and Drivers using Groovy?

There is a repository of sample apps and drivers. I think this is it:

Apart from that, I'd look at Community topics with the starting text of [RELEASE] and look at the code they direct you to.

There are also a couple of threads where people ask about starting to code in Groovy, which may be useful.

6 Likes

The Github link was very useful! Still struggling here, finding a lot deadlinks to SmartThings, some of them as recent as two months ago. I pulled this from the examples:

input "contactSensors", "capability.contactSensor"
input "switches", "capability.switch"
input "contactSensors", "capability.motionSensor"

Where can I find a list of capabilities?? The "motionSensor" was a good guess that worked :slight_smile:

I'd start by explaining that general Developer Documentation (including capabilities) can be found by clicking on the Documentation link in the top right of this forum, then clicking Developer.

More specifically, the capabilities are here:
https://docs.hubitat.com/index.php?title=Driver_Capability_List

Attributes and commands should be created in the driver to match the capability, what you choose to do with them is your choice.

Thanks again for the quick reply.