aboutsummaryrefslogtreecommitdiffstats
path: root/elv-weather
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2017-10-24 07:11:43 +0200
committerGerd Hoffmann <kraxel@redhat.com>2017-10-24 07:11:43 +0200
commit6a6aa08e96bb4c9b0ba97d35721555949cf0f1f3 (patch)
treec2bec14283678af2bb4d31ffb346ae6c33c12229 /elv-weather
parent76bb31e4458d2ddcd8082c0aa5ebc85b72ac0932 (diff)
downloadhue-6a6aa08e96bb4c9b0ba97d35721555949cf0f1f3.tar.gz
debug
Diffstat (limited to 'elv-weather')
-rwxr-xr-xelv-weather5
1 files changed, 4 insertions, 1 deletions
diff --git a/elv-weather b/elv-weather
index c765b0f..bb2f515 100755
--- a/elv-weather
+++ b/elv-weather
@@ -1,9 +1,10 @@
#!/usr/bin/perl
use warnings;
use strict;
+use English;
+use POSIX;
use Device::SerialPort;
use Net::MQTT::Simple;
-use POSIX;
# config
my $delay = 1;
@@ -94,6 +95,7 @@ die "reset failed (#2)" unless $line =~ m/ELV USB-WDE1/;
print "init ok, waiting for data ...\n" if $verbose;
# polling loop
+$OUTPUT_AUTOFLUSH = 1;
while (1) {
# read data
@@ -110,6 +112,7 @@ while (1) {
printf "data error (%d != %d), fixup failed\n", scalar(@data), scalar(@paths);
next;
}
+ print strftime("* %H:%M *\n", localtime()) if $verbose;
$updates = 0;
for my $i (0 .. (scalar(@paths) - 1)) {