add takePicture
This commit is contained in:
parent
2a4b476ff8
commit
3e2c3205ce
@ -122,6 +122,7 @@ sub AMADDevice_Initialize($) {
|
|||||||
"disable:1 ".
|
"disable:1 ".
|
||||||
"IODev ".
|
"IODev ".
|
||||||
"remoteServer:Automagic,Autoremote,TNES,other ".
|
"remoteServer:Automagic,Autoremote,TNES,other ".
|
||||||
|
"setTakePictureResolution:800x600,1024x768,1280x720,1600x1200,1920x1080 ".
|
||||||
$readingFnAttributes;
|
$readingFnAttributes;
|
||||||
|
|
||||||
foreach my $d(sort keys %{$modules{AMADDevice}{defptr}}) {
|
foreach my $d(sort keys %{$modules{AMADDevice}{defptr}}) {
|
||||||
@ -666,6 +667,14 @@ sub AMADDevice_Set($$@) {
|
|||||||
$method = "POST";
|
$method = "POST";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
elsif( lc $cmd eq 'takepicture' ) {
|
||||||
|
|
||||||
|
return "Please set \"setTakePictureResolution\" Attribut first"
|
||||||
|
unless(AttrVal($name,'setTakePictureResolution','none') ne 'none');
|
||||||
|
$uri = $host . ":" . $port . "/fhem-amad/setCommands/takepicture?pictureresolution=" . AttrVal($name,'setTakePictureResolution','none');
|
||||||
|
$method = "POST";
|
||||||
|
}
|
||||||
|
|
||||||
elsif( lc $cmd eq 'sendintent' ) {
|
elsif( lc $cmd eq 'sendintent' ) {
|
||||||
my $intentstring = join( " ", @args );
|
my $intentstring = join( " ", @args );
|
||||||
my ( $action, $exkey1, $exval1, $exkey2, $exval2 ) = split( "[ \t][ \t]*", $intentstring );
|
my ( $action, $exkey1, $exval1, $exkey2, $exval2 ) = split( "[ \t][ \t]*", $intentstring );
|
||||||
@ -725,7 +734,7 @@ sub AMADDevice_Set($$@) {
|
|||||||
my $btdev = AttrVal( $name, "setBluetoothDevice", "none" );
|
my $btdev = AttrVal( $name, "setBluetoothDevice", "none" );
|
||||||
|
|
||||||
|
|
||||||
my $list = "screenMsg ttsMsg mediaGoogleMusic:play/pause,stop,next,back mediaSamsungMusic:play/pause,stop,next,back mediaAmazonMusic:play/pause,stop,next,back mediaSpotifyMusic:play/pause,stop,next,back mediaTuneinRadio:play/pause,stop,next,back mediaAldiMusic:play/pause,stop,next,back mediaYouTube:play/pause,stop,next,back mediaYouTubeKids:play/pause,stop,next,back mediaVlcPlayer:play/pause,stop,next,back mediaAudible:play/pause,stop,next,back screenBrightness:slider,0,1,255 screen:on,off,lock,unlock openURL nextAlarmTime:time timer:slider,1,1,60 statusRequest:noArg bluetooth:on,off notifySndFile clearNotificationBar:All,Automagic activateVoiceInput:noArg vibrate:noArg sendIntent openCall closeCall:noArg currentFlowsetUpdate:noArg installFlowSource doNotDisturb:never,always,alarmClockOnly,onlyImportant userFlowState userFlowRun sendSMS startDaydream:noArg volumeUp:noArg volumeDown:noArg mute:on,off showHomeScreen:noArg";
|
my $list = "screenMsg ttsMsg mediaGoogleMusic:play/pause,stop,next,back mediaSamsungMusic:play/pause,stop,next,back mediaAmazonMusic:play/pause,stop,next,back mediaSpotifyMusic:play/pause,stop,next,back mediaTuneinRadio:play/pause,stop,next,back mediaAldiMusic:play/pause,stop,next,back mediaYouTube:play/pause,stop,next,back mediaYouTubeKids:play/pause,stop,next,back mediaVlcPlayer:play/pause,stop,next,back mediaAudible:play/pause,stop,next,back screenBrightness:slider,0,1,255 screen:on,off,lock,unlock openURL nextAlarmTime:time timer:slider,1,1,60 statusRequest:noArg bluetooth:on,off notifySndFile clearNotificationBar:All,Automagic activateVoiceInput:noArg vibrate:noArg sendIntent openCall closeCall:noArg currentFlowsetUpdate:noArg installFlowSource doNotDisturb:never,always,alarmClockOnly,onlyImportant userFlowState userFlowRun sendSMS startDaydream:noArg volumeUp:noArg volumeDown:noArg mute:on,off showHomeScreen:noArg takePicture:noArg";
|
||||||
|
|
||||||
$list .= " screenOrientation:auto,landscape,portrait" if( AttrVal( $name, "setScreenOrientation", "0" ) eq "1" );
|
$list .= " screenOrientation:auto,landscape,portrait" if( AttrVal( $name, "setScreenOrientation", "0" ) eq "1" );
|
||||||
$list .= " screenFullscreen:on,off" if( AttrVal( $name, "setFullscreen", "0" ) eq "1" );
|
$list .= " screenFullscreen:on,off" if( AttrVal( $name, "setFullscreen", "0" ) eq "1" );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user