Programming Reference

Are the programming reference(s) for the code to write drivers, apps, and libraries? I have written for a lot of devices, such as arduinos, basic stamps, PLCs, etc. but I am not quite familiar with the code syntax and labels etc. for these devices. I can figure out a fair amount by dissecting code examples, but I prefer not to copy others bad examples either. I see a lot of things which were ported from SmartThings with a few changes, and I have successfully grabbed bits of code here and changed some commands to make a device work. But it just seems like slogging through mud when if i had some references to consult i could just write the dang code.

1 Like

Welcome to the community. Docs are at the Documentation link at the top of each forum page.

Here is a link to the developer documentation.

https://docs.hubitat.com/index.php?title=Developer_Documentation

There is also a Hubitat repository on GitHub where example drivers may be found.

1 Like

Hubitat's exposed code has the fewest bad practices, I imagine.

1 Like

The old Smartthings documentation are pretty good for beginners. They can still be found archived here:
https://web.archive.org/web/20200513012552/https://docs.smartthings.com/en/latest/getting-started/first-smartapp.html#first-smartapp-tutorial

References to the Smartthings IDE need to be ignored, but the code itself is pretty much the same as on Hubitat.