mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
71_PHILIPS_AUDIO: Player readings fix.
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@14003 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
9df3dec1ec
commit
ddf87d0e1b
1
CHANGED
1
CHANGED
@ -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: 71_PHILIPS_AUDIO: Player readings fix.
|
||||
- feature: 71_PHILIPS_AUDIO: Module rewritten for better usability.
|
||||
New commands. See documentation.
|
||||
- update: 38_CO20: identify devices by id / serial number
|
||||
|
@ -1269,9 +1269,9 @@ sub PHILIPS_AUDIO_ParseResponse
|
||||
}
|
||||
else
|
||||
{
|
||||
delete $hash->{READINGS}{$_} foreach (grep /player/, keys %{$hash->{READINGS}});
|
||||
readingsBulkUpdate($hash, "playerPlaying", "no");
|
||||
readingsBulkUpdate($hash, "input", "-");
|
||||
delete $hash->{READINGS}{$_} foreach (grep /player/, keys %{$hash->{READINGS}});
|
||||
readingsBulkUpdate($hash, "input", "-");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1279,9 +1279,9 @@ sub PHILIPS_AUDIO_ParseResponse
|
||||
{
|
||||
if($data =~ /STOP/)
|
||||
{
|
||||
delete $hash->{READINGS}{$_} foreach (grep /player/, keys %{$hash->{READINGS}});
|
||||
readingsBulkUpdate($hash, "playerPlaying", "no");
|
||||
readingsBulkUpdate($hash, "input", "-");
|
||||
delete $hash->{READINGS}{$_} foreach (grep /player/, keys %{$hash->{READINGS}});
|
||||
}
|
||||
}
|
||||
elsif($cmd =~ m/^(volumeStraight|volumeUp|volumeDown)/)
|
||||
@ -1300,11 +1300,12 @@ sub PHILIPS_AUDIO_ParseResponse
|
||||
if($1 eq "NOWPLAY")
|
||||
{
|
||||
# New player status information available
|
||||
readingsBulkUpdate($hash, "playerPlaying", "yes");
|
||||
PHILIPS_AUDIO_SendCommand($hash, "/nowplay", "","nowplay", "noArg");
|
||||
}
|
||||
elsif($1 eq "ELAPSE")
|
||||
{
|
||||
|
||||
readingsBulkUpdate($hash, "playerPlaying", "yes");
|
||||
if($data =~ /'value':(.+),/)
|
||||
{
|
||||
# Sometimes the device does not refresh the ELAPSE -> NOWPLAY request
|
||||
@ -1396,11 +1397,10 @@ sub PHILIPS_AUDIO_ParseResponse
|
||||
}
|
||||
else
|
||||
{
|
||||
delete $hash->{READINGS}{$_} foreach (grep /player/, keys %{$hash->{READINGS}});
|
||||
readingsBulkUpdate($hash, "playerPlaying", "no");
|
||||
$hash->{helper}{playerState} = "home";
|
||||
readingsBulkUpdate($hash, "playerState", "home");
|
||||
delete $hash->{READINGS}{$_} foreach (grep /player/, keys %{$hash->{READINGS}});
|
||||
#readingsBulkUpdate($hash, "input", "-");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user