Global varies to count the number of times open/close the door

smartapp

(Võ Thanh Minh) #1

Global varies to count the number of times open/close the door.
How do in smartthings api, code,…?


(Brian) #2

Initialstate. Easiest.

Or the Google sheets solution.

Or try CoRE.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #3

The only Global variable (well… scoped to the SmartApp Instance or Device Handler Instance) is the pre-defined map, state.* (also referenced by atomicState).

See the developer docs!

For Location scoped attributes, you can use Virtual Device instances and update them with sendEvent().


(Ben W) #4

https://artik.cloud/ has ST integration and monitoring. If its a high traffic you may need to pay ($2 a month for every 10 seconds event).

Its free to try out. Just discovered it today and its easy to integrate through the Samsung SmartApp. Not sure if it will meet your needs.