mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
70_BRAVIA.pm: set text - to fill an input field
git-svn-id: https://svn.fhem.de/fhem/trunk@15689 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f0a67df5a5
commit
328716f8ac
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- feature: 70_BRAVIA: new command "text" to add text to an input field
|
||||||
- changed: allowed.pm/fhem.pl: SecurityCheck cleanup, Forum #81509
|
- changed: allowed.pm/fhem.pl: SecurityCheck cleanup, Forum #81509
|
||||||
- new: 88_xs1Bridge: New modul to read xs1 EZcontrol
|
- new: 88_xs1Bridge: New modul to read xs1 EZcontrol
|
||||||
- change: 93_DbRep: V7.0.0, changelog:
|
- change: 93_DbRep: V7.0.0, changelog:
|
||||||
|
@ -198,6 +198,7 @@ sub BRAVIA_Set($@) {
|
|||||||
$usage .= " mute:" . $mutes;
|
$usage .= " mute:" . $mutes;
|
||||||
$usage .= " input:" . $inputs if ( $inputs ne "" );
|
$usage .= " input:" . $inputs if ( $inputs ne "" );
|
||||||
$usage .= " channel:$channels" if ( $channels ne "" );
|
$usage .= " channel:$channels" if ( $channels ne "" );
|
||||||
|
$usage .= " text" if (ReadingsVal($name, "requestFormat", "") eq "json");
|
||||||
|
|
||||||
my $cmd = '';
|
my $cmd = '';
|
||||||
my $result;
|
my $result;
|
||||||
@ -565,6 +566,17 @@ sub BRAVIA_Set($@) {
|
|||||||
if ( ReadingsVal($name, "upnp", "") ne $a[2] );
|
if ( ReadingsVal($name, "upnp", "") ne $a[2] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# text
|
||||||
|
elsif ( $a[1] eq "text" ) {
|
||||||
|
return "No 2nd argument given" if ( !defined( $a[2] ) );
|
||||||
|
|
||||||
|
shift(@a); shift(@a);
|
||||||
|
my $text = join(" ", @a);
|
||||||
|
Log3 $name, 2, "BRAVIA set $name text $text";
|
||||||
|
|
||||||
|
BRAVIA_SendCommand( $hash, "text", $text );
|
||||||
|
}
|
||||||
|
|
||||||
# return usage hint
|
# return usage hint
|
||||||
else {
|
else {
|
||||||
return $usage;
|
return $usage;
|
||||||
@ -776,6 +788,12 @@ sub BRAVIA_SendCommand($$;$$) {
|
|||||||
} else {
|
} else {
|
||||||
$URL .= "/cersEx/api/" . $service;
|
$URL .= "/cersEx/api/" . $service;
|
||||||
}
|
}
|
||||||
|
} elsif ($service eq "text") {
|
||||||
|
$URL .= $port->{SERVICE};
|
||||||
|
if ($requestFormat eq "json") {
|
||||||
|
$URL .= "/sony/appControl";
|
||||||
|
$data = "{\"id\":2,\"method\":\"setTextForm\",\"version\":\"1.0\",\"params\":[\"".$cmd."\"]}";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$URL .= $port->{SERVICE};
|
$URL .= $port->{SERVICE};
|
||||||
if ($requestFormat eq "json") {
|
if ($requestFormat eq "json") {
|
||||||
@ -1486,6 +1504,11 @@ sub BRAVIA_ProcessCommandData ($$) {
|
|||||||
# nothing to do
|
# nothing to do
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# text
|
||||||
|
elsif ( $service eq "text" ) {
|
||||||
|
# nothing to do
|
||||||
|
}
|
||||||
|
|
||||||
# register
|
# register
|
||||||
elsif ( $service eq "register" ) {
|
elsif ( $service eq "register" ) {
|
||||||
readingsBeginUpdate($hash);
|
readingsBeginUpdate($hash);
|
||||||
@ -1967,6 +1990,8 @@ sub BRAVIA_GetNormalizedName($) {
|
|||||||
Retrieves current status information from TV.</li>
|
Retrieves current status information from TV.</li>
|
||||||
<li><i>stop</i><br>
|
<li><i>stop</i><br>
|
||||||
Stops recording, playing of an internal App, etc.</li>
|
Stops recording, playing of an internal App, etc.</li>
|
||||||
|
<li><i>text</i><br>
|
||||||
|
Includes the given text into an input field on display.</li>
|
||||||
<li><i>toggle</i><br>
|
<li><i>toggle</i><br>
|
||||||
Toggles power status of TV.</li>
|
Toggles power status of TV.</li>
|
||||||
<li><i>tvpause</i><br>
|
<li><i>tvpause</i><br>
|
||||||
@ -2073,6 +2098,8 @@ sub BRAVIA_GetNormalizedName($) {
|
|||||||
Ruft die aktuellen Statusinformationen vom TV ab.</li>
|
Ruft die aktuellen Statusinformationen vom TV ab.</li>
|
||||||
<li><i>stop</i><br>
|
<li><i>stop</i><br>
|
||||||
Stoppt die Wiedergabe einer Aufnahme, einer internen App, etc.</li>
|
Stoppt die Wiedergabe einer Aufnahme, einer internen App, etc.</li>
|
||||||
|
<li><i>text</i><br>
|
||||||
|
Überträgt den eingegebenen Text in ein Textfeld der Anzeige.</li>
|
||||||
<li><i>toggle</i><br>
|
<li><i>toggle</i><br>
|
||||||
Wechselt den Einschaltstatus des TV.</li>
|
Wechselt den Einschaltstatus des TV.</li>
|
||||||
<li><i>tvpause</i><br>
|
<li><i>tvpause</i><br>
|
||||||
|
Loading…
Reference in New Issue
Block a user