From: Dobrica Pavlinusic Date: Wed, 1 Mar 2017 13:50:17 +0000 (+0100) Subject: add temperature to log file X-Git-Url: http://git.rot13.org/?p=vaillant-thermostat;a=commitdiff_plain;h=45fe14575b45a81c136a684ae539e4ad15a60746 add temperature to log file --- diff --git a/serial.pl b/serial.pl index dd409e5..4f60390 100755 --- a/serial.pl +++ b/serial.pl @@ -41,8 +41,12 @@ while (1) { $chr++; $ascii =cut + + my $temp = `curl localhost:3000/temp.txt`; + $temp =~ s/\s+/ /gs; + #printf "%s %2d %s\n", time(), $len, $hex; - printf "%8.4f %6.2f %2d %s\n", $ts, $ts - $t, $len, $hex; + printf "%8.4f %6.2f %2d %s | %s\n", $ts, $ts - $t, $len, $hex, $temp; $t = time(); } }