mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
44_TEK603: ser2net support
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@19936 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
be24006048
commit
52be75b0c2
1
CHANGED
1
CHANGED
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# 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,
|
- feature: 73_AutoShuttersControl: add new Dev TYPE in %posSetCmds,
|
||||||
remove old commandref text
|
remove old commandref text
|
||||||
- bugfix: 73_AutoShuttersControl: fix bug in getShuttersPosCmdValueNegate
|
- bugfix: 73_AutoShuttersControl: fix bug in getShuttersPosCmdValueNegate
|
||||||
|
@ -65,7 +65,7 @@ sub TEK603_define($$) {
|
|||||||
my $msg = '';
|
my $msg = '';
|
||||||
|
|
||||||
if( @a != 3) {
|
if( @a != 3) {
|
||||||
$msg = 'wrong syntax: define <name> TEK603 {none | devicename}';
|
$msg = 'wrong syntax: define <name> TEK603 {none | devicename | hostname:port}';
|
||||||
Log3 $name, 3, $msg;
|
Log3 $name, 3, $msg;
|
||||||
return $msg;
|
return $msg;
|
||||||
}
|
}
|
||||||
@ -92,21 +92,25 @@ sub TEK603_doInit($) {
|
|||||||
my $dev = $hash->{DeviceName};
|
my $dev = $hash->{DeviceName};
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
# Parameter 115200, 8, 1, even, none
|
# Wenn / enthalten ist ist es kein ser2net-Device, daher initialisieren
|
||||||
$po->reset_error();
|
if ($dev =~ m/\//)
|
||||||
$po->baudrate(115200);
|
{
|
||||||
$po->databits(8);
|
# Parameter 115200, 8, 1, even, none
|
||||||
$po->stopbits(1);
|
$po->reset_error();
|
||||||
$po->parity('none');
|
$po->baudrate(115200);
|
||||||
$po->handshake('none');
|
$po->databits(8);
|
||||||
$po->dtr_active(1);
|
$po->stopbits(1);
|
||||||
$po->rts_active(1);
|
$po->parity('none');
|
||||||
|
$po->handshake('none');
|
||||||
|
$po->dtr_active(1);
|
||||||
|
$po->rts_active(1);
|
||||||
|
|
||||||
if (!$po->write_settings) {
|
if (!$po->write_settings) {
|
||||||
undef $po;
|
undef $po;
|
||||||
$hash->{STATE} = $name . 'Error on write serial line settings on device ' . $dev;
|
$hash->{STATE} = $name . 'Error on write serial line settings on device ' . $dev;
|
||||||
Log3 $name, 3, $hash->{STATE};
|
Log3 $name, 3, $hash->{STATE};
|
||||||
return $hash->{STATE} . "\n";
|
return $hash->{STATE} . "\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Log3 $name, 3, "connected to device $dev";
|
Log3 $name, 3, "connected to device $dev";
|
||||||
@ -243,6 +247,17 @@ sub TEK603_reconnect($) {
|
|||||||
<ul>
|
<ul>
|
||||||
<code>define OelTank TEK603 /dev/ttyUSB0</code><br />
|
<code>define OelTank TEK603 /dev/ttyUSB0</code><br />
|
||||||
</ul>
|
</ul>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<code>define <name> TEK603 hostnameorip:port</code><br />
|
||||||
|
<br />
|
||||||
|
|
||||||
|
Defines an TEK603 Eco Monitor device via ethernet on a remote host running ser2net.<br /><br />
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
<ul>
|
||||||
|
<code>define OelTank TEK603 somehost:23000</code><br />
|
||||||
|
</ul>
|
||||||
</ul><br />
|
</ul><br />
|
||||||
|
|
||||||
<a name="TEK603_Readings"></a>
|
<a name="TEK603_Readings"></a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user