mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
49_SSCam: fix autocreate bug with https
git-svn-id: https://svn.fhem.de/fhem/trunk@21684 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
621e04a500
commit
51d017bb75
@ -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.
|
||||
- bugfix: 49_SSCam: fix autocreate bug with https
|
||||
- change: 37_echodevice.pm more loginformations set "NPM_login new"
|
||||
- bugfix: 88_HMCCU: corrected var command
|
||||
- bugfix: 73_AutoShuttersControl: fix roommate absent
|
||||
|
@ -54,6 +54,7 @@ eval "use Cache::Cache;1;" or my $SScamMMCacheCache = "Cache::Cache";
|
||||
|
||||
# Versions History intern
|
||||
our %SSCam_vNotesIntern = (
|
||||
"9.2.2" => "14.04.2020 increase read timeout of Redis server cache, fix autocreate bug with https ",
|
||||
"9.2.1" => "24.02.2020 set compatibility to SVS version 8.2.7 ",
|
||||
"9.2.0" => "10.12.2019 attribute \"recChatTxt\" for sending recordings by SSChatBot ",
|
||||
"9.1.0" => "08.12.2019 attribute \"snapChatTxt\" for sending snapshots by SSChatBot ",
|
||||
@ -5888,7 +5889,6 @@ sub SSCam_camop_parse ($) {
|
||||
}
|
||||
} else {
|
||||
for my $kn ($ss..($sgn-1)) {
|
||||
# next if $kn >= $hash->{HELPER}{SNAPLIMIT};
|
||||
$g = SSCam_cache($name, "c_read", "{SNAPOLDHASH}{$sn}{snapid}");
|
||||
SSCam_cache($name, "c_write", "{SNAPHASH}{$kn}{snapid}", $g) if(defined $g);
|
||||
SSCam_cache($name, "c_remove", "{SNAPOLDHASH}{$sn}{snapid}");
|
||||
@ -6963,23 +6963,23 @@ sub SSCam_Autocreate ($$) {
|
||||
|
||||
if(!$camhash) {
|
||||
$camname = "SSCam.".makeDeviceName($sn); # erlaubten Kameranamen für FHEM erzeugen
|
||||
my $arg = $hash->{SERVERADDR}." ".$hash->{SERVERPORT};
|
||||
$cmd = "$camname $type $sn $arg";
|
||||
my $arg = $hash->{SERVERADDR}." ".$hash->{SERVERPORT}." ".$hash->{PROTOCOL};
|
||||
$cmd = "$camname $type $sn $arg";
|
||||
Log3($name, 2, "$name - Autocreate camera: define $cmd");
|
||||
$err = CommandDefine(undef, $cmd);
|
||||
$err = CommandDefine(undef, $cmd);
|
||||
|
||||
if($err) {
|
||||
Log3($name, 1, "ERROR: $err");
|
||||
} else {
|
||||
my $room = AttrVal($name, "room", "SSCam");
|
||||
my $session = AttrVal($name, "session", "DSM");
|
||||
CommandAttr(undef,"$camname room $room");
|
||||
CommandAttr(undef,"$camname session $session");
|
||||
CommandAttr(undef,"$camname icon it_camera");
|
||||
CommandAttr(undef,"$camname devStateIcon .*isable.*:set_off .*nap:li_wht_on");
|
||||
CommandAttr(undef,"$camname pollcaminfoall 210");
|
||||
CommandAttr(undef,"$camname pollnologging 1");
|
||||
CommandAttr(undef,"$camname httptimeout 20");
|
||||
my $room = AttrVal($name, "room", "SSCam");
|
||||
my $session = AttrVal($name, "session", "DSM");
|
||||
CommandAttr (undef,"$camname room $room");
|
||||
CommandAttr (undef,"$camname session $session");
|
||||
CommandAttr (undef,"$camname icon it_camera");
|
||||
CommandAttr (undef,"$camname devStateIcon .*isable.*:set_off .*nap:li_wht_on");
|
||||
CommandAttr (undef,"$camname pollcaminfoall 210");
|
||||
CommandAttr (undef,"$camname pollnologging 1");
|
||||
CommandAttr (undef,"$camname httptimeout 20");
|
||||
|
||||
# Credentials abrufen und setzen
|
||||
my ($success, $username, $password) = SSCam_getcredentials($hash,0,"svs");
|
||||
@ -10149,8 +10149,8 @@ sub SSCam_cache ($$;$$) {
|
||||
return 0;
|
||||
}
|
||||
my $cto = 0.5;
|
||||
my $rto = 0.5;
|
||||
my $wto = 0.5;
|
||||
my $rto = 2.0;
|
||||
my $wto = 1.0;
|
||||
my %Redispars = ( cnx_timeout => $cto,
|
||||
read_timeout => $rto,
|
||||
write_timeout => $wto
|
||||
@ -10176,6 +10176,7 @@ sub SSCam_cache ($$;$$) {
|
||||
$cache = CHI->new( driver => 'Redis',
|
||||
namespace => $fuuid,
|
||||
server => "$server:$port",
|
||||
reconnect => 1,
|
||||
on_set_error => 'warn',
|
||||
on_get_error => 'warn',
|
||||
redis_options => \%Redispars,
|
||||
@ -10277,9 +10278,13 @@ sub SSCam_cache ($$;$$) {
|
||||
# aus Cache lesen
|
||||
if($op eq "c_read") {
|
||||
my $g = $cache->get($key);
|
||||
$brt = tv_interval($bst);
|
||||
$brt = tv_interval($bst);
|
||||
Log3($name, 1, "$name - Cache time read key \"$key\": ".$brt) if(AttrVal($name,"debugCachetime",0));
|
||||
return $g;
|
||||
if(!$g) {
|
||||
return "";
|
||||
} else {
|
||||
return $g;
|
||||
}
|
||||
}
|
||||
|
||||
# einen Key entfernen
|
||||
|
Loading…
Reference in New Issue
Block a user