Skip to end of metadata
Go to start of metadata


1. Component list

  1. Arduino UNO board (
  2. Arduino Ethernet shield (
  3. DHT11/22 temperature/Humidity sensor (
  4. 10k resister.

2. Overall idea

We are going to introduce you how to use Arduino hardware to monitor temperature and humidity using some standard sensors and GadgetKeeper with event/trigger feature. Assume you need to monitor the temperature and humidity level in a remote location(may be in side a server room) and also need to receive notification emails/alerts if the per-defiened threshold range is exceeded. Then you can simply follow this tutorial and implement your own reliable solution with the support of GadgetKeeper. Basically the arduino will continuously monitor the temperature and humidity with GHT11/22 sensor connected to it and send those readings to GadgetKeeper periodically (this updating frequency can be defined on the given sample code). Threshold levels and email ids can be configured in GadgetKeeper triggers. Also the trigger script can be modified to send hierarchical alerts to different mail ids. For an example, if we consider the temperature change event in a server room, following actions can be defined on trigger script.

  • If the temperature exceeds the threshold upper level, then send alert to,
       1) Server room administrator and
       2) A/C maintenance engineer.
  • If the temperature going below the lower threshold level, then send notification to,
       1) Server room administrator and
       2) Heater system maintenance engineer.

3. Prepare Arduino hardware

Follow step 3 and 4 of Arduino Weather Station tutorial to prepare Arduino hardware.

4. Configure GadgetKeeper

Follow Create Event And Trigger tutorial if you need detailed "point and click" UI instructions

1. Create the "weatherStation" thing:

2. Create "humidityChanged" event

3.  Create "temperatureChanged" event:

4. Create "highTemperatureEmail" trigger:

4. Click "Edit Script" button on "highTemperatureEmail" trigger and code trigger business logic:

4. Create an API Key with "All" permission on "weatherStation", see instructions here.


5. Arduino sketch

Now you can upload the following arduino sketch to test hardware and monitor/test the system. You only need to change the relevant REST API settings on the code configuration area before uploading.

6. Test the code

Its time to test the system. The Arduino sketch support for sending test notifications, so you can try that feature to check whether the notification service is OK. First open the serial terminal on Arduino and all the activity information will be displayed on it.(use the 57600 as the baud rate) 

type "test" on serial terminal and click on "send" button to send a test notification as shown below.

The sketch will upload the temperature/humidity readings to GadgetKeeper every 10s and you can change the data uploading frequency in the sketch.

  • No labels