Cayenne: Install the librairie on an Orange Pi under Armbian Jessie

cayenne orange pi lite dashboard
Table of Contents

In this new tutorial on the Cayenne platform for connected objects IoT, we will install the necessary resources on an Orange Pi Lite (Wi-Fi version). Cayenne is still in the development phase. For now there is only Raspberry Pi that is supported, and still the official Raspbian distribution. Armbian (which I systematically use on all my Orange Pi models) is based on Debian Jessie just like Raspbian. So there should be no problem 馃檪

How to verify that the Armbian distribution is compatible with Cayenne?

First, let’s see if the Armbian distribution is compatible. If you use the desktop version, there is a good chance that it does not work. The node of the problem in the current installation script resides in the size of the temporary folder (/tmp). This must at least be at least 200MB. I have not gone further in my investigations yet. There are few other limitations (packages absent …).

For the Armbian distribution used, run the cat /etc /*- release聽 command. Here we have Armbian based on Debian Jessie

root@orangepilite:~# cat /etc/*-release
BOARD_NAME="Orange Pi Lite"
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION="8 (jessie)"

There is no indication on Linux Kernel. For this tutorial, I installed Cayenne on version 4.10.0 To retrieve the version of the Kernel, run the command uname -a聽.

root@orangepilite:~# uname -a
Linux orangepilite 4.10.0-sun8i #4 SMP Mon Feb 13 02:46:43 CET 2017 armv7l GNU/Linux

If you have found how to install Cayenne on the Desktop version of Armbian, feel free to share in the comments or contact me via the contact form.

Add Orange Pi from the Cayenne mobile app

Start the Cayenne application on your iPhone or Android smartphone. It is available from the App Store or the Play Store. Click on the + in the upper right corner of the screen. Choose Raspberry Pi

cayenne add device

Then Continue at the bottom of the screen

cayenne continue

Cayenne is able to find a single Raspberry Pi on your local network. For Orange Pi, we will have to help him a little. Click Advanced Discovery Settings.

cayenne add device scanner advanced discovery settings

Enter the IP address of the Orange Pi on the screen that appears. Do not look for the dot (.), Cayenne uses the comma as the separator.

cayenne add orangepi manual pi

Click Use IP to start the search. A nice animation starts to make us wait.

 cayenne add orange pi scanner reseau network

If Cayenne found the Orange, a form is displayed. Enter your SSH credentials. User, password, and SSH port. By default, it is the 22. Done to finish the entry. Then there’s a little trap. You must check the device by clicking on the line. A small blue check mark appears on the left. You can install Cayenne on several Orange or Raspberry Pi at the same time (you’re in luck!). Start the installation of the libraries by pressing Setup selected devices.

 cayenne add orangepi identifiant ssh

It’s gone for a while (depending on the hardware and your internet connection).

cayenne add orangepi installation librairies

What happens during the installation phase?

The Cayenne application opens a secure SSH connection from the mobile application and launches a script that will install the necessary resources on Armbian. It is quite easy to follow what is happening during this phase. Connect to SSH for example. Move to the root directory (~) and list the files (ls).

root@orangepilite:~# ls
cayenne.err  cayenne.out

There are 3 files:

  • Cayenne.err: this is the Cayenne error log
  • Cayenne.out: this is the installation log
  • This is the installation script that the mobile application launched

Let’s look more closely at what it consists of

# myDevices setup script
set -e
HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo $NAME
if [ -d "/etc/myDevices" ]; then
   echo "dir exists"
   if ! grep -q InviteCode /etc/myDevices/AppSettings.ini ; then
       echo "Invite code does not exist but directory does so we will add invite code"
       sed -e "/Agent/ a InviteCode = $inviteCode" </etc/myDevices/AppSettings.ini>/etc/myDevices/NewAppSettings.ini && mv /etc/myDevices/NewAppSettings.ini /etc/myDevices/A$
       sed "s/Initialized = .*/Initialized = false/g" </etc/myDevices/AppSettings.ini>/etc/myDevices/NewAppSettings.ini && mv /etc/myDevices/NewAppSettings.ini /etc/myDevice$
       sed '/Id = /d' </etc/myDevices/AppSettings.ini>/etc/myDevices/NewAppSettings.ini && mv /etc/myDevices/NewAppSettings.ini /etc/myDevices/AppSettings.ini
       sudo service myDevices stop
       sudo service myDevices start
