diff --git a/CHANGED b/CHANGED index 5f3d01db2..9bb91713a 100644 --- a/CHANGED +++ b/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. + - feature: 44_TEK603: ser2net support - feature: 73_AutoShuttersControl: add new Dev TYPE in %posSetCmds, remove old commandref text - bugfix: 73_AutoShuttersControl: fix bug in getShuttersPosCmdValueNegate diff --git a/FHEM/44_TEK603.pm b/FHEM/44_TEK603.pm index 40a8adbd0..3962d63e3 100644 --- a/FHEM/44_TEK603.pm +++ b/FHEM/44_TEK603.pm @@ -65,7 +65,7 @@ sub TEK603_define($$) { my $msg = ''; if( @a != 3) { - $msg = 'wrong syntax: define TEK603 {none | devicename}'; + $msg = 'wrong syntax: define TEK603 {none | devicename | hostname:port}'; Log3 $name, 3, $msg; return $msg; } @@ -92,21 +92,25 @@ sub TEK603_doInit($) { my $dev = $hash->{DeviceName}; my $name = $hash->{NAME}; - # Parameter 115200, 8, 1, even, none - $po->reset_error(); - $po->baudrate(115200); - $po->databits(8); - $po->stopbits(1); - $po->parity('none'); - $po->handshake('none'); - $po->dtr_active(1); - $po->rts_active(1); + # Wenn / enthalten ist ist es kein ser2net-Device, daher initialisieren + if ($dev =~ m/\//) + { + # Parameter 115200, 8, 1, even, none + $po->reset_error(); + $po->baudrate(115200); + $po->databits(8); + $po->stopbits(1); + $po->parity('none'); + $po->handshake('none'); + $po->dtr_active(1); + $po->rts_active(1); - if (!$po->write_settings) { - undef $po; - $hash->{STATE} = $name . 'Error on write serial line settings on device ' . $dev; - Log3 $name, 3, $hash->{STATE}; - return $hash->{STATE} . "\n"; + if (!$po->write_settings) { + undef $po; + $hash->{STATE} = $name . 'Error on write serial line settings on device ' . $dev; + Log3 $name, 3, $hash->{STATE}; + return $hash->{STATE} . "\n"; + } } Log3 $name, 3, "connected to device $dev"; @@ -243,6 +247,17 @@ sub TEK603_reconnect($) { +
+
+ define <name> TEK603 hostnameorip:port
+
+ + Defines an TEK603 Eco Monitor device via ethernet on a remote host running ser2net.

+ + Examples: +