Tested on:RPi 2; Raspbian Jessie
Prerequisites:Raspberry Pi with Raspbian Jessie and internet connection (see steps 1-7 in the Introduction)
Hardware:BMP180 barometric pressure sensor
LED with a fitting resistor
Host computer (or Smartphone) with internet connection
Jumper cables

Heat warning with Cayenne myDevices: Raspberry Pi IoT applications, the easy way

Automation is the topic of this time. Unlike earlier industrial revolutions, it is not only physical work which is replaced by automation; work that requires quite some knowledge is targeted, too. I do think automation is a good thing; therefore, this tutorial presents Cayenne myDevices, which allows building devices for the Internet of Things without any programming skills. The demo application presented herein is just a simple heat warning device which uses the BMP180 barometric pressure sensor for measuring the temperature, then lights up an LED when a threshold temperature is reached.

How it works
After installation, Cayenne serves as web interface and manages the behaviour of a Raspberry Pi and attached components. Sensors and actuators could be picked from a vast library; the behaviour of the device is controlled by setting up events and triggers.

First, create an Cayenne account. Boot the Raspberry Pi with a freshly installed Raspbian Jessie and make sure it’s in the local network and has internet access with ssh. Then, log into Cayenne and follow the installation instructions- i prefer the installation from the terminal, but Cayenne can be installed from the Apple or Android app stores as well.

Sensor installation
The myDevices web interface now shows some general status information:

Cayenne MyDevices Overview

Cayenne MyDevices Overview

Click on Add new..., then Device.
Cayenne - Add Device

Cayenne MyDevices – add a device

In the now-open interface for adding devices, click on the pressure sensor icon. Click on View Tutorial for help with the sensor connectivity!
Cayenne - Add BMP180

Cayenne – Add BMP180

Click on BMP180, then configure the sensor with the menu on the right side. Choose Raspberry Pi as Device, Value as Widget, an icon and enter the altitude above sea of your location and finally Add Sensor.

LED installation
Click Add new..., then Device, then Light in the devices overview. Then, choose Light Switch and configure it like in this screenshot:

Cayenne add a LED

Cayenne add a LED

Connect the LED and its resistor to pin 12 in BCM numbering (which is pin 32 in BOARD numbering) and GND.
The overview now looks like the image below. Test the LED by clicking its icon.
Cayenne overview with devices

Cayenne overview with devices

Now, reboot the Raspberry Pi with the Commands menu on the right side.

Trigger the heat warning
Click on Add new..., then Trigger. Choose a name, then drag the Raspberry Pi top icon on the left onto the if-clause of the trigger and select the trigger BMP180(Temperature, No Channel) and fit the treshold temperature (80 is good for testing with the finger). Now, drag the Raspberry Pi device from the left onto the else-part of the trigger and select the action LightSwitch(LightSwitch, Channel 12). Finally, click Save Trigger.

Cayenne Trigger

Cayenne Trigger


Cayenne MyDevices is fast, intuitive, pretty and fun to use. I’m missing the option to insert custom code, but that is planned for the future. A drawback is (for now at least) the need for a permanent internet connection. The tutorials coming with Cayenne are good and there is a growing community. I had some minor issues with the stability of the beta version, which were resolved by reinstalling Cayenne.
All in all, Cayenne is great for beginners and early prototyping phases.

Cayenne SignUp: https://cayenne.mydevices.com/cayenne/signup
Remote access with SSH: http://www.knight-of-pi.org/remote-control-your-raspberry-pi/
Cayenne Login: https://cayenne.mydevices.com/cayenne/login

Knight of Pi

Johannes Bergs aka Knight of Pi. Diploma in Bioinformatics, some Webdesign and Python coding then. Living in the beautiful city of Vienna.


Time limit is exhausted. Please reload CAPTCHA.