Hopefully anyone can help me changing the code below for transferring data of my DHT22 to Domoticz, my tempfile consists of the code: "Temp=8.4* Humidity=70.4%" instead of the code "Temp = 24 *C, Hum = 40 %" which works for below script.
I need 8.4 as Temp=# and 70.4 as HUM=#.
I think something need to be edited relating to to AWK command.
TEMP=$(cat $TMPFILE|grep Temp |awk '{print $3}')
if [ $TEMP ]
then
TEMP=$(cat $TMPFILE|grep Temp |awk '{print $3}')
HUM=$(cat $ $TMPFILE |grep Temp |awk '{print $7}')
Thank you very much in advance!
Of course I will post my steps on this forum when I get my DHT22 working under Domoticz!
