Hello, I read smartthings developer’s guid and there is one thing that is a bit hard to understand. The thing is that difference between service manager and device handler. I understand that device handler works for devices and service manager for servers. Why do we need both of them? for example, if i have a meter that measures water usage and the meter is connected through cloud, so it keeps sending it’s water usage data to the cloud. In this case I can build a service manager that can ask server for the usage info at the same time it can send that info to my cell phone, smarthings app, or other displaying connected machines. If I can implement buttons at service manager, device handler, to me it seems like extra work need to be done.
Please help me QQ
1 Like
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
2
I can give a really, really short answer and maybe it will ring the bell:
A SmartApp cannot talk directly with other SmartApps (well, there are ways, but not typical). A SmartApp, however, can integrate with multiple Device Instances (e.g., when Motion turn on Light).
Therefore, it is “essential” that anything that is “like” a “Device”, should have a Device Type Handler and spawn Device instances.
Web and IP connected Devices need a Service Manager SmartApp (as you already know). But that SmartApp won’t communicate directly with other SmartApps … hence the need for the Device(s).
Service Manager is used for discovery of the device. Once device created from the custom device type, you don’t need it anymore. It exist to simplify the installation process.