範例:使用 Device HeartBeat 監控裝置連線 AWS IoT Events - AWS IoT Events

終止支援通知:2026 年 5 月 20 日, AWS 將終止對 的支援 AWS IoT Events。2026 年 5 月 20 日之後,您將無法再存取 AWS IoT Events 主控台或 AWS IoT Events 資源。如需詳細資訊,請參閱AWS IoT Events 終止支援

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

範例:使用 Device HeartBeat 監控裝置連線 AWS IoT Events

此偵測器模型是可從 AWS IoT Events 主控台取得的其中一個範本。為方便起見,它包含在此處。

瑕疵心動圖 (DHB) 範例說明如何 AWS IoT Events 在醫療保健監控中使用 。此範例示範如何建立偵測器模型,以分析心率資料、偵測不規則模式,並觸發適當的回應。了解如何設定輸入、定義閾值,以及設定潛在心臟問題的提醒,展示相關醫療保健應用程式的 AWS IoT Events多樣性。

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