echo "continuing as new install..."
wget -O $HOME/$PREFIX.tar.gz ""
tar -xzvf $HOME/$PREFIX.tar.gz
chmod +x $HOME/$PREFIX/
bash -x $HOME/$PREFIX/ -code "$inviteCode" "$@"

Cayenne will be installed in the / etc / myDevices folder. The code is downloaded from the Cayenne server. Once recovered, the project is decompressed and the script nano executed.

What can you do with Cayenne on Orange Pi?

Once installed, let’s see what it is possible to do with Cayenne on a Orange Pi. Let’s say it directly, all Orange PI devices are currently still unusable:

  • GPIO
  • I2C
  • Camera
  • 1-Wire
  • SPI

All the work has been done for the Raspberry Pi which remains the undisputed leader of the field. But then what is left?

The Dashboard gathers useful information on the health of Orange Pi:

  • CPU load
  • Using RAM
  • Storage level (gauge does not work)
  • CPU temperature
  • Number of processes
  • Network speed (does not work)

In addition, the shutdown and restart functions work. I have not yet tested the remote desktop fault installed on my Armbian. Cayennne using TightVNC (explained in this tutorial), this should work.

cayenne orange pi dashboard

The CPU load in detail.

cayenne cpu orangepi


cayenne orange pi ram

The usage level gauge of the SD board does not work but the information is collected correctly on the detail page.

cayenne orange pi storage

Finally, temperature monitoring. The curve of Beziers deserves a small adjustment.

cayenne cpu temperature

Calendar (Schedule)

Cayenne integrates the trigger action on a calendar. An action can be punctual or repeated. Without the possibility of adding actuators or sensors, the calendar has a very limited interest on Orange Pi. You can program the shutdown every night for example. We could also do it with a cron directly on the Orange!

cayenne add event shutdown orangepi

Event trigger (Triggers)

Finally, last tool proposed by Cayenne, the trigger of event (trigger). To create a trigger, click the most ur in the upper-right corner of the screen.

13 cayenne orangepi triggers

Cayenne works on the IF … THEN principle (if this happens … then do that). The list of triggers is still very short: online / offline, storage level, CPU load, memory level. For example, we will trigger the sending of an alert email if the Orange Pi is offline (loss of connection off). It is interesting if the OPI is used for a home automation server (Jeedom, Domoticz …).

 cayenne orangepi create trigger if storage cpu memory online offline

Check the device concerned by the monitoring and then specify the destination email and a mini message.

cayenne orangepi setup notification

The shutter release button is ready. You can enable or disable it at any time.

cayenne orangepi liste triggers

And here is the email received when the Orange Pi stops or is offline (attention, maybe the Internet connection is cut).

cayenne email notification orangepi off line hors ligne


It is therefore also easy to install Cayenne on the Orange Pi running under the Armbian Jessie (server) distribution as on Raspbian but apart from remotely monitoring and restarting the Orange Pi, it is not possible to enjoy the GPIO, Of the camera … which makes the whole interest of the Raspberry Pi. One must be patient, maybe things will move if the Orange Pi community grows enough. To be continued …

Click to rate this post!
[Total: 1 Average: 5]

Thanks聽for your reading

Did you like this project ? Don't miss any more projects by subscribing to our weekly newsletter!

Are you having a problem with this topic?

Maybe someone has already found the solution, visit the forum before asking your question
  1. i have one problem with the sensor of CPU Temp, his not work ok, show 0,03 and he stay on 40, have any idea about solve my problem?

    • Hello Virgilio. You are right. As I said in the article, Cayenne does not yet officially support Orange PI. Unable to monitor many Orange settings. To monitor the cpu load and the temperature, we would have to modify the monitoring script ourselves, but each update will have to be redone. The best is to develop a new python script that handles this work in addition to the rest. Do not hesitate to share with us your project, there are few examples on the internet and I am sure that many people would be interested. Christophe

  2. Reply
    OrangePiWeb JaviPSantos 12 July 2017 at 7 h 10 min

    Good jog. But this does not work on Orange Pi +2e. Thank you anyway

Leave a Reply

Read more
DIY Projects
DIY Projects
%d bloggers like this: