From b52731cdcf907f2d0fba677a632acca02a0487fe Mon Sep 17 00:00:00 2001 From: risiko79 <> Date: Sun, 20 Mar 2016 19:03:05 +0000 Subject: [PATCH] 10_pilight_ctrl: send long raw codes add delimiter to data stream to signal end of stream if length of data > 1024 git-svn-id: https://svn.fhem.de/fhem/trunk@11104 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/10_pilight_ctrl.pm | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 15bc114ea..adc85b33f 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - fixed: 10_pilight_ctrl send long raw codes - fixed: 98_weekprofile fix mutated vowels - feature: 50_TelegramBot new option to retry for send & confirmation dialog for favorites diff --git a/fhem/FHEM/10_pilight_ctrl.pm b/fhem/FHEM/10_pilight_ctrl.pm index 0e4f3c920..a83c56611 100644 --- a/fhem/FHEM/10_pilight_ctrl.pm +++ b/fhem/FHEM/10_pilight_ctrl.pm @@ -38,6 +38,7 @@ # V 1.11 2015-09-06 - FIX: pressure, windavg, winddir, windgust from weather stations without temperature # V 1.12 2015-09-11 - FIX: handling ContactAsSwitch befor white list check # V 1.13 2015-11-10 - FIX: POSIX isdigit is deprecated replaced by own isDigit +# V 1.14 2016-03-20 - FIX: send delimiter to signal end of stream if length of data > 1024 ############################################## package main; @@ -498,11 +499,12 @@ sub pilight_ctrl_Send($) if ( $ret != 1 ) { Log3 $me, 2, "$me(Send): ERROR. Connection rejected from pilight-daemon"; $socket->close(); - return return "$me|0"; + return "$me|0"; } } - Log3 $me, 5, "$me(Send): $data"; + + $data = $data."\n\n"; # add delimiter to signel end off stream if length > 1024 $socket->send($data); #6.0 we get a response message