Neubau des Informations Flow und Art der Kommunikation mit der AMADCommBridge.
This commit is contained in:
21
74_AMAD.pm
21
74_AMAD.pm
@ -37,8 +37,8 @@ use TcpServerUtils;
|
|||||||
use Encode qw(encode);
|
use Encode qw(encode);
|
||||||
|
|
||||||
|
|
||||||
my $modulversion = "2.3.5";
|
my $modulversion = "2.3.7";
|
||||||
my $flowsetversion = "2.3.5";
|
my $flowsetversion = "2.3.15";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -283,7 +283,7 @@ sub AMAD_statusRequest($) {
|
|||||||
HttpUtils_NonblockingGet(
|
HttpUtils_NonblockingGet(
|
||||||
{
|
{
|
||||||
url => $url,
|
url => $url,
|
||||||
timeout => 30,
|
timeout => 5,
|
||||||
hash => $hash,
|
hash => $hash,
|
||||||
method => "GET",
|
method => "GET",
|
||||||
header => "fhemip: $fhemip\r\nfhemdevice: $name\r\nactivetask: $activetask\r\napssid: $apssid\r\nbport: $bport",
|
header => "fhemip: $fhemip\r\nfhemdevice: $name\r\nactivetask: $activetask\r\napssid: $apssid\r\nbport: $bport",
|
||||||
@ -901,7 +901,7 @@ sub AMAD_HTTP_POST($$) {
|
|||||||
HttpUtils_NonblockingGet(
|
HttpUtils_NonblockingGet(
|
||||||
{
|
{
|
||||||
url => $url,
|
url => $url,
|
||||||
timeout => 60,
|
timeout => 15,
|
||||||
hash => $hash,
|
hash => $hash,
|
||||||
method => "POST",
|
method => "POST",
|
||||||
doTrigger => 1,
|
doTrigger => 1,
|
||||||
@ -1092,17 +1092,18 @@ sub AMAD_CommBridge_Read($) {
|
|||||||
my $bname = $bhash->{NAME};
|
my $bname = $bhash->{NAME};
|
||||||
|
|
||||||
|
|
||||||
## Zum testen mal ausgeschalten
|
|
||||||
# if( $hash->{SERVERSOCKET} ) { # Accept and create a child
|
if( $hash->{SERVERSOCKET} ) { # Accept and create a child
|
||||||
# TcpServer_Accept( $hash, "AMAD" );
|
TcpServer_Accept( $hash, "AMAD" );
|
||||||
|
return;
|
||||||
# return;
|
}
|
||||||
# }
|
|
||||||
|
|
||||||
# Read 1024 byte of data
|
# Read 1024 byte of data
|
||||||
my $buf;
|
my $buf;
|
||||||
my $ret = sysread($hash->{CD}, $buf, 1024);
|
my $ret = sysread($hash->{CD}, $buf, 1024);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# When there is an error in connection return
|
# When there is an error in connection return
|
||||||
if( !defined($ret ) || $ret <= 0 ) {
|
if( !defined($ret ) || $ret <= 0 ) {
|
||||||
CommandDelete( undef, $hash->{NAME} );
|
CommandDelete( undef, $hash->{NAME} );
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user