使用传感器和应用程序进行事件检测 - Amazon IoT Events
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

使用传感器和应用程序进行事件检测

该探测器模型是 Amazon IoT Events 控制台提供的模板之一。为方便起见,它包含在此处。

{ "detectorModelName": "EventDetectionSensorsAndApplications", "detectorModelDefinition": { "states": [ { "onInput": { "transitionEvents": [], "events": [] }, "stateName": "Device_exception", "onEnter": { "events": [ { "eventName": "Send_mqtt", "actions": [ { "iotTopicPublish": { "mqttTopic": "Device_stolen" } } ], "condition": "true" } ] }, "onExit": { "events": [] } }, { "onInput": { "transitionEvents": [ { "eventName": "To_in_use", "actions": [], "condition": "$variable.position != $input.AWS_IoTEvents_Blueprints_Tracking_DeviceInput.gps_position", "nextState": "Device_in_use" } ], "events": [] }, "stateName": "Device_idle", "onEnter": { "events": [ { "eventName": "Set_position", "actions": [ { "setVariable": { "variableName": "position", "value": "$input.AWS_IoTEvents_Blueprints_Tracking_DeviceInput.gps_position" } } ], "condition": "true" } ] }, "onExit": { "events": [] } }, { "onInput": { "transitionEvents": [ { "eventName": "To_exception", "actions": [], "condition": "$input.AWS_IoTEvents_Blueprints_Tracking_UserInput.device_id != $input.AWS_IoTEvents_Blueprints_Tracking_DeviceInput.device_id", "nextState": "Device_exception" } ], "events": [] }, "stateName": "Device_in_use", "onEnter": { "events": [] }, "onExit": { "events": [] } } ], "initialStateName": "Device_idle" } }