Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (14 sloc) 446 Bytes
#!/bin/bash
cat /sys/bus/iio/devices/iio\:device0/in_humidityrelative_input
sleep 1
cat /sys/bus/iio/devices/iio\:device0/in_humidityrelative_input
sleep 1
cat /sys/bus/iio/devices/iio\:device0/in_humidityrelative_input
sleep 1
value=`cat /sys/bus/iio/devices/iio\:device0/in_humidityrelative_input | sed -r "s/000$/ /g"`
if [ $value -gt 0 ];
then
zabbix_sender -z 192.168.11.6 -s "RaspberryPizeroW" -k humidity -o $value
else
echo "failed"
fi
You can’t perform that action at this time.