Example: Device HeartBeat to monitor device connections with AWS IoT Events - AWS IoT Events

Example: Device HeartBeat to monitor device connections with AWS IoT Events

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

The Defective Heart Beat (DHB) example illustrates how AWS IoT Events can be used in healthcare monitoring. This example shows how you can create a detector model that analyzes heart rate data, detects irregular patterns, and triggers appropriate responses. Learn to set up inputs, define thresholds, and configure alerts for potential cardiac issues, showcasing AWS IoT Events's versatility in related healthcare applications.

{ "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" } }