本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
在 中產生 Amazon SNS 訊息 AWS IoT Events
以下是"Area51"
偵測器執行個體產生的SNS訊息範例。
AWS IoT Events 可以與 Amazon 整合SNS,根據偵測到的事件產生和發佈通知。本節示範 AWS IoT Events 偵測器執行個體如何產生 Amazon SNS 訊息,特別是「Area51」偵測器。這些範例展示 AWS IoT Events 偵測器內各種狀態和事件觸發的 Amazon SNS通知結構和內容,說明 AWS IoT Events 與 Amazon 結合SNS以進行即時警示和通訊的強大功能。
Heating system off command> { "eventTime":1557520274729, "payload":{ "actionExecutionId":"f3159081-bac3-38a4-96f7-74af0940d0a4", "detector":{ "detectorModelName":"areaDetectorModel","keyValue":"Area51","detectorModelVersion":"1"},"eventTriggerDetails":{"inputName":"seedTemperatureInput","messageId":"00001","triggerType":"Message"},"state":{"stateName":"start","variables":{"sensorCount":10,"rangeHigh":30.0,"resetMe":false,"enteringNewState":true,"averageTemperature":20.0,"rangeLow":15.0,"noDelay":false,"allowedError":0.7,"desiredTemperature":20.0,"anomalousHigh":60.0,"reportedTemperature":0.1,"anomalousLow":0.0,"sensorId":0},"timers":{}}},"eventName":"resetHeatCool"}
Cooling system off command> {"eventTime":1557520274729,"payload":{"actionExecutionId":"98f6a1b5-8f40-3cdb-9256-93afd4d66192","detector":{"detectorModelName":"areaDetectorModel","keyValue":"Area51","detectorModelVersion":"1"},"eventTriggerDetails":{"inputName":"seedTemperatureInput","messageId":"00001","triggerType":"Message"},"state":{"stateName":"start","variables":{"sensorCount":10,"rangeHigh":30.0,"resetMe":false,"enteringNewState":true,"averageTemperature":20.0,"rangeLow":15.0,"noDelay":false,"allowedError":0.7,"desiredTemperature":20.0,"anomalousHigh":60.0,"reportedTemperature":0.1,"anomalousLow":0.0,"sensorId":0},"timers":{}}},"eventName":"resetHeatCool"}