projects
/
vaillant-thermostat
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
graph temperature and humidify using gnuplot on kindle framebuffer
[vaillant-thermostat]
/
parse.pl
1
#!/usr/bin/perl
2
use warnings;
3
use strict;
4
5
while(<>) {
6
chomp;
7
if ( m/^([0-9\.]+) .+aa fc 39 aa (.+) \|\s+(\d+\.\d+)/ ) {
8
#warn "# $1 $2\n";
9
my $temp = $3;
10
my @l = split(/\s+/,$2);
11
my @d = (
12
$1,
13
hex( $l[0] . $l[1] ),
14
hex( $l[3] . $l[4] ),
15
hex( $l[6] ),
16
hex( $l[12] ),
17
hex( $l[14] ) * 300,
18
hex( $l[15] ) * 400,
19
hex( $l[18] ),
20
$temp
21
);
22
print join(',', @d),$/;
23
} else {
24
warn "# $_\n";
25
}
26
}