IoT Open Basic
Basic course for IoT Open developers and integrators.
Chapter 8
“It would be really nice with some cozy relevant quote here!”
― IoT Open Developer
Lynx-bash-scripts
The lynx-bash-scripts are a collection of simple scripts that was created over time when working with the platform. They are a very easy way to quickly explore the API of IoT Open.
Get the scripts
There is a link to the scripts on this page under the Resources -> Software section. If you use the IoT Open Virtual Appliance you can type bash setup-lynx-scripts.sh in the home directory of the iot user.
Installing
See above about how to get the scripts. Once they are installed, you need to create a .config file in the same directory as the scripts. It should look like this.
USERNAME=<email address>
PASS=<password>
BROKER=lynx.iotopen.se
BASE=https://lynx.iotopen.se
TOKEN=`cat .token`
Getting started
Log in to the backend.
iot@iot-open:~/lynx-bash-scripts$ ./login.sh
Logging in
Login successful
After that, you can try all the scripts out. E.g. get a list of your installations.
./get_installations.sh
Try the other ones out as well. Since they are simple bash-scripts you can always look at them and see what they do.
Example. Get the functions of an installation with ./get_functions.sh <installation_id>. You can list all the scripts with ls.
Exercise
Try some of the scripts out.