mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
YAMAHA_AVR: current* readings will be erased in case they not apply; added currentTitle for input TUNER (by Norbert Wedegaertner)
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@5765 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5d50fa9704
commit
44435ba78f
3
CHANGED
3
CHANGED
@ -1,5 +1,8 @@
|
||||
# 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.
|
||||
- feature: YAMAHA_AVR current* readings will be erased in case they
|
||||
not applicable
|
||||
- feature: YAMAHA_AVR currentTitle available for TUNER
|
||||
- feature: new Method: SYSMON_getValues([desired keys])
|
||||
- feature: JSONMETER: hourly statistics
|
||||
- feature: configdb: new command search
|
||||
|
@ -169,37 +169,62 @@ YAMAHA_AVR_GetStatus($;$)
|
||||
{
|
||||
Log3 $name, 4, "YAMAHA_AVR $name: check for extended informations";
|
||||
|
||||
my $infos = YAMAHA_AVR_SendCommand($hash, "<YAMAHA_AV cmd=\"GET\"><$1><Play_Info>GetParam</Play_Info></$1></YAMAHA_AV>");
|
||||
my $infos = YAMAHA_AVR_SendCommand($hash, "<YAMAHA_AV cmd=\"GET\"><$1><Play_Info>GetParam</Play_Info></$1></YAMAHA_AV>");
|
||||
|
||||
if($infos =~ /<Meta_Info>.*?<Artist>(.+?)<\/Artist>.*?<\/Meta_Info>/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentArtist", YAMAHA_AVR_html2txt($1));
|
||||
}
|
||||
|
||||
if($infos =~ /<Meta_Info>.*?<Station>(.+?)<\/Station>.*?<\/Meta_Info>/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentStation", YAMAHA_AVR_html2txt($1));
|
||||
}
|
||||
elsif($infos =~ /<Meta_Info>.*?<Program_Service>(.+?)<\/Program_Service>.*?<\/Meta_Info>/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentStation", YAMAHA_AVR_html2txt($1));
|
||||
}
|
||||
|
||||
if($infos =~ /<Meta_Info>.*?<Channel>(.+?)<\/Channel>.*?<\/Meta_Info>/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentChannel", $1);
|
||||
}
|
||||
|
||||
if($infos =~ /<Meta_Info>.*?<Album>(.+?)<\/Album>.*?<\/Meta_Info>/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentAlbum", YAMAHA_AVR_html2txt($1));
|
||||
}
|
||||
|
||||
if($infos =~ /<Meta_Info>.*?<Song>(.+?)<\/Song>.*?<\/Meta_Info>/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentTitle", YAMAHA_AVR_html2txt($1));
|
||||
}
|
||||
|
||||
if($infos =~ /<Meta_Info>.*?<Artist>(.+?)<\/Artist>.*?<\/Meta_Info>/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentArtist", YAMAHA_AVR_html2txt($1));
|
||||
}
|
||||
else
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentArtist", "", 0);
|
||||
}
|
||||
|
||||
if($infos =~ /<Meta_Info>.*?<Station>(.+?)<\/Station>.*?<\/Meta_Info>/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentStation", YAMAHA_AVR_html2txt($1));
|
||||
}
|
||||
elsif($infos =~ /<Meta_Info>.*?<Program_Service>(.+?)<\/Program_Service>.*?<\/Meta_Info>/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentStation", YAMAHA_AVR_html2txt($1));
|
||||
}
|
||||
else
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentStation", "", 0);
|
||||
}
|
||||
|
||||
|
||||
if($infos =~ /<Meta_Info>.*?<Channel>(.+?)<\/Channel>.*?<\/Meta_Info>/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentChannel", $1);
|
||||
}
|
||||
else
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentChannel", "", 0);
|
||||
}
|
||||
|
||||
if($infos =~ /<Meta_Info>.*?<Album>(.+?)<\/Album>.*?<\/Meta_Info>/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentAlbum", YAMAHA_AVR_html2txt($1));
|
||||
}
|
||||
else
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentAlbum", "", 0);
|
||||
}
|
||||
|
||||
if($infos =~ /<Meta_Info>.*?<Song>(.+?)<\/Song>.*?<\/Meta_Info>/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentTitle", YAMAHA_AVR_html2txt($1));
|
||||
}
|
||||
elsif($infos =~ /<Meta_Info>.*?<Radio_Text_A>(.+?)<\/Radio_Text_A>.*?<\/Meta_Info>/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentTitle", YAMAHA_AVR_html2txt($1));
|
||||
}
|
||||
else
|
||||
{
|
||||
readingsBulkUpdate($hash, "currentTitle", "", 0);
|
||||
}
|
||||
|
||||
if($infos =~ /<Playback_Info>(.+?)<\/Playback_Info>/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "playStatus", lc($1));
|
||||
|
Loading…
x
Reference in New Issue
Block a user