Created on 04-19-2019 05:16 AM - edited 08-17-2019 02:28 PM
1. wget http://apache.mirrors.hoobly.com/nifi/minifi/0.5.0/minifi-0.5.0-bin.tar.gz 2. tar -xzvf minifi-0.5.0-bin.tar.gz
wget http://apache.claz.org/nifi/minifi/0.5.0/minifi-toolkit-0.5.0-bin.tar.gz
./bin/config.sh transform /path/to/template.xml /output/path/config.yml
# cat /home/pi/get_environment.sh (my bash script which runs python script on raspberry)
#Wrapper script#
out=`python /home/pi/get_environment.py`
echo $out|tr ' ' ','
# cat /home/pi/get_environment.py
from sense_hat import SenseHat
import datetime
sense = SenseHat()
sense.clear()
hostname = "real_rasp"
date = datetime.datetime.now()
year=date.year
month=date.month
day=date.day
hour=date.hour
min=date.minute
sec=date.second
long=77.1025
lat=28.7041
pressure = '%.2f' % sense.get_pressure()
temp = '%.2f' % sense.get_temperature()
print hostname,lat,long,year,month,day,hour,min,sec,temp,pressure
Sample yaml file attached.
Links to series