2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-21 07:56:03 +00:00

49_SSCam: contrib 9.5.0

git-svn-id: https://svn.fhem.de/fhem/trunk@22442 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2020-07-20 16:27:33 +00:00
parent 83fd4c67d0
commit 525f3c5090

View File

@ -131,9 +131,24 @@ my %fupgrade = ( # Fun
3 => { of => "SSCam_StreamDev", nf => "FHEM::SSCam::streamDev" }, 3 => { of => "SSCam_StreamDev", nf => "FHEM::SSCam::streamDev" },
); );
my %SSCAM_imc = ( # disbled String modellabhängig (SVS / CAM) my %hvattr = ( # Hash zur Validierung von Attributen
0 => { 0 => "initialized", 1 => "inactive" }, autoRefresh => { master => 1, nomaster => 1 },
1 => { 0 => "off", 1 => "inactive" }, autoRefreshFW => { master => 1, nomaster => 1 },
disable => { master => 1, nomaster => 1 },
forcePageRefresh => { master => 1, nomaster => 1 },
genericStrmHtmlTag => { master => 0, nomaster => 1 },
htmlattr => { master => 0, nomaster => 1 },
htmlattrFTUI => { master => 0, nomaster => 1 },
hideAudio => { master => 0, nomaster => 1 },
hideButtons => { master => 0, nomaster => 1 },
hideDisplayName => { master => 1, nomaster => 1 },
hideDisplayNameFTUI => { master => 1, nomaster => 1 },
noLink => { master => 1, nomaster => 1 },
popupWindowSize => { master => 0, nomaster => 1 },
popupStreamFW => { master => 0, nomaster => 1 },
popupStreamTo => { master => 0, nomaster => 1 },
ptzButtonSize => { master => 0, nomaster => 1 },
ptzButtonSizeFTUI => { master => 0, nomaster => 1 },
); );
my %sdevs = (); # Hash der vorhandenen Streaming Devices my %sdevs = (); # Hash der vorhandenen Streaming Devices
@ -393,15 +408,26 @@ sub Get {
return; return;
} }
################################################################
# Attr
# $cmd can be "del" or "set"
# $name is device name
# aName and aVal are Attribute name and value
################################################################ ################################################################
sub Attr { sub Attr {
my ($cmd,$name,$aName,$aVal) = @_; my ($cmd,$name,$aName,$aVal) = @_;
my $hash = $defs{$name}; my $hash = $defs{$name};
my $model = $hash->{MODEL};
my ($do,$val); my ($do,$val);
# $cmd can be "del" or "set" if ($model eq "master" && !$hvattr{$aName}{master}) {
# $name is device name return qq{The attribute "$aName" is only valid if MODEL is not "$model" !};
# aName and aVal are Attribute name and value }
if ($model ne "master" && !$hvattr{$aName}{nomaster}) {
return qq{The attribute "$aName" is only valid if MODEL is "master" !};
}
if($aName eq "disable") { if($aName eq "disable") {
if($cmd eq "set") { if($cmd eq "set") {