mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-13 11:16:36 +00:00
00_KNXIO.pm: a few fixes, (Forum #127792)
git-svn-id: https://svn.fhem.de/fhem/trunk@29085 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a93311d507
commit
34a6e6afd4
@ -81,6 +81,7 @@
|
|||||||
# add a few debug msgs
|
# add a few debug msgs
|
||||||
# 25/04/2024 changed _open for mode S
|
# 25/04/2024 changed _open for mode S
|
||||||
# replaced/removed experimental given/when
|
# replaced/removed experimental given/when
|
||||||
|
# 19/08/2024 fix error-msg when mode S fails to open
|
||||||
|
|
||||||
|
|
||||||
package KNXIO; ## no critic 'package'
|
package KNXIO; ## no critic 'package'
|
||||||
@ -132,7 +133,6 @@ BEGIN {
|
|||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# global vars/constants
|
# global vars/constants
|
||||||
my $MODELERR = 'MODEL_NOT_DEFINED';
|
|
||||||
my $PAT_IP = '[\d]{1,3}(\.[\d]{1,3}){3}';
|
my $PAT_IP = '[\d]{1,3}(\.[\d]{1,3}){3}';
|
||||||
my $PAT_PORT = '[\d]{4,5}';
|
my $PAT_PORT = '[\d]{4,5}';
|
||||||
my $KNXID = 'C';
|
my $KNXID = 'C';
|
||||||
@ -847,7 +847,7 @@ sub KNXIO_openDev {
|
|||||||
$ret = ::TcpServer_MCastAdd($hash,$host);
|
$ret = ::TcpServer_MCastAdd($hash,$host);
|
||||||
if (defined($ret)) { # error
|
if (defined($ret)) { # error
|
||||||
KNXIO_Log ($name, 2, qq{MC add failed: $ret});
|
KNXIO_Log ($name, 2, qq{MC add failed: $ret});
|
||||||
return qq{KNXIO_openDev ($name): MC add failed: $ret};
|
return qq{KNXIO_openDev ($name): MC add failed: $ret};
|
||||||
}
|
}
|
||||||
|
|
||||||
::TcpServer_SetLoopbackMode($hash,0); # disable loopback
|
::TcpServer_SetLoopbackMode($hash,0); # disable loopback
|
||||||
@ -860,11 +860,11 @@ sub KNXIO_openDev {
|
|||||||
if ($mode eq q{S}) { ### socket mode
|
if ($mode eq q{S}) { ### socket mode
|
||||||
if (!(-S -r -w $spath) ) {
|
if (!(-S -r -w $spath) ) {
|
||||||
KNXIO_Log ($name, 2, q{Socket not available - (knxd running?)});
|
KNXIO_Log ($name, 2, q{Socket not available - (knxd running?)});
|
||||||
KNXIO_disconnect($hash, 30);
|
$ret = qq{KNXIO_openDev ($name): Socket not available - (knxd running?)};
|
||||||
readingsSingleUpdate($hash, 'state', 'disconnected', 1);
|
}
|
||||||
return qq{KNXIO_openDev ($name): Socket not available - (knxd running?)};
|
else {
|
||||||
|
$ret = ::DevIo_OpenDev($hash,$reopen,\&KNXIO_init); # no callback
|
||||||
}
|
}
|
||||||
$ret = ::DevIo_OpenDev($hash,$reopen,\&KNXIO_init); # no callback
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode eq q{H}) { ### host udp
|
if ($mode eq q{H}) { ### host udp
|
||||||
@ -1056,8 +1056,8 @@ sub KNXIO_processFIFO {
|
|||||||
my $queentriesOld = $queentries;
|
my $queentriesOld = $queentries;
|
||||||
@que = KNXIO_deldupes(@que);
|
@que = KNXIO_deldupes(@que);
|
||||||
$queentries = scalar(@que);
|
$queentries = scalar(@que);
|
||||||
KNXIO_Log ($name, 5, q{deleted } . ($queentriesOld - $queentries) .
|
my $qdiff = $queentriesOld - $queentries;
|
||||||
qq{ duplicate msgs from queue, $queentries remain});
|
KNXIO_Log ($name, 3, qq{deleted $qdiff duplicate msgs from queue, $queentries remain}) if ($qdiff > 0);;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($queentries > 0) { # process timer is not running & fifo not empty
|
if ($queentries > 0) { # process timer is not running & fifo not empty
|
||||||
@ -1456,6 +1456,7 @@ __END__
|
|||||||
If you have a KNX-router that supports multicast, you do not need a KNXD installation.
|
If you have a KNX-router that supports multicast, you do not need a KNXD installation.
|
||||||
Default address:port is 224.0.23.12:3671<br/>
|
Default address:port is 224.0.23.12:3671<br/>
|
||||||
Pls. ensure that you have only <b>one</b> GW/KNXD in your LAN that feed the multicast tree!<br/>
|
Pls. ensure that you have only <b>one</b> GW/KNXD in your LAN that feed the multicast tree!<br/>
|
||||||
|
If you run FHEM in Docker, note that multicast is not supported in network-mode bridge, but macvlan supports multicast.
|
||||||
</li>
|
</li>
|
||||||
<li><b>T</b> TCP mode - uses a TCP-connection to KNXD (default port: 6720).<br/>
|
<li><b>T</b> TCP mode - uses a TCP-connection to KNXD (default port: 6720).<br/>
|
||||||
This mode is the successor of the TUL-modul, but does not support direct Serial/USB connection to a TPUart-USB Stick.
|
This mode is the successor of the TUL-modul, but does not support direct Serial/USB connection to a TPUart-USB Stick.
|
||||||
@ -1479,7 +1480,8 @@ __END__
|
|||||||
<b>phy-address</b>
|
<b>phy-address</b>
|
||||||
<ul>
|
<ul>
|
||||||
<li>The physical address is used as the source address of messages sent to KNX network.
|
<li>The physical address is used as the source address of messages sent to KNX network.
|
||||||
This address should be one of the defined client pool-addresses of KNXD or Router.</li>
|
Valid range: <0-15.0-15.0-255>. 15.15.255 should not be used, is used as mfg-default for "non-configured".
|
||||||
|
This address should be one of the defined client pool-addresses of KNXD (-E parameter) or Router.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<br/>All parameters are mandatory. Pls. ensure that you only have <b>one path</b> between your KNX-Installation and FHEM!
|
<br/>All parameters are mandatory. Pls. ensure that you only have <b>one path</b> between your KNX-Installation and FHEM!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user