my $temp = `curl localhost:3000/temp.txt`;
$temp =~ s/\s+/ /gs;
+ $temp =~ s/^\s+//;
#printf "%s %2d %s\n", time(), $len, $hex;
printf "%8.4f %6.2f %2d %s | %s\n", $ts, $ts - $t, $len, $hex, $temp;
_mqtt_pub "stat/boiler/" . chr(ord('a') + $_) => $d[$_] foreach 0 .. $#d;
}
+ my @v = split(/\s+/, $temp, 3);
+ my @n = qw( DS18B20/temperature DHT22/temperature DHT22/humidity );
+ foreach (@v) {
+ _mqtt_pub "stat/boiler/" . shift(@n) => $_;
+ }
+
}
}