Hey folks, I'm fairly new to hubitat. I am looking at writing an app/driver to get a better feel for how they work, but I can seem to find a decent, outside of straight implementation, definition for app or driver. Can someone tell me when I would use one over the other?
A driver is nothing more then an interface between a "device" (or something similar) and HE. It has none or as less as possible intelligence to it.
An app has no information about "devices" on it's own but does contain the intelligence to make something do something.
They both run in a sandbox on HE, but I think the sandbox also differs in how it's configured and what is possible in it (but that is just a wild guess).
A driver abstracts a device into Capabilities, Attributes and Commands.
Switches and Dimmers have different abstractions. One uses "on and Off" the other uses "set Level 0-100%"
Apps cause one or more devices to perform an action. "Turn on lights in the room" --> becomes On for switches and 100% for dimmers. The User identifies the Devices to the App, by the Capabilities of Drivers.
That is not necessarily true. A driver can have as much or as little intelligence you want int it. That intelligence is only limited to that device.
The best way to differentiate between drivers and app.....drivers only talk to one device and can't communicate between each other. Apps talk between devices through the drivers. The heavy lifting of decoding messages and interpreting data from the device is done by the driver while high level actions are commanded by the app using a standard set of commands which vary based on capability.