Example: Device HeartBeat to monitor device connections - Amazon IoT Events
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Example: Device HeartBeat to monitor device connections

This detector model is one of the templates available from the Amazon IoT Events console. It's included here for your convenience.

{ "detectorModelDefinition": { "states": [ { "onInput": { "transitionEvents": [ { "eventName": "To_normal", "actions": [], "condition": "currentInput(\"AWS_IoTEvents_Blueprints_Heartbeat_Input\")", "nextState": "Normal" } ], "events": [] }, "stateName": "Offline", "onEnter": { "events": [ { "eventName": "Send_notification", "actions": [ { "sns": { "targetArn": "sns-topic-arn" } } ], "condition": "true" } ] }, "onExit": { "events": [] } }, { "onInput": { "transitionEvents": [ { "eventName": "Go_offline", "actions": [], "condition": "timeout(\"awake\")", "nextState": "Offline" } ], "events": [ { "eventName": "Reset_timer", "actions": [ { "resetTimer": { "timerName": "awake" } } ], "condition": "currentInput(\"AWS_IoTEvents_Blueprints_Heartbeat_Input\")" } ] }, "stateName": "Normal", "onEnter": { "events": [ { "eventName": "Create_timer", "actions": [ { "setTimer": { "seconds": 300, "timerName": "awake" } } ], "condition": "$input.AWS_IoTEvents_Blueprints_Heartbeat_Input.value > 0" } ] }, "onExit": { "events": [] } } ], "initialStateName": "Normal" } }