From 5c2cb94f4defce4cef8a274df3b153ac0b3ff7cb Mon Sep 17 00:00:00 2001
From: Beta-User <>
Date: Thu, 27 Oct 2022 03:52:38 +0000
Subject: [PATCH] 71_YAMAHA_AVR: maintainer change, commandref to id format
git-svn-id: https://svn.fhem.de/fhem/trunk@26596 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
fhem/FHEM/71_YAMAHA_AVR.pm | 179 +++++++++++++++-------
fhem/FHEM/lib/AttrTemplate/mqtt2.template | 8 +-
fhem/MAINTAINER.txt | 2 +-
3 files changed, 130 insertions(+), 59 deletions(-)
diff --git a/fhem/FHEM/71_YAMAHA_AVR.pm b/fhem/FHEM/71_YAMAHA_AVR.pm
index a4fbbbe2b..2d7e8c74c 100755
--- a/fhem/FHEM/71_YAMAHA_AVR.pm
+++ b/fhem/FHEM/71_YAMAHA_AVR.pm
@@ -8,7 +8,6 @@
# with any receiver which has an ethernet or wlan connection.
#
# Copyright by Markus Bloch
-# e-mail: Notausstieg0309@googlemail.com
#
# This file is part of fhem.
#
@@ -2605,17 +2604,21 @@ sub YAMAHA_AVR_isModel_DSP($)
1;
+__END__
+
=pod
+
+=encoding utf8
=item device
=item summary controls Yamaha AV receivers via LAN connection
=item summary_DE steuert Yamaha AV-Receiver über die LAN-Verbindung
=begin html
-
+
YAMAHA_AVR
-
- Define
+
+ Define
define <name> YAMAHA_AVR <ip-address> [<zone>] [<status_interval>]
@@ -2681,8 +2684,8 @@ sub YAMAHA_AVR_isModel_DSP($)
-
- Set
+
+ Set
set <name> <command> [<parameter>]
@@ -2690,44 +2693,78 @@ sub YAMAHA_AVR_isModel_DSP($)
The module only offers the real available inputs and scenes. The following input commands are just an example and can differ.
+
- on - powers on the device
+
- off - shuts down the device
+
- input hdm1,hdmX,... - selects the input channel (only the real available inputs were given)
+
- scene scene1,sceneX - select the scene
+
- volume 0...100 [direct] - set the volume level in percentage. If you use "direct" as second argument, no volume smoothing is used (if activated) for this volume change. In this case, the volume will be set immediatly.
+
- volumeStraight -80...15 [direct] - set the volume level in decibel. If you use "direct" as second argument, no volume smoothing is used (if activated) for this volume change. In this case, the volume will be set immediatly.
-- volumeUp [0-100] [direct] - increases the volume level by 5% or the value of attribute volumeSteps (optional the increasing level can be given as argument, which will be used instead). If you use "direct" as second argument, no volume smoothing is used (if activated) for this volume change. In this case, the volume will be set immediatly.
-- volumeDown [0-100] [direct] - decreases the volume level by 5% or the value of attribute volumeSteps (optional the decreasing level can be given as argument, which will be used instead). If you use "direct" as second argument, no volume smoothing is used (if activated) for this volume change. In this case, the volume will be set immediatly.
+
+- volumeUp [0-100] [direct] - increases the volume level by 5% or the value of attribute volumeSteps (optional the increasing level can be given as argument, which will be used instead). If you use "direct" as second argument, no volume smoothing is used (if activated) for this volume change. In this case, the volume will be set immediatly.
+- volumeDown [0-100] [direct] - decreases the volume level by 5% or the value of attribute volumeSteps (optional the decreasing level can be given as argument, which will be used instead). If you use "direct" as second argument, no volume smoothing is used (if activated) for this volume change. In this case, the volume will be set immediatly.
+
- hdmiOut1 on|off - controls the HDMI output 1
- hdmiOut2 on|off - controls the HDMI output 2
+
- mute on|off|toggle - activates volume mute
+
- bass [-6...6] step 0.5 (main zone), [-10...10] step 2 (other zones), [-10...10] step 1 (other zones, DSP models) - set bass tone level in decibel
- treble [-6...6] step 0.5 (main zone), [-10...10] step 2 (other zones), [-10...10] step 1 (other zones, DSP models) - set treble tone level in decibel
+
- dsp hallinmunich,hallinvienna,... - sets the DSP mode to the given preset
+
- enhancer on|off - controls the internal sound enhancer
+
- 3dCinemaDsp auto|off - controls the CINEMA DSP 3D mode
+
- adaptiveDrc auto|off - controls the Adaptive DRC
+
- partyMode on|off - controls the party mode. In Main Zone the whole party mode is enabled/disabled system wide. In each zone executed, it enables/disables the current zone from party mode.
-- navigateListMenu <item1>/<item2>/.../<itemN> - select a specific item within a menu structure. for menu-based inputs (e.g. Net Radio, USB, Server, ...) only. See chapter Automatic Menu Navigation for further details and examples.
+
+- navigateListMenu <item1>/<item2>/.../<itemN> - select a specific item within a menu structure. for menu-based inputs (e.g. Net Radio, USB, Server, ...) only. See chapter Automatic Menu Navigation for further details and examples.
+
- tunerFrequency <frequency> [AM|FM] - sets the tuner frequency. The first argument is the frequency, second parameter is optional to set the tuner band (AM or FM, default: FM). Depending which tuner band you select, the frequency is given in kHz (AM band) or MHz (FM band). If the second parameter is not set, the FM band will be used. This command can be used even the current input is not "tuner", the new frequency is set and will be played, when the tuner gets active next time.
+
- tunerFrequencyBand FM|DAB - controls the used tuner frequency band ("FM" for analog frequency modulation or "DAB" for digital audio broadcasting. Only available if device supports DAB. On devices using an analog tuner, the frequency band (AM/FM) can be changed via set command "tunerFrequency".
+data-pattern="preset.*">
- preset 1...40 - selects a saved preset of the currently selected input.
- presetUp - selects the next preset of the currently selected input.
- presetDown - selects the previous preset of the currently selected input.
+
- straight on|off - bypasses the internal codec converter and plays the original sound codec
-- direct on|off - bypasses all internal sound enhancement features and plays the sound straight directly
+
+- direct on|off - bypasses all internal sound enhancement features and plays the sound straight directly
+
- sleep off,30min,60min,...,last - activates the internal sleep timer
+
- shuffle on,off - activates the shuffle mode on the current input
+
- surroundDecoder dolbypl,... - set the surround decoder. Only the available decoders were given if the device supports the configuration of the surround decoder.
+
- extraBass off,auto - controls the extra bass. Only available if supported by the device.
+
- ypaoVolume off,auto - controls the YPAO volume. Only available if supported by the device.
+
- displayBrightness -4...0 - controls brightness reduction of the front display. Only available if supported by the device.
+
- repeat one,all,off - activates the repeat mode on the current input for one or all titles
+
- pause - pause playback on current input
+
- play - start playback on current input
+
- stop - stop playback on current input
+
- skip reverse,forward - skip track on current input
+
- statusRequest - requests the current status of the device
+
- remoteControl up,down,... - sends remote control commands as listed below
@@ -2760,7 +2797,7 @@ sub YAMAHA_AVR_isModel_DSP($)
The button names are the same as on your remote control.
-
+
Automatic Menu Navigation (only for menu based inputs like Net Radio, Server, USB, ...)
For menu based inputs you have to select a specific item out of a complex menu structure to start playing music.
@@ -2814,49 +2851,49 @@ So here are some examples:
-
- Get
+
+ Get
get <name> <reading>
Currently, the get command only returns the reading values. For a specific list of possible values, see section "Generated Readings/Events".
-
+
Attributes
- do_not_notify
- disabledForIntervals
- readingFnAttributes
- - requestTimeout
+ - requestTimeout
Optional attribute change the response timeout in seconds for all queries to the receiver.
- Possible values: 1-5 seconds. Default value is 4 seconds.
+ Possible values: 1-5 seconds. Default value is 4 seconds.
- - disable
+ - disable
Optional attribute to disable the internal cyclic status update of the receiver. Manual status updates via statusRequest command is still possible.
- Possible values: 0 => perform cyclic status update, 1 => don't perform cyclic status updates.
+ Possible values: 0 => perform cyclic status update, 1 => don't perform cyclic status updates.
- - volumeSmoothChange
+ - volumeSmoothChange
Optional attribute to activate a smooth volume change.
- Possible values: 0 => off , 1 => on
+ Possible values: 0 => off , 1 => on
- - volumeSmoothSteps
- Optional attribute to define the number of volume changes between the
- current and the desired volume. Default value is 5 steps
+ - volumeSmoothSteps
+ Optional attribute to define the number of volume changes between the current and the desired volume. Default value is 5 steps
- - volumeSteps
- Optional attribute to define the default increasing and decreasing level for the volumeUp and volumeDown set command. Default value is 5%
+ - volumeSteps
+ Optional attribute to define the default increasing and decreasing level for the volumeUp and volumeDown set command. Default value is 5%
- - volumeMax
+ - volumeMax
Optional attribute to set an upper limit in percentage for volume changes.
If the user tries to change the volume to a higher level than configured with this attribute, the volume will not exceed this limit.
- Possible values: 0-100%. Default value is 100% (no limitation)
+ Possible values: 0-100%. Default value is 100% (no limitation)
- Generated Readings/Events:
+
+ Generated Readings/Events:
- 3dCinemaDsp - The status of the CINEMA DSP 3D mode (can be "auto" or "off")
- adaptiveDrc - The status of the Adaptive DRC (can be "auto" or "off")
@@ -2908,12 +2945,12 @@ So here are some examples:
=end html
=begin html_DE
-
+
YAMAHA_AVR
-
- Definition
+
+ Definition
define <name> YAMAHA_AVR <IP-Addresse> [<Zone>] [<Status_Interval>]
@@ -2974,8 +3011,8 @@ So here are some examples:
-
- Set-Kommandos
+
+ Set-Kommandos
set <Name> <Kommando> [<Parameter>]
@@ -2984,45 +3021,76 @@ So here are some examples:
Aktuell stehen folgende Kommandos zur Verfügung.
+
- on - Schaltet den Receiver ein
+
- off - Schaltet den Receiver aus
+
- dsp hallinmunich,hallinvienna,... - Aktiviert das entsprechende DSP Preset
+
- enhancer on,off - Aktiviert den Sound Enhancer für einen verbesserten Raumklang
+
- 3dCinemaDsp auto,off - Aktiviert den CINEMA DSP 3D Modus
+
- adaptiveDrc auto,off - Aktiviert Adaptive DRC
+
- extraBass auto,off - Aktiviert den Extra Bass
+
- ypaoVolume auto,off - Aktiviert YPAO Lautstärke
+
- displayBrightness -4...0 - Steuert die Helligkeitsreduzierung des Front-Displays
+
- partyMode on|off - Aktiviert den Party Modus. In der Main Zone wird hierbei der Party Modus geräteweit aktiviert oder deaktiviert. In den anderen Zonen kann man damit die entsprechende Zone dem Party Modus zuschalten oder entziehen.
-- navigateListMenu [Element 1]/[Element 2]/.../[Element N] - Wählt ein spezifisches Element aus einer Menüstruktur aus. Nur verwendbar bei Menü-basierenden Eingängen (z.B. Net Radio, USB, Server, etc.). Siehe nachfolgendes Kapitel "Automatische Menü Navigation" für weitere Details und Beispiele.
+
+- navigateListMenu [Element 1]/[Element 2]/.../[Element N] - Wählt ein spezifisches Element aus einer Menüstruktur aus. Nur verwendbar bei Menü-basierenden Eingängen (z.B. Net Radio, USB, Server, etc.). Siehe nachfolgendes Kapitel "Automatische Menü Navigation" für weitere Details und Beispiele.
+
- tunerFrequency [Frequenz] [AM|FM] - setzt die Radio-Frequenz. Das erste Argument ist die Frequenz, der zweite dient optional zu Angabe des Bandes (AM oder FM, standardmäßig FM). Abhängig davon, welches Band man benutzt, wird die Frequenz in kHz (AM-Band) oder MHz (FM-Band) angegeben. Wenn im zweiten Argument kein Band angegeben ist, wird standardmäßig das FM-Band benutzt. Dieser Befehl kann auch benutzt werden, wenn der aktuelle Eingang nicht "tuner" ist. Die neue Frequenz wird dennoch gesetzt und bei der nächsten Benutzung abgespielt.
+
- tunerFrequencyBand FM|DAB - setzt das zu nutzende Frequenzband bzw. Empfangstechnologie für den Radioempfang ("FM" f&uumLr analoge Frequenzmodulation oder "DAB" für digitalen Radioempfang). Nur verfügbar wenn DAB unterstüzt wird.
+
- preset 1...40 - wählt ein gespeichertes Preset für den aktuellen Eingang aus.
- presetUp - wählt das nächste Preset für den aktuellen Eingang aus.
- presetDown - wählt das vorherige Preset für den aktuellen Eingang aus.
+
- direct on,off - Umgeht alle internen soundverbessernden Maßnahmen (Equalizer, Enhancer, Adaptive DRC,...) und gibt das Signal unverfälscht wieder
+
- input hdmi1,hdmiX,... - Wählt den Eingangskanal (es werden nur die tatsächlich verfügbaren Eingänge angeboten)
+
- hdmiOut1 on,off - Aktiviert die Ausgabe via HDMI Ausgang 1
- hdmiOut2 on,off - Aktiviert die Ausgabe via HDMI Ausgang 2
+
- scene scene1,sceneX - Wählt eine vorgefertigte Szene aus
+
- surroundDecoder dolbypl,... - Setzt den Surround Decoder, welcher genutzt werden soll sofern der DSP Modus "Surround Decoder" aktiv ist.
+
- volume 0...100 [direct] - Setzt die Lautstärke in Prozent (0 bis 100%). Wenn als zweites Argument "direct" gesetzt ist, wird keine weiche Lautstärkenanpassung durchgeführt (sofern aktiviert). Die Lautstärke wird in diesem Fall sofort gesetzt.
- volumeStraight -87...15 [direct] - Setzt die Lautstärke in Dezibel (-80.5 bis 15.5 dB) so wie sie am Receiver auch verwendet wird. Wenn als zweites Argument "direct" gesetzt ist, wird keine weiche Lautstärkenanpassung durchgeführt (sofern aktiviert). Die Lautstärke wird in diesem Fall sofort gesetzt.
- volumeUp [0...100] [direct] - Erhöht die Lautstärke um 5% oder entsprechend dem Attribut volumeSteps (optional kann der Wert auch als Argument angehangen werden, dieser hat dann Vorang). Wenn als zweites Argument "direct" gesetzt ist, wird keine weiche Lautstärkenanpassung durchgeführt (sofern aktiviert). Die Lautstärke wird in diesem Fall sofort gesetzt.
- volumeDown [0...100] [direct] - Veringert die Lautstärke um 5% oder entsprechend dem Attribut volumeSteps (optional kann der Wert auch als Argument angehangen werden, dieser hat dann Vorang). Wenn als zweites Argument "direct" gesetzt ist, wird keine weiche Lautstärkenanpassung durchgeführt (sofern aktiviert). Die Lautstärke wird in diesem Fall sofort gesetzt.
+
- mute on,off,toggle - Schaltet den Receiver stumm
+
- bass [-6...6] Schrittweite 0.5 (main zone), [-10...10] Schrittweite 2 (andere Zonen), [-10...10] Schrittweite 1 (andere Zonen, DSP Modelle) - Stellt die Tiefen in decibel ein
- treble [-6...6] Schrittweite 0.5 (main zone), [-10...10] Schrittweite 2 (andere Zonen), [-10...10] Schrittweite 1 (andere Zonen, DSP Modelle) - Stellt die Höhen in decibel ein
+
- straight on,off - Umgeht die interne Codec-Umwandlung und gibt den Original-Codec wieder.
+
- sleep off,30min,60min,...,last - Aktiviert den internen Sleep-Timer zum automatischen Abschalten
+
- shuffle on,off - Aktiviert die Zufallswiedergabe des aktuellen Eingangs (ist nur eingangsabhängig verfügbar)
+
- repeat one,all,off - Wiederholt den aktuellen (one) oder alle (all) Titel des aktuellen Eingangs (ist nur eingangsabhängig verfügbar)
+
- pause - Wiedergabe pausieren (ist nur eingangsabhängig verfügbar)
+
- play - Wiedergabe starten (ist nur eingangsabhängig verfügbar)
+
- stop - Wiedergabe stoppen (ist nur eingangsabhängig verfügbar)
+
- skip reverse,forward - Aktuellen Titel überspringen (ist nur eingangsabhängig verfügbar)
+
- statusRequest - Fragt den aktuell Status des Receivers ab
-
+
- remoteControl up,down,... - Sendet Fernbedienungsbefehle wie im nächsten Abschnitt beschrieben
@@ -3055,7 +3123,7 @@ So here are some examples:
remoteControl tunerPresetDown
-
+
Automatische Menü Navigation (nur für Menü-basierte Eingänge wie z.B. Net Radio, Server, USB, ...)
Für Menü-basierte Eingänge muss man einen bestimmten Eintrag aus einer komplexen Struktur auswählen um die Wiedergabe zu starten.
@@ -3111,47 +3179,50 @@ Ein paar Beispiele:
Das erste Element aus einer Listenebene (von oben nach unten), was auf eine Pfadangabe passt, wird ausgewählt.
-
- Get-Kommandos
+
+ Get-Kommandos
get <Name> <Readingname>
Aktuell stehen via GET lediglich die Werte der Readings zur Verfügung. Eine genaue Auflistung aller möglichen Readings folgen unter "Generierte Readings/Events".
-
- Attribute
+
+ Attribute
- do_not_notify
- disabledForIntervals
- readingFnAttributes
- - requestTimeout
+ - requestTimeout
Optionales Attribut. Maximale Dauer einer Anfrage in Sekunden zum Receiver.
- Mögliche Werte: 1-5 Sekunden. Standardwert ist 4 Sekunden
- - disable
+ Mögliche Werte: 1-5 Sekunden. Standardwert ist 4 Sekunden
+ - disable
Optionales Attribut zur Deaktivierung des zyklischen Status-Updates. Ein manuelles Update via statusRequest-Befehl ist dennoch möglich.
- Mögliche Werte: 0 => zyklische Status-Updates, 1 => keine zyklischen Status-Updates.
- - volumeSmoothChange
- Optionales Attribut, welches einen weichen Lautstärkeübergang aktiviert..
+ Mögliche Werte: 0 => zyklische Status-Updates, 1 => keine zyklischen Status-Updates.
+ - volumeSmoothChange
+ Optionales Attribut, welches einen weichen Lautstärkeübergang aktiviert
- Mögliche Werte: 0 => deaktiviert , 1 => aktiviert
- - volumeSmoothSteps
+ Mögliche Werte: 0 => deaktiviert , 1 => aktiviert
+ - volumeSmoothSteps
Optionales Attribut, welches angibt, wieviele Schritte zur weichen Lautstärkeanpassung
- durchgeführt werden sollen. Standardwert ist 5 Anpassungschritte
- - volumeSteps
- Optionales Attribut, welches den Standardwert zur Lautstärkenerhöhung (volumeUp) und Lautstärkenveringerung (volumeDown) konfiguriert. Standardwert ist 5%
+ durchgeführt werden sollen. Standardwert ist 5 Anpassungschritte
+ - volumeSteps
+ Optionales Attribut, welches den Standardwert zur Lautstärkenerhöhung (volumeUp) und Lautstärkenveringerung (volumeDown) konfiguriert. Standardwert ist 5%
- - volumeMax
+ -
+ volumeMax
Optionales Attribut, welches eine maximale Obergrenze in Prozent für die Lautstärke festlegt.
Wird versucht die Lautstärke auf einen höheren Wert zu setzen, so wird die Lautstärke dennoch die konfigurierte Obergrenze nicht überschreiten.
- Mögliche Werte: 0-100%. Standardwert ist 100% (keine Begrenzung)
+ Mögliche Werte: 0-100%. Standardwert ist 100% (keine Begrenzung)
- Generierte Readings/Events:
+
+
+ Generierte Readings/Events:
- 3dCinemaDsp - Der Status des CINEMA DSP 3D-Modus ("auto" => an, "off" => aus)
- adaptiveDrc - Der Status des Adaptive DRC ("auto" => an, "off" => aus)
diff --git a/fhem/FHEM/lib/AttrTemplate/mqtt2.template b/fhem/FHEM/lib/AttrTemplate/mqtt2.template
index 414bd052b..bfb23172d 100644
--- a/fhem/FHEM/lib/AttrTemplate/mqtt2.template
+++ b/fhem/FHEM/lib/AttrTemplate/mqtt2.template
@@ -376,10 +376,10 @@ desc: A dimmable rgbw light connected via zigbee2mqtt
rgb value is encoded as
farewell:specified values can be adjusted at any time in the setList attribute
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
-par:BRIGHTNESS;default brightness in brightness-command (numeric, 0-255, 120 might be a good value to start);undef
-par:CTVALUE;default color temp (ct) value in on-command (numeric, 0-370, 320?);undef
-par:CTWARMVALUE;default ct value in warm-command (320?);undef
-par:CTWHITEVALUE;default ct value in white-command (250?);undef
+par:BRIGHTNESS;default brightness in brightness-command (numeric, 0-255, e.g. 120);undef
+par:CTVALUE;default color temp (ct) value in on-command (numeric, 0-370, e.g. 320);undef
+par:CTWARMVALUE;default ct value in warm-command (e.g. 320);undef
+par:CTWHITEVALUE;default ct value in white-command (e.g. 250);undef
par:ICON;ICON as set, defaults to hue_filled_white_and_color_e27_b22;{ AttrVal('DEVICE','icon','hue_filled_white_and_color_e27_b22') }
attr DEVICE icon ICON
attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)}
diff --git a/fhem/MAINTAINER.txt b/fhem/MAINTAINER.txt
index e4ca9ce07..fd44530aa 100644
--- a/fhem/MAINTAINER.txt
+++ b/fhem/MAINTAINER.txt
@@ -380,7 +380,7 @@ FHEM/71_DENON_AVR_ZONE.pm delmar Multimedia
FHEM/71_ONKYO_AVR_ZONE.pm delmar Multimedia
FHEM/71_PHILIPS_AUDIO.pm ra666ack Multimedia
FHEM/71_PIONEERAVRZONE.pm 50watt Multimedia
-FHEM/71_YAMAHA_AVR.pm markusbloch/orphan Multimedia
+FHEM/71_YAMAHA_AVR.pm orphan/Beta-User Multimedia
FHEM/71_YAMAHA_BD.pm markusbloch/orphan Multimedia
FHEM/71_YAMAHA_MC.pm Leugi Multimedia
FHEM/71_YAMAHA_NP.pm ra666ack Multimedia