We ran a very successful Liota and Wavefront lab at VMworld US hooking up LIOTA IOT framework to Wavefront at the {Code} labs. This allowed you to build an IOT device and stream data to a cloud-based metrics and analytics system, Wavefront.
Below are the instructions for the lab.
MAKERSPACE VMworld #CODE5633E User Instructions
|
Get your gear on Amazon!
Raspberry Pi 3 B+:
- https://www.amazon.com/ELEMENT-Element14-Raspberry-Pi-Motherboard/dp/B07BDR5PDW/ref=sr_1_3?s=electronics&ie=UTF8&qid=1535390523&sr=1-3&keywords=raspberry+pi+b%2B
BMP280 Sensor:
- https://www.amazon.com/Barometric-Pressure-Sensor-BMP280-temperature/dp/B01NAK6BL2/ref=asc_df_B01NAK6BL2/?tag=hyprod-20&linkCode=df0&hvadid=198075247191&hvpos=1o1&hvnetw=g&hvrand=7493594651512419688&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9031971&hvtargid=pla-320025494081&psc=1
Jumper Wires
- https://www.amazon.com/SUNKEE-100pcs-female-jumper-Dupont/dp/B00AYCON8Y/ref=sr_1_2?s=hi&ie=UTF8&qid=1535390818&sr=8-2&keywords=sunkee+jumper+wires
NOOBS SD Card
- https://www.amazon.com/Raspberry-8GB-Preloaded-NOOBS-Card/dp/B00GFA48N4
BMP280 Circuit Connection
VCC: PIN 4 (5V)
GND: PIN 6
SCK: PIN5 (SCL1)
SDI: PIN 3(SDA1)
Power up and connect Raspberry PI
Connect power to your Raspberry PI using the USB Cable provided via your laptop.
Connect using putty (ssh port 22)
Find IP address on the label next to your PI
User ID: pi, Password: makerspace
Install Pulse Agent and Liota
This step copies the necessary files and starts installation process.
1 2 3 4 5 |
Type: <sudo su – root> to give root privileges on the Raspberry Pi Type: <cd /home/pi/makerspace> Type: ./install.sh |
When prompted for “Enter your Edge System Name Without Spaces”, type your name and hit enter, so your edge system can be uniquely identified
When Prompted for Passphrase, type <makerspace> and hit enter
You will see the following message, indicating successful installation
Fri Aug 17 08:48:11 PDT 2018 : Installation successful
Fri Aug 17 08:48:11 PDT 2018 : Run /opt/ice-client/iotcc to register the Edge System
Start Pulse Agent, Liota and Onboard Gateway to Pulse
This step completes the installation and starts Pulse agent, Liota and onboards the gateway with Pulse.
1 |
Type: cd /opt/ice-client and press enter. |
1 |
Type: ./iotcc --start-liota-as-root and press enter |
1 |
When prompted for userID: type <iottech> and press enter |
1 |
When prompted for password, type <Password1!> and press enter. |
Note P is upper case. At this point, you will see a message indicating that Pulse and Liota have started The Raspberry PI is now onboarded to Pulse
Load and Run Liota Script to Collect Metrics
This step copies the Liota User Package to the Liota Folder, registers the Package with Liota daemon to gather the metrics. wavefront_device.py is the UDM (user defined method) that collects the metrics.
1 2 3 4 5 6 7 8 9 |
cd /home/pi/makerspace cp solution/start_solution.py /usr/lib/liota/packages cp wave.sh /usr/lib/liota/packages/ cd /usr/lib/liota/packages ./wave.sh |
Now you have copied the metrics collector package to the liota folder and loaded it into liota using the wave.sh script
1 2 3 |
cd /var/log/liota tail –f liota.log to see if the metrics from BMP280 are being collected |
The Metrics are now sent to Wavefront
Liota and Wavefront: Getting Wavefront Running
To get the full experience for the Liota and Wavefront, you first need to get an account on the lab instance. See the VMware {Code} staff at the show, and they’ll give you one. (Want to try it on your own? Take a Wavefront Trial here: https://wavefront.com/sign-up/ )
Next, you will receive an email inviting you to login and set your password.
Then you can login, and look around. I recommend you star by making a chart. To do this:
- Go to Dashboards->Create Chart when you login.
- You will see a field with a lightning bolt and a gear. Put in the name of your metric.
- It will be something like makerspace.liota.<iottech>.BMP280.Temperature if you are using the BMP280 mentioned above.
- If you click on the gear icon, it will show you what the query looks like in our powerful query language.
- Try selecting a section of the graph to see how you can zoom in. Click “Reset” to pop out.
- Click on “Live Data” in the upper left to watch data change as it comes in from Liota.
You can also read more about how this lab uses Wavefront here
Liota References:
https://github.com/vmware/liota/wiki/Liota-Developer-Guide
https://github.com/vmware/liota/tree/master/packages/user_packages