Subscribing

My question is about subscribing. Im new to writing smartapps. I was wondering, and this may just be an opinion thing; should you always subscribe to device events in the install/update methods or would you do it in more real time like say with a mode change? For example, in mode home I want these contacts to be monitored but in mode stayday, this other set to be monitored.

You subscribe to all of them regardless of mode…the action taken can be mode dependent. Don’t over think it.

1 Like

Are you working with groovy smartapps or our new endpoint apps?

My thought proccess is that if you have a million subscriptions running at once, it can slow things down vs having subscriptions running only for that mode and a mode changing subscription that would trigger subscriptions only used for that mode. I am working with groovy. Dont know anything about the new endpoints apps.

As I said before don’t over think it. Unless your writing something like core/webcore I don’t see that it’s possible to have that many subscriptions as you’re limited to ~200 devices and if you are don’t use groovy it’s going away.

This is why I asked my original question, to find out reasons why or why not. That aside, what and/or where can I start playing with this new endpoints apps or what ever is replacing groovy?

Endpoint Automation docs are here

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.