┌────┐ ┌────────────────┐ ┌─────┐ │User│ │ThingseePRESENCE│ │Cloud│ └─┬──┘ └───────┬────────┘ └──┬──┘ │ User enters, leaves or stays at sensor detection area│ │ │ ─────────────────────────────────────────────────────> │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │────┐ │ │ │ state = moveCount > 0 ? true : false │ │<───┘ │ │ │ │ │ │ │ ╔══════╤════════════════════╪═════════════════════════════════════════╪══════════════════════╗ │ ║ ALT │ state is changed │ │ ║ │ ╟──────┘ │ │ ║ │ ║ │ Send tsmId 2100 │ ║ │ ║ │ ────────────────────────────────────────> ║ │ ║ │ │ ║ │ ║ │────┐ │ ║ │ ║ │ │ reset timer │ ║ │ ║ │<───┘ │ ║ │ ╠═══════════════════════════╪═════════════════════════════════════════╪══════════════════════╣ │ ║ [state is not changed] │ │ ║ │ ║ │────┐ │ ║ │ ║ │ │ check if timer expired │ ║ │ ║ │<───┘ │ ║ │ ║ │ │ ║ │ ║ │ │ ║ │ ║ ╔══════╤══════════╪═════════════════════════════════════════╪════════════╗ ║ │ ║ ║ ALT │ 2h timer expired │ ║ ║ │ ║ ╟──────┘ │ │ ║ ║ │ ║ ║ │ Send tsmId 2100 │ ║ ║ │ ║ ║ │ ────────────────────────────────────────> ║ ║ │ ║ ║ │ │ ║ ║ │ ║ ║ │────┐ │ ║ ║ │ ║ ║ │ │ reset timer │ ║ ║ │ ║ ║ │<───┘ │ ║ ║ │ ║ ╠═════════════════╪═════════════════════════════════════════╪════════════╣ ║ │ ║ ║ [timer not expired] │ ║ ║ │ ║ ║ │────┐ │ ║ ║ │ ║ ║ │ │ do nothing │ ║ ║ │ ║ ║ │<───┘ │ ║ ║ │ ║ ╚═════════════════╪═════════════════════════════════════════╪════════════╝ ║ │ ╚═══════════════════════════╪═════════════════════════════════════════╪══════════════════════╝ ┌─┴──┐ ┌───────┴────────┐ ┌──┴──┐ │User│ │ThingseePRESENCE│ │Cloud│ └────┘ └────────────────┘ └─────┘