6 my $influx = $ENV{INFLUX}; # || 'http://127.0.0.1:8086/write?db=boiler';
12 if ( s/\s+\|\s+(\d+\.\d\d).+$// ) {
15 #$temp = ( $temp - 20 ) * 500 + 500;
16 if ( m/^([0-9\.]+) .+aa fc 39 aa (.+)/ ) {
19 my @l = split(/\s+/,$2);
26 hex( $l[14] ), # * 300,
27 hex( $l[15] ), # * 400,
32 open($curl, '|-', qq( tee /dev/shm/parse.curl | curl -XPOST $influx --data-binary \@- )) unless $curl;
33 print $curl "thermostat ",join(',', map { chr( ord('a') + $_ ) . '=' . $d[$_] . 'i' } 1 .. $#d ), ($temp ? ",temp=$temp" : ""), " ", int($t * 1_000_000_000), "\n";
35 print join(',', @d,$temp),$/;