Set the commands on your linux
Set environment variable

For the different scripts to work you will need to set up the global environment variable CIRCUSTOKEN which will let the server recognize you as a valid user.
Place it at the end of your /etc/bash.bashrc file, like this:

CIRCUSTOKEN=your_token_here

To find your token, log in, go to up-rigth corner photo and select account.

Get the commands

Follow the next steps to get get the circus commands described above available in your Raspberry.

* Make a temporary file and get in it

sudo mkdir ~/temp
cd ~/temp

* Get the debian package with all you need from our site

sudo wget https://circusofthings.com/deb/raspi/CircusRaspiLib.deb

* Unpack it and let it be installed

sudo dpkg -i CircusRaspiLib.deb

* Give permissions to the new files to be executable by your user

sudo chmod 755 /usr/local/bin/circus*



Available commands for Circus

Once you end with the steps above, these are the available commands in linux:

circusreadvalue [ options ] [ -k SIGNALKEY ]

Options:
-v: verbose
Will read the value of the signal defined by SIGNALKEY and put in stdout


circuswritevalue [ options ] [ -k SIGNALKEY ] [ -n NUMERICVALUE ]

Options:
-v: verbose
Will set the given NUMERICVALUE as the value of the signal defined by SIGNALKEY


circussignaltopin [ options ] [ -k SIGNALKEY ] [ -p GPIONUMBER ]

Options:
-v: verbose
-h: help
-F: force port direction if not correctly set
-r: maximum number of retries for the case in which server value can't be reached
Recursively will set the value read from the input GPIO defined by GPIONUMBER as the value of the signal defined by SIGNALKEY.


circuspintosignal [ options ] [ -k SIGNALKEY ] [ -p GPIONUMBER ]

Options:
-v: verbose
-h: help
-F: force port direction if not correctly set
-r: maximum number of retries for the case in which server value can't be reached
Recursively will set the value of the signal defined by SIGNALKEY ras the outputvalue at the GPIO defined by GPIONUMBER Will refuse to put values different form '1' or '0' on the digital output.



Raspbian libraries for Circus.
NameDescriptionHardwareLibrary File
CircusRaspiLib.deb Implements ReadValue and WriteValue for Linux systems on command line. Raspberry with Raspbian CircusRaspiLib.deb