From d3df7b19b2e5b26f048062cd3876857cd3c4f2d1 Mon Sep 17 00:00:00 2001 From: Ryan Snodgrass Date: Tue, 30 Jan 2024 22:11:06 -0800 Subject: [PATCH] * added Anthem D2v test --- pyavcontrol/data/future/anthem_d2v.yaml | 243 +++++++++++++++++++ pyavcontrol/data/future/marantz_av8805.yaml | 10 +- pyavcontrol/data/src/mcintosh_mx160.yaml | 2 +- pyavcontrol/data/src/trinnov_altitude32.yaml | 2 +- 4 files changed, 253 insertions(+), 4 deletions(-) create mode 100644 pyavcontrol/data/future/anthem_d2v.yaml diff --git a/pyavcontrol/data/future/anthem_d2v.yaml b/pyavcontrol/data/future/anthem_d2v.yaml new file mode 100644 index 0000000..38feb8e --- /dev/null +++ b/pyavcontrol/data/future/anthem_d2v.yaml @@ -0,0 +1,243 @@ +--- +id: anthem_d2v +description: Anthem Statement D2v +urls: + - https://www.anthemav.com/downloads/d2v_manual.pdf + +manufacturer: + name: Anthem + model: Statement D2v + +settings: + min_time_between_commands: 0.25 + +tested: false + +connection: + ip: + port: 23 + rs232: + baudrate: 9600 + bytesize: 8 + parity: N + stopbits: 1 + timeout: 1.0 + +vars: + zone: + 1: Main + 2: Zone 2 + 3: Zone 3 + power: + 0: Off + 1: On + + +format: + command: + eol: "\n" + + message: + eol: "\n" + +api: + power: + description: Power control for the entire system + actions: + 'on': + description: Turn entire system on + cmd: + fstring: 'Z{zone}POW1' + 'off': + description: Turn entire system off + cmd: + fstring: 'Z{zone}POW0' + get: + description: Get system power status (0=off; 1=on) + cmd: + fstring: 'Z{zone}POW?' + msg: + regex: 'Z(?P[0-3])POW(?P[01])' + tests: + 'Z11': + zone: 1 + power: 1 + 'PWSTANDBY': + power: STANDBY + + mute: + description: Mute + actions: + get: + description: Get current Mute status + cmd: + fstring: 'Z{zone}MU?' + msg: + regex: 'Z(?P[0-3])MUT(?P[01])' + tests: + 'Z1MUT0': + zone: 1 + mute: 0 + 'Z2MUT1': + zone: 2 + mute: 1 + 'off': + description: Mute off + cmd: + fstring: 'Z{zone}MU0' + 'on': + description: Mute on + cmd: + fstring: 'Z{zone}MU1' + toggle: + description: Mute toggle + cmd: + fstring: 'Z{zone}MUt' + + volume: + description: Volume controls + actions: + get: + description: Get current volume + cmd: + fstring: 'Z{zone}VOL?' + msg: + regex: 'Z(?P[0-3])VOL(?P[0-9]{1,3})' + tests: + 'Z1VOL80': + zone: 1 + volume: 80 + set: + description: Set volume to x + cmd: + fstring: 'Z{zone}VOL{volume}' + regex: 'Z(?P[0-3])VOL(?P[0-9]{1,3})' + down: + description: Decrease volume + cmd: + fstring: 'Z{zone}VDN' + up: + description: Increase volume + cmd: + fstring: 'Z{zone}VUP' + + source: + description: Input source selection + actions: + get: + description: Get info for currently active source + cmd: + fstring: 'SI?' + msg: + regex: 'SI(?P.+)' + tests: + '!SRC(1) CD': + source: 1 + name: CD + set: + description: Select source + cmd: + fstring: 'SI{source}' + docs: + source: Source to select (integer) + + arc: + description: Anthem Room Correction (ARC) controls + actions: + 'off': + description: ARC off + cmd: + fstring: 'Z1ARC0' + 'on': + description: ARC on + cmd: + fstring: 'Z1ARC1' + + trigger: + description: Set triggers on or off + actions: + 'off': + description: Trigger off + cmd: + fstring: 'R{trigger}SET0' + regex: 'R(?P[12])SET0' + 'on': + description: ARC on + cmd: + fstring: 'R{trigger}SET1' + regex: 'R(?P[12])SET1' + + button: + description: Remote button presses + actions: + back: + description: Back button + cmd: + fstring: '!BACK' + down: + description: Direction Down button + cmd: + fstring: 'Z1SIM0019' + left: + description: Direction Left button + cmd: + fstring: 'Z1SIM0020' + right: + description: Direction Right button + cmd: + fstring: 'Z1SIM0022' # FIXME + up: + description: Direction Up button + cmd: + fstring: 'Z1SIM0021' # FIXME + guide: + description: Guide button + cmd: + fstring: 'Z1SIM0017' + number: + description: Number button + cmd: + fstring: 'Z1SIM000{num}' + regex: 'Z1SIM000(?P[0-9])' + docs: + num: single digit integer (0-9) + num0: + description: Number button 0 + cmd: + fstring: 'Z1SIM0000' + num1: + description: Number button 1 + cmd: + fstring: 'Z1SIM0001' + num2: + description: Number button 2 + cmd: + fstring: 'Z1SIM0002' + num3: + description: Number button 3 + cmd: + fstring: 'Z1SIM0003' + num4: + description: Number button 4 + cmd: + fstring: 'Z1SIM0004' + num5: + description: Number button 5 + cmd: + fstring: 'Z1SIM0005' + num6: + description: Number button 6 + cmd: + fstring: 'Z1SIM0006' + num7: + description: Number button 7 + cmd: + fstring: 'Z1SIM0007' + num8: + description: Number button 8 + cmd: + fstring: 'Z1SIM0008' + num9: + description: Number button 9 + cmd: + fstring: 'Z1SIM0009' diff --git a/pyavcontrol/data/future/marantz_av8805.yaml b/pyavcontrol/data/future/marantz_av8805.yaml index c5ac51b..84f29f6 100644 --- a/pyavcontrol/data/future/marantz_av8805.yaml +++ b/pyavcontrol/data/future/marantz_av8805.yaml @@ -2,7 +2,7 @@ id: marantz_av8805 description: Marantz AV8805 urls: - - https://www.marantz.com/-/media/files/documentmaster/marantzna/us/sr8001_rs232_control_spec_mai_v102.pdf + - https://www.marantz.com/-/media/files/documentmaster/marantzna/us/marantz_fy20_sr_nr_protocol_v03_20190827182350130.xls manufacturer: name: Marantz @@ -47,6 +47,12 @@ vars: AUX7: AUX7 NET: NET BT: BT + power: + ON: On + OFF: Off + mute: + ON: On + OFF: Off api: power: @@ -86,7 +92,7 @@ api: cmd: fstring: 'MU?' msg: - regex: 'MU(?P.+)' + regex: 'MU(?P.+)' tests: 'MUOFF': mute: 'OFF' diff --git a/pyavcontrol/data/src/mcintosh_mx160.yaml b/pyavcontrol/data/src/mcintosh_mx160.yaml index 025f00d..87669c1 100644 --- a/pyavcontrol/data/src/mcintosh_mx160.yaml +++ b/pyavcontrol/data/src/mcintosh_mx160.yaml @@ -238,7 +238,7 @@ api: '!AUDTYPE(Unknown)': type: Unknown - buttons: + button: description: Remote button presses actions: back: diff --git a/pyavcontrol/data/src/trinnov_altitude32.yaml b/pyavcontrol/data/src/trinnov_altitude32.yaml index 8ca4b51..1763452 100644 --- a/pyavcontrol/data/src/trinnov_altitude32.yaml +++ b/pyavcontrol/data/src/trinnov_altitude32.yaml @@ -93,7 +93,7 @@ vars: api: - buttons: + button: description: Remote button presses actions: light: