

End of support notice: On May 20, 2026, Amazon will end support for Amazon IoT Events. After May 20, 2026, you will no longer be able to access the Amazon IoT Events console or Amazon IoT Events resources. For more information, see [Amazon IoT Events end of support](https://docs.amazonaws.cn/iotevents/latest/developerguide/iotevents-end-of-support.html).

# A commented example: HVAC temperature control with Amazon IoT Events
<a name="iotevents-commented-example"></a>

Some of the following example JSON files have comments inline, which makes them invalid JSON. Complete versions of these examples, without comments, are available at [Example: Using HVAC temperature control with Amazon IoT Events](iotevents-examples-hvac.md).

This example implements a thermostat control model that gives you the ability to do the following.
+ Define just one detector model that can be used to monitor and control multiple areas. A detector instance is created for each area.
+ Ingest temperature data from multiple sensors in each control area.
+ Change the temperature set point for an area.
+ Set operational parameters for each area and reset these parameters while the instance is in use.
+ Dynamically add or delete sensors from an area.
+ Specify a minimum runtime to protect heating and cooling units.
+ Reject anomalous sensor readings.
+ Define emergency set points that immediately engage heating or cooling if any one sensor reports a temperature above or below a given threshold.
+ Report anomalous readings and temperature spikes.

**Topics**
+ [Input definitions for detector models in Amazon IoT Events](iotevents-commented-example-inputs.md)
+ [Create an Amazon IoT Events detector model definition](iotevents-commented-example-detector-model.md)
+ [Use BatchUpdateDetector to update an Amazon IoT Events detector model](iotevents-commented-example-batch-update-detector.md)
+ [Use BatchPutMessage for inputs in Amazon IoT Events](iotevents-commented-example-input-usage-examples.md)
+ [Ingest MQTT messages in Amazon IoT Events](iotevents-commented-example-ingest-mqtt.md)
+ [Generate Amazon SNS messages in Amazon IoT Events](iotevents-commented-example-generated-sns.md)
+ [Configure the DescribeDetector API in Amazon IoT Events](iotevents-commented-example-describe-detector.md)
+ [Use the Amazon IoT Core rules engine for Amazon IoT Events](iotevents-commented-examples-iot-rules-examples.md)