diff --git a/bundles/org.openhab.binding.rotel/README.md b/bundles/org.openhab.binding.rotel/README.md index c63bd6576f527..224fda6a5ba50 100644 --- a/bundles/org.openhab.binding.rotel/README.md +++ b/bundles/org.openhab.binding.rotel/README.md @@ -178,52 +178,90 @@ Here are the list of channels available for each thing type: | Thing Type | Available channels | |------------|---------------------------------------------------------------------------------------------------------| -| a11 | power, source, volume, mute, bass, treble, brightness, tcbypass, balance, speakera, speakerb | -| a12 | power, source, volume, mute, bass, treble, frequency, brightness, tcbypass, balance, speakera, speakerb | -| a14 | power, source, volume, mute, bass, treble, frequency, brightness, tcbypass, balance, speakera, speakerb | -| cd11 | power, playControl, track, random, repeat, brightness | -| cd14 | power, playControl, track, random, repeat, brightness | +| a11 | power, source, volume, mute, bass, treble, brightness, tcbypass, balance, speakera, speakerb, otherCommand | +| a12 | power, source, volume, mute, bass, treble, frequency, brightness, tcbypass, balance, speakera, speakerb, otherCommand | +| a14 | power, source, volume, mute, bass, treble, frequency, brightness, tcbypass, balance, speakera, speakerb, otherCommand | +| cd11 | power, playControl, track, random, repeat, brightness, otherCommand | +| cd14 | power, playControl, track, random, repeat, brightness, otherCommand | | m8 | power, brightness | -| p5 | power, source, volume, mute, bass, treble, frequency, brightness, tcbypass, balance | -| ra11 | power, source, volume, mute, bass, treble, playControl, frequency, brightness, tcbypass, balance | -| ra12 | power, source, volume, mute, bass, treble, playControl, frequency, brightness, tcbypass, balance | -| ra1570 | power, source, volume, mute, bass, treble, playControl, frequency, brightness, tcbypass, balance, speakera, speakerb | -| ra1572 | power, source, volume, mute, bass, treble, frequency, brightness, tcbypass, balance, speakera, speakerb | +| p5 | power, source, volume, mute, bass, treble, frequency, brightness, tcbypass, balance, otherCommand | +| ra11 | power, source, volume, mute, bass, treble, playControl, frequency, brightness, tcbypass, balance, otherCommand | +| ra12 | power, source, volume, mute, bass, treble, playControl, frequency, brightness, tcbypass, balance, otherCommand | +| ra1570 | power, source, volume, mute, bass, treble, playControl, frequency, brightness, tcbypass, balance, speakera, speakerb, otherCommand | +| ra1572 | power, source, volume, mute, bass, treble, frequency, brightness, tcbypass, balance, speakera, speakerb, otherCommand | | ra1592 | power, source, volume, mute, bass, treble, frequency, brightness, tcbypass, balance, speakera, speakerb | | rap1580 | power, source, dsp, volume, mute, brightness | -| rc1570 | power, source, volume, mute, bass, treble, playControl, frequency, brightness, tcbypass, balance | -| rc1572 | power, source, volume, mute, bass, treble, frequency, brightness, tcbypass, balance | +| rc1570 | power, source, volume, mute, bass, treble, playControl, frequency, brightness, tcbypass, balance, otherCommand | +| rc1572 | power, source, volume, mute, bass, treble, frequency, brightness, tcbypass, balance, otherCommand | | rc1590 | power, source, volume, mute, bass, treble, frequency, brightness, tcbypass, balance | | rcd1570 | power, playControl, brightness | -| rcd1572 | power, playControl, track, random, repeat, brightness | +| rcd1572 | power, playControl, track, random, repeat, brightness, otherCommand | | rcx1500 | power, source, volume, mute, playControl | | rdd1580 | power, source, playControl, frequency | | rdg1520 | power, source, playControl | -| rsp1066 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volumeUpDown, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, zone2#power, zone2#source, zone2#volumeUpDown | -| rsp1068 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#line2, zone2#power, zone2#source, zone2#volume, zone2#mute, zone3#power, zone3#source, zone3#volume, zone3#mute, zone4#power, zone4#source, zone4#volume, zone4#mute | -| rsp1069 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#line2, zone2#power, zone2#source, zone2#volume, zone2#mute, zone3#power, zone3#source, zone3#volume, zone3#mute, zone4#power, zone4#source, zone4#volume, zone4#mute | -| rsp1098 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, zone2#power, zone2#source, zone2#volume, zone2#mute | -| rsp1570 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#line2, zone2#power, zone2#source, zone2#volume, zone2#mute, zone3#power, zone3#source, zone3#volume, zone3#mute, zone4#power, zone4#source, zone4#volume, zone4#mute | -| rsp1572 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#line1, mainZone#line2, zone2#power, zone2#source, zone2#volume, zone2#mute, zone3#power, zone3#source, zone3#volume, zone3#mute, zone4#power, zone4#source, zone4#volume, zone4#mute | +| rsp1066 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volumeUpDown, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#otherCommand, zone2#power, zone2#source, zone2#volumeUpDown | +| rsp1068 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#line2, mainZone#otherCommand, zone2#power, zone2#source, zone2#volume, zone2#mute, zone3#power, zone3#source, zone3#volume, zone3#mute, zone4#power, zone4#source, zone4#volume, zone4#mute | +| rsp1069 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#line2, mainZone#otherCommand, zone2#power, zone2#source, zone2#volume, zone2#mute, zone3#power, zone3#source, zone3#volume, zone3#mute, zone4#power, zone4#source, zone4#volume, zone4#mute | +| rsp1098 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#otherCommand, zone2#power, zone2#source, zone2#volume, zone2#mute | +| rsp1570 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#line2, mainZone#otherCommand, zone2#power, zone2#source, zone2#volume, zone2#mute, zone3#power, zone3#source, zone3#volume, zone3#mute, zone4#power, zone4#source, zone4#volume, zone4#mute | +| rsp1572 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#line1, mainZone#line2, mainZone#otherCommand, zone2#power, zone2#source, zone2#volume, zone2#mute, zone3#power, zone3#source, zone3#volume, zone3#mute, zone4#power, zone4#source, zone4#volume, zone4#mute | | rsp1576 | power, source, dsp, volume, mute, brightness | | rsp1582 | power, source, dsp, volume, mute, brightness | -| rsx1055 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volumeUpDown, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, zone2#power, zone2#source, zone2#volumeUpDown | -| rsx1056 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, zone2#power, zone2#source, zone2#volume, zone2#mute | -| rsx1057 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, zone2#power, zone2#source, zone2#volume, zone2#mute | -| rsx1058 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, zone2#power, zone2#source, zone2#volume, zone2#mute, zone3#power, zone3#source, zone3#volume, zone3#mute, zone4#power, zone4#source, zone4#volume, zone4#mute | -| rsx1065 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volumeUpDown, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#line2, zone2#power, zone2#source, zone2#volumeUpDown | -| rsx1067 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#line2, zone2#power, zone2#source, zone2#volume, zone2#mute | -| rsx1550 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, zone2#power, zone2#source, zone2#volume, zone2#mute, zone3#power, zone3#source, zone3#volume, zone3#mute, zone4#power, zone4#source, zone4#volume, zone4#mute | -| rsx1560 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#line2, zone2#power, zone2#source, zone2#volume, zone2#mute, zone3#power, zone3#source, zone3#volume, zone3#mute, zone4#power, zone4#source, zone4#volume, zone4#mute | -| rsx1562 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#line1, mainZone#line2, zone2#power, zone2#source, zone2#volume, zone2#mute, zone3#power, zone3#source, zone3#volume, zone3#mute, zone4#power, zone4#source, zone4#volume, zone4#mute | +| rsx1055 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volumeUpDown, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#otherCommand, zone2#power, zone2#source, zone2#volumeUpDown | +| rsx1056 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#otherCommand, zone2#power, zone2#source, zone2#volume, zone2#mute | +| rsx1057 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#otherCommand, zone2#power, zone2#source, zone2#volume, zone2#mute | +| rsx1058 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#otherCommand, zone2#power, zone2#source, zone2#volume, zone2#mute, zone3#power, zone3#source, zone3#volume, zone3#mute, zone4#power, zone4#source, zone4#volume, zone4#mute | +| rsx1065 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volumeUpDown, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#line2, mainZone#otherCommand, zone2#power, zone2#source, zone2#volumeUpDown | +| rsx1067 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#line2, mainZone#otherCommand, zone2#power, zone2#source, zone2#volume, zone2#mute | +| rsx1550 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#otherCommand, zone2#power, zone2#source, zone2#volume, zone2#mute, zone3#power, zone3#source, zone3#volume, zone3#mute, zone4#power, zone4#source, zone4#volume, zone4#mute | +| rsx1560 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#bass, mainZone#treble, mainZone#line1, mainZone#line2, mainZone#otherCommand, zone2#power, zone2#source, zone2#volume, zone2#mute, zone3#power, zone3#source, zone3#volume, zone3#mute, zone4#power, zone4#source, zone4#volume, zone4#mute | +| rsx1562 | mainZone#power, mainZone#source, mainZone#recordSource, mainZone#dsp, mainZone#volume, mainZone#mute, mainZone#line1, mainZone#line2, mainZone#otherCommand, zone2#power, zone2#source, zone2#volume, zone2#mute, zone3#power, zone3#source, zone3#volume, zone3#mute, zone4#power, zone4#source, zone4#volume, zone4#mute | | rt09 | power, source, playControl, brightness | | rt11 | power, source, brightness | | rt1570 | power, source, brightness | | s5 | power, brightness | | t11 | power, source, brightness | | t14 | power, source, brightness | -| x3 | power, source, volume, mute, bass, treble, frequency, brightness, tcbypass, balance | -| x5 | power, source, volume, mute, bass, treble, frequency, brightness, tcbypass, balance | +| x3 | power, source, volume, mute, bass, treble, frequency, brightness, tcbypass, balance, otherCommand | +| x5 | power, source, volume, mute, bass, treble, frequency, brightness, tcbypass, balance, otherCommand | + +Here are the available commands for the otherCommand channel depending on the thing type: + +| Thing Type | Available commands for the otherCommand channel | +|--------------------|-------------------------------------------------------------------------------| +| a11 | PLAY, PAUSE, STOP, TRACK_FWD, TRACK_BACK | +| a12 | PLAY, PAUSE, STOP, TRACK_FWD, TRACK_BACK | +| a14 | PLAY, PAUSE, STOP, TRACK_FWD, TRACK_BACK | +| cd11 | FAST_FWD, FAST_BACK, EJECT, TIME_TOGGLE, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0 | +| cd14 | FAST_FWD, FAST_BACK, EJECT, TIME_TOGGLE, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0 | +| p5 | PLAY, PAUSE, STOP, TRACK_FWD, TRACK_BACK | +| ra11 | FAST_FWD, FAST_BACK, RANDOM_TOGGLE, REPEAT_TOGGLE, MENU, EXIT, UP, DOWN, LEFT, RIGHT, ENTER, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0 | +| ra12 | FAST_FWD, FAST_BACK, RANDOM_TOGGLE, REPEAT_TOGGLE, MENU, EXIT, UP, DOWN, LEFT, RIGHT, ENTER, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0 | +| ra1570 | FAST_FWD, FAST_BACK, RANDOM_TOGGLE, REPEAT_TOGGLE, MENU, EXIT, UP, DOWN, LEFT, RIGHT, ENTER, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0, PCUSB_CLASS_1, PCUSB_CLASS_2 | +| ra1572 (ASCII V1) | PLAY, PAUSE, STOP, TRACK_FWD, TRACK_BACK, MENU, EXIT, UP, DOWN, LEFT, RIGHT, ENTER, PCUSB_CLASS_1, PCUSB_CLASS_2, RESET_FACTORY | +| ra1572 (ASCII V2) | PLAY, PAUSE, STOP, TRACK_FWD, TRACK_BACK, PCUSB_CLASS_1, PCUSB_CLASS_2, RESET_FACTORY | +| rc1570 | FAST_FWD, FAST_BACK, RANDOM_TOGGLE, REPEAT_TOGGLE, MENU, EXIT, UP, DOWN, LEFT, RIGHT, ENTER, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0, PCUSB_CLASS_1, PCUSB_CLASS_2 | +| rc1572 (ASCII V1) | PLAY, PAUSE, STOP, TRACK_FWD, TRACK_BACK, MENU, EXIT, UP, DOWN, LEFT, RIGHT, ENTER, PCUSB_CLASS_1, PCUSB_CLASS_2, RESET_FACTORY | +| rc1572 (ASCII V2) | PLAY, PAUSE, STOP, TRACK_FWD, TRACK_BACK, PCUSB_CLASS_1, PCUSB_CLASS_2, RESET_FACTORY | +| rcd1572 (ASCII V1) | FAST_FWD, FAST_BACK, EJECT, TIME_TOGGLE, PROGRAM, MENU, EXIT, UP, DOWN, LEFT, RIGHT, ENTER, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0 | +| rcd1572 (ASCII V2) | FAST_FWD, FAST_BACK, EJECT, TIME_TOGGLE, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0 | +| rsp1066 | DSP_TOGGLE, PROLOGIC_TOGGLE, PLII_PANORAMA_TOGGLE, PLII_DIMENSION_UP, PLII_DIMENSION_DOWN, PLII_CENTER_WIDTH_UP, PLII_CENTER_WIDTH_DOWN, DDEX_TOGGLE, NEO6_TOGGLE, NEXT_MODE, MENU, UP, DOWN, LEFT, RIGHT, ENTER, RECORD_FONCTION_SELECT, TONE_CONTROL_SELECT, DYNAMIC_RANGE, DIGITAL_INPUT_SELECT, ZONE_TOGGLE, CENTER_TRIM, SUB_TRIM, SURROUND_TRIM, CINEMA_EQ_TOGGLE | +| rsp1068 | DSP_TOGGLE, PROLOGIC_TOGGLE, PLII_PANORAMA_TOGGLE, PLII_DIMENSION_UP, PLII_DIMENSION_DOWN, PLII_CENTER_WIDTH_UP, PLII_CENTER_WIDTH_DOWN, DDEX_TOGGLE, NEO6_TOGGLE, NEXT_MODE, MENU, UP, DOWN, LEFT, RIGHT, ENTER, RECORD_FONCTION_SELECT, TONE_CONTROL_SELECT, DYNAMIC_RANGE, DIGITAL_INPUT_SELECT, ZONE_TOGGLE, CENTER_TRIM, SUB_TRIM, SURROUND_TRIM, CINEMA_EQ_TOGGLE | +| rsp1069 | DSP_TOGGLE, PROLOGIC_TOGGLE, PLII_PANORAMA_TOGGLE, PLII_DIMENSION_UP, PLII_DIMENSION_DOWN, PLII_CENTER_WIDTH_UP, PLII_CENTER_WIDTH_DOWN, DDEX_TOGGLE, NEO6_TOGGLE, NEXT_MODE, MENU, UP, DOWN, LEFT, RIGHT, ENTER, RECORD_FONCTION_SELECT, TONE_CONTROL_SELECT, DYNAMIC_RANGE, DIGITAL_INPUT_SELECT, ZONE_TOGGLE, CENTER_TRIM, SUB_TRIM, SURROUND_TRIM, CINEMA_EQ_TOGGLE, POWER_OFF_ALL_ZONES, PARTY_MODE_TOGGLE, ZONE2_PARTY_MODE_TOGGLE, ZONE3_PARTY_MODE_TOGGLE, ZONE4_PARTY_MODE_TOGGLE, OUTPUT_RESOLUTION, HDMI_AMP_MODE, HDMI_TV_MODE | +| rsp1098 | DSP_TOGGLE, PROLOGIC_TOGGLE, PLII_PANORAMA_TOGGLE, PLII_DIMENSION_UP, PLII_DIMENSION_DOWN, PLII_CENTER_WIDTH_UP, PLII_CENTER_WIDTH_DOWN, DDEX_TOGGLE, NEO6_TOGGLE, NEXT_MODE, MENU, UP, DOWN, LEFT, RIGHT, ENTER, RECORD_FONCTION_SELECT, TONE_CONTROL_SELECT, DYNAMIC_RANGE, DIGITAL_INPUT_SELECT, ZONE_TOGGLE, CENTER_TRIM, SUB_TRIM, SURROUND_TRIM, CINEMA_EQ_TOGGLE, REMOTE_VOLUME_UP, REMOTE_VOLUME_DOWN | +| rsp1570 | DSP_TOGGLE, PROLOGIC_TOGGLE, PLII_PANORAMA_TOGGLE, PLII_DIMENSION_UP, PLII_DIMENSION_DOWN, PLII_CENTER_WIDTH_UP, PLII_CENTER_WIDTH_DOWN, DDEX_TOGGLE, NEO6_TOGGLE, NEXT_MODE, MENU, UP, DOWN, LEFT, RIGHT, ENTER, RECORD_FONCTION_SELECT, TONE_CONTROL_SELECT, DYNAMIC_RANGE, DIGITAL_INPUT_SELECT, ZONE_TOGGLE, CENTER_TRIM, SUB_TRIM, SURROUND_TRIM, CINEMA_EQ_TOGGLE, POWER_OFF_ALL_ZONES, PARTY_MODE_TOGGLE, ZONE2_PARTY_MODE_TOGGLE, ZONE3_PARTY_MODE_TOGGLE, ZONE4_PARTY_MODE_TOGGLE, OUTPUT_RESOLUTION, HDMI_AMP_MODE, HDMI_TV_MODE, RESET_FACTORY | +| rsp1572 | DSP_TOGGLE, PROLOGIC_TOGGLE, PLII_PANORAMA_TOGGLE, PLII_DIMENSION_UP, PLII_DIMENSION_DOWN, PLII_CENTER_WIDTH_UP, PLII_CENTER_WIDTH_DOWN, DDEX_TOGGLE, NEO6_TOGGLE, NEXT_MODE, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0, MENU, EXIT, UP_PRESSED, UP_RELEASED, DOWN_PRESSED, DOWN_RELEASED, LEFT_PRESSED, LEFT_RELEASED, RIGHT_PRESSED, RIGHT_RELEASED, ENTER, RECORD_FONCTION_SELECT, TONE_CONTROL_SELECT, DYNAMIC_RANGE, DIGITAL_INPUT_SELECT, ZONE_TOGGLE, CENTER_TRIM, SUB_TRIM, SURROUND_TRIM, CINEMA_EQ_TOGGLE, POWER_OFF_ALL_ZONES, PARTY_MODE_TOGGLE, ZONE2_PARTY_MODE_TOGGLE, ZONE3_PARTY_MODE_TOGGLE, ZONE4_PARTY_MODE_TOGGLE, OUTPUT_RESOLUTION, HDMI_AMP_MODE, HDMI_TV_MODE, ROOM_EQ_TOGGLE, SPEAKER_SETTING_TOGGLE, RESET_FACTORY | +| rsx1055 | DSP_TOGGLE, PROLOGIC_TOGGLE, PLII_PANORAMA_TOGGLE, PLII_DIMENSION_UP, PLII_DIMENSION_DOWN, PLII_CENTER_WIDTH_UP, PLII_CENTER_WIDTH_DOWN, DDEX_TOGGLE, NEO6_TOGGLE, NEXT_MODE, TUNE_UP, TUNE_DOWN, MEMORY, BAND_TOGGLE, AM, FM, TUNE_PRESET_TOGGLE, TUNING_MODE_SELECT, PRESET_MODE_SELECT, FREQUENCY_DIRECT, PRESET_SCAN, TUNER_DISPLAY, RDS_PTY, RDS_TP, RDS_TA, FM_MONO_TOGGLE, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0, MENU, UP, DOWN, LEFT, RIGHT, ENTER, RECORD_FONCTION_SELECT, TONE_CONTROL_SELECT, DYNAMIC_RANGE, DIGITAL_INPUT_SELECT, ZONE_TOGGLE, CENTER_TRIM, SUB_TRIM, SURROUND_TRIM, CINEMA_EQ_TOGGLE | +| rsx1056 | DSP_TOGGLE, PROLOGIC_TOGGLE, PLII_PANORAMA_TOGGLE, PLII_DIMENSION_UP, PLII_DIMENSION_DOWN, PLII_CENTER_WIDTH_UP, PLII_CENTER_WIDTH_DOWN, DDEX_TOGGLE, NEO6_TOGGLE, NEXT_MODE, TUNE_UP, TUNE_DOWN, MEMORY, BAND_TOGGLE, AM, FM, TUNE_PRESET_TOGGLE, TUNING_MODE_SELECT, PRESET_MODE_SELECT, FREQUENCY_DIRECT, PRESET_SCAN, TUNER_DISPLAY, RDS_PTY, RDS_TP, RDS_TA, FM_MONO_TOGGLE, ZONE2_TUNE_UP, ZONE2_TUNE_DOWN, ZONE2_BAND_TOGGLE, ZONE2_AM, ZONE2_FM, ZONE2_TUNE_PRESET_TOGGLE, ZONE2_TUNING_MODE_SELECT, ZONE2_PRESET_MODE_SELECT, ZONE2_PRESET_SCAN, ZONE2_FM_MONO_TOGGLE, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0, ZONE2_KEY1, ZONE2_KEY2, ZONE2_KEY3, ZONE2_KEY4, ZONE2_KEY5, ZONE2_KEY6, ZONE2_KEY7, ZONE2_KEY8, ZONE2_KEY9, ZONE2_KEY0, MENU, UP, DOWN, LEFT, RIGHT, ENTER, RECORD_FONCTION_SELECT, TONE_CONTROL_SELECT, DYNAMIC_RANGE, DIGITAL_INPUT_SELECT, ZONE_TOGGLE, CENTER_TRIM, SUB_TRIM, SURROUND_TRIM, CINEMA_EQ_TOGGLE | +| rsx1057 | DSP_TOGGLE, PROLOGIC_TOGGLE, PLII_PANORAMA_TOGGLE, PLII_DIMENSION_UP, PLII_DIMENSION_DOWN, PLII_CENTER_WIDTH_UP, PLII_CENTER_WIDTH_DOWN, DDEX_TOGGLE, NEO6_TOGGLE, NEXT_MODE, TUNE_UP, TUNE_DOWN, PRESET_UP, PRESET_DOWN, FREQUENCY_UP, FREQUENCY_DOWN, MEMORY, BAND_TOGGLE, AM, FM, TUNE_PRESET_TOGGLE, TUNING_MODE_SELECT, PRESET_MODE_SELECT, FREQUENCY_DIRECT, PRESET_SCAN, TUNER_DISPLAY, RDS_PTY, RDS_TP, RDS_TA, FM_MONO_TOGGLE, ZONE2_TUNE_UP, ZONE2_TUNE_DOWN, ZONE2_PRESET_UP, ZONE2_PRESET_DOWN, ZONE2_FREQUENCY_UP, ZONE2_FREQUENCY_DOWN, ZONE2_BAND_TOGGLE, ZONE2_AM, ZONE2_FM, ZONE2_TUNE_PRESET_TOGGLE, ZONE2_TUNING_MODE_SELECT, ZONE2_PRESET_MODE_SELECT, ZONE2_PRESET_SCAN, ZONE2_FM_MONO_TOGGLE, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0, ZONE2_KEY1, ZONE2_KEY2, ZONE2_KEY3, ZONE2_KEY4, ZONE2_KEY5, ZONE2_KEY6, ZONE2_KEY7, ZONE2_KEY8, ZONE2_KEY9, ZONE2_KEY0, MENU, UP, DOWN, LEFT, RIGHT, ENTER, RECORD_FONCTION_SELECT, TONE_CONTROL_SELECT, DYNAMIC_RANGE, DIGITAL_INPUT_SELECT, ZONE_TOGGLE, CENTER_TRIM, SUB_TRIM, SURROUND_TRIM, CINEMA_EQ_TOGGLE | +| rsx1058 | DSP_TOGGLE, PROLOGIC_TOGGLE, PLII_PANORAMA_TOGGLE, PLII_DIMENSION_UP, PLII_DIMENSION_DOWN, PLII_CENTER_WIDTH_UP, PLII_CENTER_WIDTH_DOWN, DDEX_TOGGLE, NEO6_TOGGLE, NEXT_MODE, TUNE_UP, TUNE_DOWN, PRESET_UP, PRESET_DOWN, FREQUENCY_UP, FREQUENCY_DOWN, MEMORY, BAND_TOGGLE, AM, FM, TUNE_PRESET_TOGGLE, TUNING_MODE_SELECT, PRESET_MODE_SELECT, FREQUENCY_DIRECT, PRESET_SCAN, TUNER_DISPLAY, RDS_PTY, RDS_TP, RDS_TA, FM_MONO_TOGGLE, ZONE2_TUNE_UP, ZONE2_TUNE_DOWN, ZONE2_PRESET_UP, ZONE2_PRESET_DOWN, ZONE2_FREQUENCY_UP, ZONE2_FREQUENCY_DOWN, ZONE2_BAND_TOGGLE, ZONE2_AM, ZONE2_FM, ZONE2_TUNE_PRESET_TOGGLE, ZONE2_TUNING_MODE_SELECT, ZONE2_PRESET_MODE_SELECT, ZONE2_PRESET_SCAN, ZONE2_FM_MONO_TOGGLE, ZONE3_TUNE_UP, ZONE3_TUNE_DOWN, ZONE3_PRESET_UP, ZONE3_PRESET_DOWN, ZONE3_FREQUENCY_UP, ZONE3_FREQUENCY_DOWN, ZONE3_BAND_TOGGLE, ZONE3_AM, ZONE3_FM, ZONE3_TUNE_PRESET_TOGGLE, ZONE3_TUNING_MODE_SELECT, ZONE3_PRESET_MODE_SELECT, ZONE3_PRESET_SCAN, ZONE3_FM_MONO_TOGGLE, ZONE4_TUNE_UP, ZONE4_TUNE_DOWN, ZONE4_PRESET_UP, ZONE4_PRESET_DOWN, ZONE4_FREQUENCY_UP, ZONE4_FREQUENCY_DOWN, ZONE4_BAND_TOGGLE, ZONE4_AM, ZONE4_FM, ZONE4_TUNE_PRESET_TOGGLE, ZONE4_TUNING_MODE_SELECT, ZONE4_PRESET_MODE_SELECT, ZONE4_PRESET_SCAN, ZONE4_FM_MONO_TOGGLE, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0, ZONE2_KEY1, ZONE2_KEY2, ZONE2_KEY3, ZONE2_KEY4, ZONE2_KEY5, ZONE2_KEY6, ZONE2_KEY7, ZONE2_KEY8, ZONE2_KEY9, ZONE2_KEY0, ZONE3_KEY1, ZONE3_KEY2, ZONE3_KEY3, ZONE3_KEY4, ZONE3_KEY5, ZONE3_KEY6, ZONE3_KEY7, ZONE3_KEY8, ZONE3_KEY9, ZONE3_KEY0, ZONE4_KEY1, ZONE4_KEY2, ZONE4_KEY3, ZONE4_KEY4, ZONE4_KEY5, ZONE4_KEY6, ZONE4_KEY7, ZONE4_KEY8, ZONE4_KEY9, ZONE4_KEY0, MENU, UP, DOWN, LEFT, RIGHT, ENTER, RECORD_FONCTION_SELECT, TONE_CONTROL_SELECT, DYNAMIC_RANGE, DIGITAL_INPUT_SELECT, ZONE_TOGGLE, CENTER_TRIM, SUB_TRIM, SURROUND_TRIM, CINEMA_EQ_TOGGLE, POWER_OFF_ALL_ZONES, PARTY_MODE_TOGGLE, ZONE2_PARTY_MODE_TOGGLE, ZONE3_PARTY_MODE_TOGGLE, ZONE4_PARTY_MODE_TOGGLE, OUTPUT_RESOLUTION, HDMI_AMP_MODE, HDMI_TV_MODE | +| rsx1065 | DSP_TOGGLE, PROLOGIC_TOGGLE, PLII_PANORAMA_TOGGLE, PLII_DIMENSION_UP, PLII_DIMENSION_DOWN, PLII_CENTER_WIDTH_UP, PLII_CENTER_WIDTH_DOWN, DDEX_TOGGLE, NEO6_TOGGLE, NEXT_MODE, TUNE_UP, TUNE_DOWN, MEMORY, BAND_TOGGLE, AM, FM, TUNE_PRESET_TOGGLE, TUNING_MODE_SELECT, PRESET_MODE_SELECT, FREQUENCY_DIRECT, PRESET_SCAN, TUNER_DISPLAY, RDS_PTY, RDS_TP, RDS_TA, FM_MONO_TOGGLE, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0, MENU, UP, DOWN, LEFT, RIGHT, ENTER, RECORD_FONCTION_SELECT, DYNAMIC_RANGE, DIGITAL_INPUT_SELECT, ZONE_TOGGLE, CENTER_TRIM, SUB_TRIM, SURROUND_TRIM, CINEMA_EQ_TOGGLE | +| rsx1067 | DSP_TOGGLE, PROLOGIC_TOGGLE, PLII_PANORAMA_TOGGLE, PLII_DIMENSION_UP, PLII_DIMENSION_DOWN, PLII_CENTER_WIDTH_UP, PLII_CENTER_WIDTH_DOWN, DDEX_TOGGLE, NEO6_TOGGLE, NEXT_MODE, TUNE_UP, TUNE_DOWN, MEMORY, BAND_TOGGLE, AM, FM, TUNE_PRESET_TOGGLE, TUNING_MODE_SELECT, PRESET_MODE_SELECT, FREQUENCY_DIRECT, PRESET_SCAN, TUNER_DISPLAY, RDS_PTY, RDS_TP, RDS_TA, FM_MONO_TOGGLE, ZONE2_TUNE_UP, ZONE2_TUNE_DOWN, ZONE2_BAND_TOGGLE, ZONE2_AM, ZONE2_FM, ZONE2_TUNE_PRESET_TOGGLE, ZONE2_TUNING_MODE_SELECT, ZONE2_PRESET_MODE_SELECT, ZONE2_PRESET_SCAN, ZONE2_FM_MONO_TOGGLE, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0, ZONE2_KEY1, ZONE2_KEY2, ZONE2_KEY3, ZONE2_KEY4, ZONE2_KEY5, ZONE2_KEY6, ZONE2_KEY7, ZONE2_KEY8, ZONE2_KEY9, ZONE2_KEY0, MENU, UP, DOWN, LEFT, RIGHT, ENTER, RECORD_FONCTION_SELECT, TONE_CONTROL_SELECT, DYNAMIC_RANGE, DIGITAL_INPUT_SELECT, ZONE_TOGGLE, CENTER_TRIM, SUB_TRIM, SURROUND_TRIM, CINEMA_EQ_TOGGLE | +| rsx1550 | DSP_TOGGLE, PROLOGIC_TOGGLE, PLII_PANORAMA_TOGGLE, PLII_DIMENSION_UP, PLII_DIMENSION_DOWN, PLII_CENTER_WIDTH_UP, PLII_CENTER_WIDTH_DOWN, DDEX_TOGGLE, NEO6_TOGGLE, NEXT_MODE, TUNE_UP, TUNE_DOWN, PRESET_UP, PRESET_DOWN, FREQUENCY_UP, FREQUENCY_DOWN, MEMORY, BAND_TOGGLE, AM, FM, TUNE_PRESET_TOGGLE, TUNING_MODE_SELECT, PRESET_MODE_SELECT, FREQUENCY_DIRECT, PRESET_SCAN, TUNER_DISPLAY, RDS_PTY, RDS_TP, RDS_TA, FM_MONO_TOGGLE, ZONE2_TUNE_UP, ZONE2_TUNE_DOWN, ZONE2_PRESET_UP, ZONE2_PRESET_DOWN, ZONE2_FREQUENCY_UP, ZONE2_FREQUENCY_DOWN, ZONE2_BAND_TOGGLE, ZONE2_AM, ZONE2_FM, ZONE2_TUNE_PRESET_TOGGLE, ZONE2_TUNING_MODE_SELECT, ZONE2_PRESET_MODE_SELECT, ZONE2_PRESET_SCAN, ZONE2_FM_MONO_TOGGLE, ZONE3_TUNE_UP, ZONE3_TUNE_DOWN, ZONE3_PRESET_UP, ZONE3_PRESET_DOWN, ZONE3_FREQUENCY_UP, ZONE3_FREQUENCY_DOWN, ZONE3_BAND_TOGGLE, ZONE3_AM, ZONE3_FM, ZONE3_TUNE_PRESET_TOGGLE, ZONE3_TUNING_MODE_SELECT, ZONE3_PRESET_MODE_SELECT, ZONE3_PRESET_SCAN, ZONE3_FM_MONO_TOGGLE, ZONE4_TUNE_UP, ZONE4_TUNE_DOWN, ZONE4_PRESET_UP, ZONE4_PRESET_DOWN, ZONE4_FREQUENCY_UP, ZONE4_FREQUENCY_DOWN, ZONE4_BAND_TOGGLE, ZONE4_AM, ZONE4_FM, ZONE4_TUNE_PRESET_TOGGLE, ZONE4_TUNING_MODE_SELECT, ZONE4_PRESET_MODE_SELECT, ZONE4_PRESET_SCAN, ZONE4_FM_MONO_TOGGLE, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0, ZONE2_KEY1, ZONE2_KEY2, ZONE2_KEY3, ZONE2_KEY4, ZONE2_KEY5, ZONE2_KEY6, ZONE2_KEY7, ZONE2_KEY8, ZONE2_KEY9, ZONE2_KEY0, ZONE3_KEY1, ZONE3_KEY2, ZONE3_KEY3, ZONE3_KEY4, ZONE3_KEY5, ZONE3_KEY6, ZONE3_KEY7, ZONE3_KEY8, ZONE3_KEY9, ZONE3_KEY0, ZONE4_KEY1, ZONE4_KEY2, ZONE4_KEY3, ZONE4_KEY4, ZONE4_KEY5, ZONE4_KEY6, ZONE4_KEY7, ZONE4_KEY8, ZONE4_KEY9, ZONE4_KEY0, MENU, UP, DOWN, LEFT, RIGHT, ENTER, RECORD_FONCTION_SELECT, TONE_CONTROL_SELECT, DYNAMIC_RANGE, DIGITAL_INPUT_SELECT, ZONE_TOGGLE, CENTER_TRIM, SUB_TRIM, SURROUND_TRIM, CINEMA_EQ_TOGGLE, POWER_OFF_ALL_ZONES, PARTY_MODE_TOGGLE, ZONE2_PARTY_MODE_TOGGLE, ZONE3_PARTY_MODE_TOGGLE, ZONE4_PARTY_MODE_TOGGLE, OUTPUT_RESOLUTION, HDMI_AMP_MODE, HDMI_TV_MODE, RESET_FACTORY | +| rsx1560 | DSP_TOGGLE, PROLOGIC_TOGGLE, PLII_PANORAMA_TOGGLE, PLII_DIMENSION_UP, PLII_DIMENSION_DOWN, PLII_CENTER_WIDTH_UP, PLII_CENTER_WIDTH_DOWN, DDEX_TOGGLE, NEO6_TOGGLE, NEXT_MODE, TUNE_UP, TUNE_DOWN, PRESET_UP, PRESET_DOWN, FREQUENCY_UP, FREQUENCY_DOWN, MEMORY, BAND_TOGGLE, AM, FM, TUNE_PRESET_TOGGLE, TUNING_MODE_SELECT, PRESET_MODE_SELECT, FREQUENCY_DIRECT, PRESET_SCAN, TUNER_DISPLAY, RDS_PTY, RDS_TP, RDS_TA, FM_MONO_TOGGLE, ZONE2_TUNE_UP, ZONE2_TUNE_DOWN, ZONE2_PRESET_UP, ZONE2_PRESET_DOWN, ZONE2_FREQUENCY_UP, ZONE2_FREQUENCY_DOWN, ZONE2_BAND_TOGGLE, ZONE2_AM, ZONE2_FM, ZONE2_TUNE_PRESET_TOGGLE, ZONE2_TUNING_MODE_SELECT, ZONE2_PRESET_MODE_SELECT, ZONE2_PRESET_SCAN, ZONE2_FM_MONO_TOGGLE, ZONE3_TUNE_UP, ZONE3_TUNE_DOWN, ZONE3_PRESET_UP, ZONE3_PRESET_DOWN, ZONE3_FREQUENCY_UP, ZONE3_FREQUENCY_DOWN, ZONE3_BAND_TOGGLE, ZONE3_AM, ZONE3_FM, ZONE3_TUNE_PRESET_TOGGLE, ZONE3_TUNING_MODE_SELECT, ZONE3_PRESET_MODE_SELECT, ZONE3_PRESET_SCAN, ZONE3_FM_MONO_TOGGLE, ZONE4_TUNE_UP, ZONE4_TUNE_DOWN, ZONE4_PRESET_UP, ZONE4_PRESET_DOWN, ZONE4_FREQUENCY_UP, ZONE4_FREQUENCY_DOWN, ZONE4_BAND_TOGGLE, ZONE4_AM, ZONE4_FM, ZONE4_TUNE_PRESET_TOGGLE, ZONE4_TUNING_MODE_SELECT, ZONE4_PRESET_MODE_SELECT, ZONE4_PRESET_SCAN, ZONE4_FM_MONO_TOGGLE, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0, ZONE2_KEY1, ZONE2_KEY2, ZONE2_KEY3, ZONE2_KEY4, ZONE2_KEY5, ZONE2_KEY6, ZONE2_KEY7, ZONE2_KEY8, ZONE2_KEY9, ZONE2_KEY0, ZONE3_KEY1, ZONE3_KEY2, ZONE3_KEY3, ZONE3_KEY4, ZONE3_KEY5, ZONE3_KEY6, ZONE3_KEY7, ZONE3_KEY8, ZONE3_KEY9, ZONE3_KEY0, ZONE4_KEY1, ZONE4_KEY2, ZONE4_KEY3, ZONE4_KEY4, ZONE4_KEY5, ZONE4_KEY6, ZONE4_KEY7, ZONE4_KEY8, ZONE4_KEY9, ZONE4_KEY0, MENU, UP, DOWN, LEFT, RIGHT, ENTER, RECORD_FONCTION_SELECT, TONE_CONTROL_SELECT, DYNAMIC_RANGE, DIGITAL_INPUT_SELECT, ZONE_TOGGLE, CENTER_TRIM, SUB_TRIM, SURROUND_TRIM, CINEMA_EQ_TOGGLE, POWER_OFF_ALL_ZONES, PARTY_MODE_TOGGLE, ZONE2_PARTY_MODE_TOGGLE, ZONE3_PARTY_MODE_TOGGLE, ZONE4_PARTY_MODE_TOGGLE, OUTPUT_RESOLUTION, HDMI_AMP_MODE, HDMI_TV_MODE, RESET_FACTORY | +| rsx1562 | DSP_TOGGLE, PROLOGIC_TOGGLE, PLII_PANORAMA_TOGGLE, PLII_DIMENSION_UP, PLII_DIMENSION_DOWN, PLII_CENTER_WIDTH_UP, PLII_CENTER_WIDTH_DOWN, DDEX_TOGGLE, NEO6_TOGGLE, NEXT_MODE, TUNE_UP, TUNE_DOWN, PRESET_UP, PRESET_DOWN, FREQUENCY_UP, FREQUENCY_DOWN, MEMORY, BAND_TOGGLE, AM, FM, TUNE_PRESET_TOGGLE, TUNING_MODE_SELECT, PRESET_MODE_SELECT, FREQUENCY_DIRECT, PRESET_SCAN, TUNER_DISPLAY, RDS_PTY, RDS_TP, RDS_TA, FM_MONO_TOGGLE, ZONE2_TUNE_UP, ZONE2_TUNE_DOWN, ZONE2_PRESET_UP, ZONE2_PRESET_DOWN, ZONE2_FREQUENCY_UP, ZONE2_FREQUENCY_DOWN, ZONE2_BAND_TOGGLE, ZONE2_AM, ZONE2_FM, ZONE2_TUNE_PRESET_TOGGLE, ZONE2_TUNING_MODE_SELECT, ZONE2_PRESET_MODE_SELECT, ZONE2_PRESET_SCAN, ZONE2_FM_MONO_TOGGLE, ZONE3_TUNE_UP, ZONE3_TUNE_DOWN, ZONE3_PRESET_UP, ZONE3_PRESET_DOWN, ZONE3_FREQUENCY_UP, ZONE3_FREQUENCY_DOWN, ZONE3_BAND_TOGGLE, ZONE3_AM, ZONE3_FM, ZONE3_TUNE_PRESET_TOGGLE, ZONE3_TUNING_MODE_SELECT, ZONE3_PRESET_MODE_SELECT, ZONE3_PRESET_SCAN, ZONE3_FM_MONO_TOGGLE, ZONE4_TUNE_UP, ZONE4_TUNE_DOWN, ZONE4_PRESET_UP, ZONE4_PRESET_DOWN, ZONE4_FREQUENCY_UP, ZONE4_FREQUENCY_DOWN, ZONE4_BAND_TOGGLE, ZONE4_AM, ZONE4_FM, ZONE4_TUNE_PRESET_TOGGLE, ZONE4_TUNING_MODE_SELECT, ZONE4_PRESET_MODE_SELECT, ZONE4_PRESET_SCAN, ZONE4_FM_MONO_TOGGLE, KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, KEY9, KEY0, ZONE2_KEY1, ZONE2_KEY2, ZONE2_KEY3, ZONE2_KEY4, ZONE2_KEY5, ZONE2_KEY6, ZONE2_KEY7, ZONE2_KEY8, ZONE2_KEY9, ZONE2_KEY0, ZONE3_KEY1, ZONE3_KEY2, ZONE3_KEY3, ZONE3_KEY4, ZONE3_KEY5, ZONE3_KEY6, ZONE3_KEY7, ZONE3_KEY8, ZONE3_KEY9, ZONE3_KEY0, ZONE4_KEY1, ZONE4_KEY2, ZONE4_KEY3, ZONE4_KEY4, ZONE4_KEY5, ZONE4_KEY6, ZONE4_KEY7, ZONE4_KEY8, ZONE4_KEY9, ZONE4_KEY0, MENU, EXIT, UP_PRESSED, UP_RELEASED, DOWN_PRESSED, DOWN_RELEASED, LEFT_PRESSED, LEFT_RELEASED, RIGHT_PRESSED, RIGHT_RELEASED, ENTER, RECORD_FONCTION_SELECT, TONE_CONTROL_SELECT, DYNAMIC_RANGE, DIGITAL_INPUT_SELECT, ZONE_TOGGLE, CENTER_TRIM, SUB_TRIM, SURROUND_TRIM, CINEMA_EQ_TOGGLE, POWER_OFF_ALL_ZONES, PARTY_MODE_TOGGLE, ZONE2_PARTY_MODE_TOGGLE, ZONE3_PARTY_MODE_TOGGLE, ZONE4_PARTY_MODE_TOGGLE, OUTPUT_RESOLUTION, HDMI_AMP_MODE, HDMI_TV_MODE, ROOM_EQ_TOGGLE, SPEAKER_SETTING_TOGGLE, RESET_FACTORY | +| x3 | PLAY, PAUSE, STOP, TRACK_FWD, TRACK_BACK | +| x5 | PLAY, PAUSE, STOP, TRACK_FWD, TRACK_BACK | ## Full Example diff --git a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/RotelBindingConstants.java b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/RotelBindingConstants.java index 78e94b802eefe..962b4e04ef20a 100644 --- a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/RotelBindingConstants.java +++ b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/RotelBindingConstants.java @@ -146,6 +146,7 @@ public class RotelBindingConstants { public static final String CHANNEL_BALANCE = "balance"; public static final String CHANNEL_SPEAKER_A = "speakera"; public static final String CHANNEL_SPEAKER_B = "speakerb"; + public static final String CHANNEL_OTHER_COMMAND = "otherCommand"; public static final String CHANNEL_GROUP_ALL_ZONES = "allZones"; public static final String CHANNEL_ALL_POWER = CHANNEL_GROUP_ALL_ZONES + "#" + CHANNEL_POWER; @@ -161,6 +162,7 @@ public class RotelBindingConstants { public static final String CHANNEL_MAIN_MUTE = CHANNEL_GROUP_MAIN_ZONE + "#" + CHANNEL_MUTE; public static final String CHANNEL_MAIN_BASS = CHANNEL_GROUP_MAIN_ZONE + "#" + CHANNEL_BASS; public static final String CHANNEL_MAIN_TREBLE = CHANNEL_GROUP_MAIN_ZONE + "#" + CHANNEL_TREBLE; + public static final String CHANNEL_MAIN_OTHER_COMMAND = CHANNEL_GROUP_MAIN_ZONE + "#" + CHANNEL_OTHER_COMMAND; public static final String CHANNEL_GROUP_ZONE1 = "zone1"; public static final String CHANNEL_ZONE1_SOURCE = CHANNEL_GROUP_ZONE1 + "#" + CHANNEL_SOURCE; diff --git a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/RotelCommandDescriptionOptionProvider.java b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/RotelCommandDescriptionOptionProvider.java new file mode 100644 index 0000000000000..7930e987583db --- /dev/null +++ b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/RotelCommandDescriptionOptionProvider.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2010-2022 Contributors to the openHAB project + * + * See the NOTICE file(s) distributed with this work for additional + * information. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + */ +package org.openhab.binding.rotel.internal; + +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.openhab.core.events.EventPublisher; +import org.openhab.core.thing.binding.BaseDynamicCommandDescriptionProvider; +import org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService; +import org.openhab.core.thing.link.ItemChannelLinkRegistry; +import org.openhab.core.thing.type.DynamicCommandDescriptionProvider; +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Reference; + +/** + * Dynamic provider of command options + * + * @author Laurent Garnier - Initial contribution + */ +@Component(service = { DynamicCommandDescriptionProvider.class, RotelCommandDescriptionOptionProvider.class }) +@NonNullByDefault +public class RotelCommandDescriptionOptionProvider extends BaseDynamicCommandDescriptionProvider { + + @Activate + public RotelCommandDescriptionOptionProvider(final @Reference EventPublisher eventPublisher, // + final @Reference ItemChannelLinkRegistry itemChannelLinkRegistry, // + final @Reference ChannelTypeI18nLocalizationService channelTypeI18nLocalizationService) { + this.eventPublisher = eventPublisher; + this.itemChannelLinkRegistry = itemChannelLinkRegistry; + this.channelTypeI18nLocalizationService = channelTypeI18nLocalizationService; + } +} diff --git a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/RotelHandlerFactory.java b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/RotelHandlerFactory.java index f97da711b6af2..d95b5194fd815 100644 --- a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/RotelHandlerFactory.java +++ b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/RotelHandlerFactory.java @@ -56,12 +56,15 @@ public class RotelHandlerFactory extends BaseThingHandlerFactory { private final SerialPortManager serialPortManager; private final RotelStateDescriptionOptionProvider stateDescriptionProvider; + private final RotelCommandDescriptionOptionProvider commandDescriptionProvider; @Activate public RotelHandlerFactory(final @Reference SerialPortManager serialPortManager, - final @Reference RotelStateDescriptionOptionProvider stateDescriptionProvider) { + final @Reference RotelStateDescriptionOptionProvider stateDescriptionProvider, + final @Reference RotelCommandDescriptionOptionProvider commandDescriptionProvider) { this.serialPortManager = serialPortManager; this.stateDescriptionProvider = stateDescriptionProvider; + this.commandDescriptionProvider = commandDescriptionProvider; } @Override @@ -74,7 +77,7 @@ public boolean supportsThingType(ThingTypeUID thingTypeUID) { ThingTypeUID thingTypeUID = thing.getThingTypeUID(); if (SUPPORTED_THING_TYPES_UIDS.contains(thingTypeUID)) { - return new RotelHandler(thing, stateDescriptionProvider, serialPortManager); + return new RotelHandler(thing, stateDescriptionProvider, commandDescriptionProvider, serialPortManager); } return null; diff --git a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/RotelModel.java b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/RotelModel.java index d1656b3cb34ed..d097cc72de85f 100644 --- a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/RotelModel.java +++ b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/RotelModel.java @@ -25,6 +25,8 @@ import org.openhab.binding.rotel.internal.communication.RotelDsp; import org.openhab.binding.rotel.internal.communication.RotelFlagsMapping; import org.openhab.binding.rotel.internal.communication.RotelSource; +import org.openhab.binding.rotel.internal.protocol.RotelProtocol; +import org.openhab.core.types.CommandOption; import org.openhab.core.types.StateOption; /** @@ -35,68 +37,112 @@ @NonNullByDefault public enum RotelModel { - RSP1066("RSP-1066", 19200, 3, 1, false, 90, false, 12, false, ZONE_SELECT, 1, (byte) 0xC2, 13, 8, true, + RSP1066("RSP-1066", 19200, 3, 1, false, 90, false, 12, false, ZONE_SELECT, 1, + concatenate(DSP_CMDS_SET1, MENU2_CTRL_CMDS, OTHER_CMDS_SET1), (byte) 0xC2, 13, 8, true, RotelFlagsMapping.MAPPING1), - RSP1068("RSP-1068", 19200, 1, 1, true, 96, true, 6, false, RECORD_FONCTION_SELECT, 2, (byte) 0xA1, 42, 5, true, + RSP1068("RSP-1068", 19200, 1, 1, true, 96, true, 6, false, RECORD_FONCTION_SELECT, 2, + concatenate(DSP_CMDS_SET1, MENU2_CTRL_CMDS, OTHER_CMDS_SET1), (byte) 0xA1, 42, 5, true, RotelFlagsMapping.MAPPING2), - RSP1069("RSP-1069", 38400, 1, 3, true, 96, true, 6, false, RECORD_FONCTION_SELECT, 2, (byte) 0xA2, 42, 5, true, + RSP1069("RSP-1069", 38400, 1, 3, true, 96, true, 6, false, RECORD_FONCTION_SELECT, 2, + concatenate(DSP_CMDS_SET1, MENU2_CTRL_CMDS, OTHER_CMDS_SET1, OTHER_CMDS_SET2), (byte) 0xA2, 42, 5, true, RotelFlagsMapping.MAPPING5), - RSP1098("RSP-1098", 19200, 1, 1, true, 96, true, 6, false, ZONE_SELECT, 2, (byte) 0xA0, 13, 8, true, - RotelFlagsMapping.MAPPING1), - RSP1570("RSP-1570", 115200, 1, 3, true, 96, true, 6, false, RECORD_FONCTION_SELECT, 3, (byte) 0xA3, 42, 5, true, - RotelFlagsMapping.MAPPING5), - RSP1572("RSP-1572", 115200, 2, 3, true, 96, true, null, false, RECORD_FONCTION_SELECT, 4, (byte) 0xA5, 42, 5, true, - RotelFlagsMapping.MAPPING5), - RSX1055("RSX-1055", 19200, 3, 1, false, 90, false, 12, false, ZONE_SELECT, 1, (byte) 0xC3, 13, 8, true, - RotelFlagsMapping.MAPPING1), - RSX1056("RSX-1056", 19200, 1, 1, true, 96, true, 12, false, ZONE_SELECT, 2, (byte) 0xC5, 13, 8, true, - RotelFlagsMapping.MAPPING1), - RSX1057("RSX-1057", 19200, 1, 1, true, 96, true, 6, false, RECORD_FONCTION_SELECT, 2, (byte) 0xC7, 13, 8, true, - RotelFlagsMapping.MAPPING1), - RSX1058("RSX-1058", 38400, 1, 3, true, 96, true, 6, false, RECORD_FONCTION_SELECT, 2, (byte) 0xC8, 13, 8, true, - RotelFlagsMapping.MAPPING4), - RSX1065("RSX-1065", 19200, 3, 1, false, 96, false, 12, false, ZONE_SELECT, 1, (byte) 0xC1, 42, 5, true, - RotelFlagsMapping.MAPPING2), - RSX1067("RSX-1067", 19200, 1, 1, true, 96, true, 6, false, RECORD_FONCTION_SELECT, 2, (byte) 0xC4, 42, 5, true, - RotelFlagsMapping.MAPPING2), - RSX1550("RSX-1550", 115200, 1, 3, true, 96, true, 6, false, RECORD_FONCTION_SELECT, 3, (byte) 0xC9, 13, 8, true, - RotelFlagsMapping.MAPPING3), - RSX1560("RSX-1560", 115200, 1, 3, true, 96, true, 6, false, RECORD_FONCTION_SELECT, 3, (byte) 0xCA, 42, 5, true, - RotelFlagsMapping.MAPPING5), - RSX1562("RSX-1562", 115200, 2, 3, true, 96, true, null, false, RECORD_FONCTION_SELECT, 4, (byte) 0xCC, 42, 5, true, - RotelFlagsMapping.MAPPING5), - A11("A11", 115200, 4, 96, true, 10, 15, false, -1, false, true, true, 6, 0, NO_SPECIAL_CHARACTERS), - A12("A12", 115200, 5, 96, true, 10, 15, false, -1, true, true, true, 6, 0, NO_SPECIAL_CHARACTERS), - A14("A14", 115200, 5, 96, true, 10, 15, false, -1, true, true, true, 6, 0, NO_SPECIAL_CHARACTERS), - CD11("CD11", 57600, 0, null, false, null, true, -1, false, true, 6, 0, NO_SPECIAL_CHARACTERS), - CD14("CD14", 57600, 0, null, false, null, true, -1, false, true, 6, 0, NO_SPECIAL_CHARACTERS), - RA11("RA-11", 115200, 6, 96, true, 10, 15, true, -1, true, false, false, 6, 0, SPECIAL_CHARACTERS), - RA12("RA-12", 115200, 6, 96, true, 10, 15, true, -1, true, false, false, 6, 0, SPECIAL_CHARACTERS), - RA1570("RA-1570", 115200, 7, 96, true, 10, 15, true, -1, true, true, false, 6, 0, SPECIAL_CHARACTERS), - RA1572("RA-1572", 115200, 8, 96, true, 10, 15, false, -1, true, true, true, 6, 0, SPECIAL_CHARACTERS), - RA1592("RA-1592", 115200, 9, 96, true, 10, 15, false, -1, true, true, true, 6, 0, SPECIAL_CHARACTERS), - RAP1580("RAP-1580", 115200, 11, 96, true, null, false, 5, false, false, -10, 10, NO_SPECIAL_CHARACTERS), - RC1570("RC-1570", 115200, 7, 96, true, 10, 15, true, -1, true, false, false, 6, 0, SPECIAL_CHARACTERS), - RC1572("RC-1572", 115200, 8, 96, true, 10, 15, false, -1, true, false, true, 6, 0, SPECIAL_CHARACTERS), - RC1590("RC-1590", 115200, 9, 96, true, 10, 15, false, -1, true, false, true, 6, 0, SPECIAL_CHARACTERS), - RCD1570("RCD-1570", 115200, 0, null, false, null, true, -1, false, true, 6, 0, SPECIAL_CHARACTERS), - RCD1572("RCD-1572", 57600, 0, null, false, null, true, -1, false, true, 6, 0, SPECIAL_CHARACTERS_RCD1572), - RCX1500("RCX-1500", 115200, 17, 86, true, null, true, -1, false, false, null, null, SPECIAL_CHARACTERS), - RDD1580("RDD-1580", 115200, 15, null, false, null, true, -1, true, false, null, null, NO_SPECIAL_CHARACTERS), - RDG1520("RDG-1520", 115200, 16, null, false, null, true, -1, false, false, null, null, SPECIAL_CHARACTERS), - RSP1576("RSP-1576", 115200, 10, 96, true, null, false, 5, false, false, -10, 10, NO_SPECIAL_CHARACTERS), - RSP1582("RSP-1582", 115200, 11, 96, true, null, false, 6, false, false, -10, 10, NO_SPECIAL_CHARACTERS), - RT11("RT-11", 115200, 12, null, false, null, false, -1, false, true, 6, 0, NO_SPECIAL_CHARACTERS), - RT1570("RT-1570", 115200, 14, null, false, null, false, -1, false, true, 6, 0, NO_SPECIAL_CHARACTERS), - T11("T11", 115200, 12, null, false, null, false, -1, false, true, 6, 0, NO_SPECIAL_CHARACTERS), - T14("T14", 115200, 13, null, false, null, false, -1, false, true, 6, 0, NO_SPECIAL_CHARACTERS), + RSP1098("RSP-1098", 19200, 1, 1, true, 96, true, 6, false, ZONE_SELECT, 2, + concatenate(DSP_CMDS_SET1, MENU2_CTRL_CMDS, OTHER_CMDS_SET1, List.of(REMOTE_VOLUME_UP, REMOTE_VOLUME_DOWN)), + (byte) 0xA0, 13, 8, true, RotelFlagsMapping.MAPPING1), + RSP1570("RSP-1570", 115200, 1, 3, true, 96, true, 6, false, RECORD_FONCTION_SELECT, 3, + concatenate(DSP_CMDS_SET1, MENU2_CTRL_CMDS, OTHER_CMDS_SET1, OTHER_CMDS_SET2, List.of(RESET_FACTORY)), + (byte) 0xA3, 42, 5, true, RotelFlagsMapping.MAPPING5), + RSP1572("RSP-1572", 115200, 2, 3, true, 96, true, null, false, RECORD_FONCTION_SELECT, 4, + concatenate(DSP_CMDS_SET1, NUMERIC_KEY_CMDS, MENU3_CTRL_CMDS, OTHER_CMDS_SET1, OTHER_CMDS_SET4), + (byte) 0xA5, 42, 5, true, RotelFlagsMapping.MAPPING5), + RSX1055("RSX-1055", 19200, 3, 1, false, 90, false, 12, false, ZONE_SELECT, 1, + concatenate(DSP_CMDS_SET1, TUNER_CMDS_SET1, NUMERIC_KEY_CMDS, MENU2_CTRL_CMDS, OTHER_CMDS_SET1), + (byte) 0xC3, 13, 8, true, RotelFlagsMapping.MAPPING1), + RSX1056("RSX-1056", 19200, 1, 1, true, 96, true, 12, false, ZONE_SELECT, 2, + concatenate(DSP_CMDS_SET1, TUNER_CMDS_SET1, ZONE2_TUNER_CMDS_SET1, NUMERIC_KEY_CMDS, ZONE2_NUMERIC_KEY_CMDS, + MENU2_CTRL_CMDS, OTHER_CMDS_SET1), + (byte) 0xC5, 13, 8, true, RotelFlagsMapping.MAPPING1), + RSX1057("RSX-1057", 19200, 1, 1, true, 96, true, 6, false, RECORD_FONCTION_SELECT, 2, + concatenate(DSP_CMDS_SET1, TUNER_CMDS_SET2, ZONE2_TUNER_CMDS_SET2, NUMERIC_KEY_CMDS, ZONE2_NUMERIC_KEY_CMDS, + MENU2_CTRL_CMDS, OTHER_CMDS_SET1), + (byte) 0xC7, 13, 8, true, RotelFlagsMapping.MAPPING1), + RSX1058("RSX-1058", 38400, 1, 3, true, 96, true, 6, false, RECORD_FONCTION_SELECT, 2, + concatenate(DSP_CMDS_SET1, TUNER_CMDS_SET2, ZONE234_TUNER_CMDS_SET1, NUMERIC_KEY_CMDS, + ZONE234_NUMERIC_KEY_CMDS, MENU2_CTRL_CMDS, OTHER_CMDS_SET1, OTHER_CMDS_SET2), + (byte) 0xC8, 13, 8, true, RotelFlagsMapping.MAPPING4), + RSX1065("RSX-1065", 19200, 3, 1, false, 96, false, 12, false, ZONE_SELECT, 1, + concatenate(DSP_CMDS_SET1, TUNER_CMDS_SET1, NUMERIC_KEY_CMDS, MENU2_CTRL_CMDS, OTHER_CMDS_SET3), + (byte) 0xC1, 42, 5, true, RotelFlagsMapping.MAPPING2), + RSX1067("RSX-1067", 19200, 1, 1, true, 96, true, 6, false, RECORD_FONCTION_SELECT, 2, + concatenate(DSP_CMDS_SET1, TUNER_CMDS_SET1, ZONE2_TUNER_CMDS_SET1, NUMERIC_KEY_CMDS, ZONE2_NUMERIC_KEY_CMDS, + MENU2_CTRL_CMDS, OTHER_CMDS_SET1), + (byte) 0xC4, 42, 5, true, RotelFlagsMapping.MAPPING2), + RSX1550("RSX-1550", 115200, 1, 3, true, 96, true, 6, false, RECORD_FONCTION_SELECT, 3, + concatenate(DSP_CMDS_SET1, TUNER_CMDS_SET2, ZONE234_TUNER_CMDS_SET1, NUMERIC_KEY_CMDS, + ZONE234_NUMERIC_KEY_CMDS, MENU2_CTRL_CMDS, OTHER_CMDS_SET1, OTHER_CMDS_SET2, + List.of(RESET_FACTORY)), + (byte) 0xC9, 13, 8, true, RotelFlagsMapping.MAPPING3), + RSX1560("RSX-1560", 115200, 1, 3, true, 96, true, 6, false, RECORD_FONCTION_SELECT, 3, + concatenate(DSP_CMDS_SET1, TUNER_CMDS_SET2, ZONE234_TUNER_CMDS_SET1, NUMERIC_KEY_CMDS, + ZONE234_NUMERIC_KEY_CMDS, MENU2_CTRL_CMDS, OTHER_CMDS_SET1, OTHER_CMDS_SET2, + List.of(RESET_FACTORY)), + (byte) 0xCA, 42, 5, true, RotelFlagsMapping.MAPPING5), + RSX1562("RSX-1562", 115200, 2, 3, true, 96, true, null, false, RECORD_FONCTION_SELECT, 4, + concatenate(DSP_CMDS_SET1, TUNER_CMDS_SET2, ZONE234_TUNER_CMDS_SET1, NUMERIC_KEY_CMDS, + ZONE234_NUMERIC_KEY_CMDS, MENU3_CTRL_CMDS, OTHER_CMDS_SET1, OTHER_CMDS_SET4), + (byte) 0xCC, 42, 5, true, RotelFlagsMapping.MAPPING5), + A11("A11", 115200, 4, 96, true, 10, 15, false, -1, false, true, true, 6, 0, SRC_CTRL_CMDS_SET1, + NO_SPECIAL_CHARACTERS), + A12("A12", 115200, 5, 96, true, 10, 15, false, -1, true, true, true, 6, 0, SRC_CTRL_CMDS_SET1, + NO_SPECIAL_CHARACTERS), + A14("A14", 115200, 5, 96, true, 10, 15, false, -1, true, true, true, 6, 0, SRC_CTRL_CMDS_SET1, + NO_SPECIAL_CHARACTERS), + CD11("CD11", 57600, 0, null, false, null, true, -1, false, true, 6, 0, + concatenate(SRC_CTRL_CMDS_SET3, NUMERIC_KEY_CMDS), NO_SPECIAL_CHARACTERS), + CD14("CD14", 57600, 0, null, false, null, true, -1, false, true, 6, 0, + concatenate(SRC_CTRL_CMDS_SET3, NUMERIC_KEY_CMDS), NO_SPECIAL_CHARACTERS), + RA11("RA-11", 115200, 6, 96, true, 10, 15, true, -1, true, false, false, 6, 0, + concatenate(SRC_CTRL_CMDS_SET2, MENU_CTRL_CMDS, NUMERIC_KEY_CMDS), SPECIAL_CHARACTERS), + RA12("RA-12", 115200, 6, 96, true, 10, 15, true, -1, true, false, false, 6, 0, + concatenate(SRC_CTRL_CMDS_SET2, MENU_CTRL_CMDS, NUMERIC_KEY_CMDS), SPECIAL_CHARACTERS), + RA1570("RA-1570", 115200, 7, 96, true, 10, 15, true, -1, true, true, false, 6, 0, + concatenate(SRC_CTRL_CMDS_SET2, MENU_CTRL_CMDS, NUMERIC_KEY_CMDS, PCUSB_CLASS_CMDS), SPECIAL_CHARACTERS), + RA1572("RA-1572", 115200, 8, 96, true, 10, 15, false, -1, true, true, true, 6, 0, + concatenate(SRC_CTRL_CMDS_SET1, MENU_CTRL_CMDS, PCUSB_CLASS_CMDS, List.of(RESET_FACTORY)), + SPECIAL_CHARACTERS), + RA1592("RA-1592", 115200, 9, 96, true, 10, 15, false, -1, true, true, true, 6, 0, List.of(), SPECIAL_CHARACTERS), + RAP1580("RAP-1580", 115200, 11, 96, true, null, false, 5, false, false, -10, 10, List.of(), NO_SPECIAL_CHARACTERS), + RC1570("RC-1570", 115200, 7, 96, true, 10, 15, true, -1, true, false, false, 6, 0, + concatenate(SRC_CTRL_CMDS_SET2, MENU_CTRL_CMDS, NUMERIC_KEY_CMDS, PCUSB_CLASS_CMDS), SPECIAL_CHARACTERS), + RC1572("RC-1572", 115200, 8, 96, true, 10, 15, false, -1, true, false, true, 6, 0, + concatenate(SRC_CTRL_CMDS_SET1, MENU_CTRL_CMDS, PCUSB_CLASS_CMDS, List.of(RESET_FACTORY)), + SPECIAL_CHARACTERS), + RC1590("RC-1590", 115200, 9, 96, true, 10, 15, false, -1, true, false, true, 6, 0, List.of(), SPECIAL_CHARACTERS), + RCD1570("RCD-1570", 115200, 0, null, false, null, true, -1, false, true, 6, 0, List.of(), SPECIAL_CHARACTERS), + RCD1572("RCD-1572", 57600, 0, null, false, null, true, -1, false, true, 6, 0, + concatenate(SRC_CTRL_CMDS_SET3, List.of(PROGRAM), MENU_CTRL_CMDS, NUMERIC_KEY_CMDS), + SPECIAL_CHARACTERS_RCD1572), + RCX1500("RCX-1500", 115200, 17, 86, true, null, true, -1, false, false, null, null, List.of(), SPECIAL_CHARACTERS), + RDD1580("RDD-1580", 115200, 15, null, false, null, true, -1, true, false, null, null, List.of(), + NO_SPECIAL_CHARACTERS), + RDG1520("RDG-1520", 115200, 16, null, false, null, true, -1, false, false, null, null, List.of(), + SPECIAL_CHARACTERS), + RSP1576("RSP-1576", 115200, 10, 96, true, null, false, 5, false, false, -10, 10, List.of(), NO_SPECIAL_CHARACTERS), + RSP1582("RSP-1582", 115200, 11, 96, true, null, false, 6, false, false, -10, 10, List.of(), NO_SPECIAL_CHARACTERS), + RT11("RT-11", 115200, 12, null, false, null, false, -1, false, true, 6, 0, List.of(), NO_SPECIAL_CHARACTERS), + RT1570("RT-1570", 115200, 14, null, false, null, false, -1, false, true, 6, 0, List.of(), NO_SPECIAL_CHARACTERS), + T11("T11", 115200, 12, null, false, null, false, -1, false, true, 6, 0, List.of(), NO_SPECIAL_CHARACTERS), + T14("T14", 115200, 13, null, false, null, false, -1, false, true, 6, 0, List.of(), NO_SPECIAL_CHARACTERS), C8("C8", 115200, POWER, 21, 3, true, false, 96, true, 10, false, 10, false, null, -1, true, false, true, 4, 0, - (byte) 0, 0, 0, false, RotelFlagsMapping.NO_MAPPING, NO_SPECIAL_CHARACTERS), - M8("M8", 115200, 0, null, false, null, false, -1, false, true, 4, 0, NO_SPECIAL_CHARACTERS), - P5("P5", 115200, 20, 96, true, 10, 10, false, -1, true, false, true, 4, 0, NO_SPECIAL_CHARACTERS), - S5("S5", 115200, 0, null, false, null, false, -1, false, true, 4, 0, NO_SPECIAL_CHARACTERS), - X3("X3", 115200, 18, 96, true, 10, 10, false, -1, true, false, true, 4, 0, NO_SPECIAL_CHARACTERS), - X5("X5", 115200, 19, 96, true, 10, 10, false, -1, true, false, true, 4, 0, NO_SPECIAL_CHARACTERS); + List.of(), (byte) 0, 0, 0, false, RotelFlagsMapping.NO_MAPPING, NO_SPECIAL_CHARACTERS), + M8("M8", 115200, 0, null, false, null, false, -1, false, true, 4, 0, List.of(), NO_SPECIAL_CHARACTERS), + P5("P5", 115200, 20, 96, true, 10, 10, false, -1, true, false, true, 4, 0, SRC_CTRL_CMDS_SET1, + NO_SPECIAL_CHARACTERS), + S5("S5", 115200, 0, null, false, null, false, -1, false, true, 4, 0, List.of(), NO_SPECIAL_CHARACTERS), + X3("X3", 115200, 18, 96, true, 10, 10, false, -1, true, false, true, 4, 0, SRC_CTRL_CMDS_SET1, + NO_SPECIAL_CHARACTERS), + X5("X5", 115200, 19, 96, true, 10, 10, false, -1, true, false, true, 4, 0, SRC_CTRL_CMDS_SET1, + NO_SPECIAL_CHARACTERS); private String name; private int baudRate; @@ -116,6 +162,7 @@ public enum RotelModel { private boolean getDimmerLevelAvailable; private @Nullable Integer diummerLevelMin; private @Nullable Integer diummerLevelMax; + private List otherCommands; private byte deviceId; private int respNbChars; private int respNbFlags; @@ -139,6 +186,7 @@ public enum RotelModel { * @param playControl true if control of source playback is available * @param zoneSelectCmd the command to be used to select a zone * @param dspCategory the category from {@link RotelDsp} + * @param otherCommands the list of other available commands to expose * @param deviceId the device id (value to be used in the messages) * @param respNbChars the number of bytes for the characters in the standard response * @param respNbFlags the number of bytes for the flags in the standard response @@ -147,11 +195,12 @@ public enum RotelModel { */ private RotelModel(String name, int baudRate, int sourceCategory, int nbAdditionalZones, boolean additionalCommands, @Nullable Integer volumeMax, boolean directVolume, @Nullable Integer toneLevelMax, boolean playControl, - @Nullable RotelCommand zoneSelectCmd, int dspCategory, byte deviceId, int respNbChars, int respNbFlags, - boolean charsBeforeFlags, RotelFlagsMapping flagsMapping) { + @Nullable RotelCommand zoneSelectCmd, int dspCategory, List otherCommands, byte deviceId, + int respNbChars, int respNbFlags, boolean charsBeforeFlags, RotelFlagsMapping flagsMapping) { this(name, baudRate, DISPLAY_REFRESH, sourceCategory, nbAdditionalZones, additionalCommands, true, volumeMax, directVolume, toneLevelMax, false, null, playControl, zoneSelectCmd, dspCategory, false, false, false, - null, null, deviceId, respNbChars, respNbFlags, charsBeforeFlags, flagsMapping, NO_SPECIAL_CHARACTERS); + null, null, otherCommands, deviceId, respNbChars, respNbFlags, charsBeforeFlags, flagsMapping, + NO_SPECIAL_CHARACTERS); } /** @@ -169,15 +218,16 @@ private RotelModel(String name, int baudRate, int sourceCategory, int nbAddition * @param getDimmerLevelAvailable true if the command to get the front display dimmer level is available * @param diummerLevelMin the minimum front display dimmer level or null if dimmer control is unavailable * @param diummerLevelMax the maximum front display dimmer level or null if dimmer control is unavailable + * @param otherCommands the list of other available commands to expose * @param specialCharacters the table of special characters that can be found in the standard response message */ private RotelModel(String name, int baudRate, int sourceCategory, @Nullable Integer volumeMax, boolean directVolume, @Nullable Integer toneLevelMax, boolean playControl, int dspCategory, boolean getFrequencyAvailable, boolean getDimmerLevelAvailable, @Nullable Integer diummerLevelMin, @Nullable Integer diummerLevelMax, - byte[][] specialCharacters) { + List otherCommands, byte[][] specialCharacters) { this(name, baudRate, POWER, sourceCategory, 0, false, false, volumeMax, directVolume, toneLevelMax, toneLevelMax != null, null, playControl, null, dspCategory, getFrequencyAvailable, false, - getDimmerLevelAvailable, diummerLevelMin, diummerLevelMax, (byte) 0, 0, 0, false, + getDimmerLevelAvailable, diummerLevelMin, diummerLevelMax, otherCommands, (byte) 0, 0, 0, false, RotelFlagsMapping.NO_MAPPING, specialCharacters); } @@ -198,16 +248,18 @@ private RotelModel(String name, int baudRate, int sourceCategory, @Nullable Inte * @param getDimmerLevelAvailable true if the command to get the front display dimmer level is available * @param diummerLevelMin the minimum front display dimmer level or null if dimmer control is unavailable * @param diummerLevelMax the maximum front display dimmer level or null if dimmer control is unavailable + * @param otherCommands the list of other available commands to expose * @param specialCharacters the table of special characters that can be found in the standard response message */ private RotelModel(String name, int baudRate, int sourceCategory, @Nullable Integer volumeMax, boolean directVolume, @Nullable Integer toneLevelMax, @Nullable Integer balanceLevelMax, boolean playControl, int dspCategory, boolean getFrequencyAvailable, boolean getSpeakerGroupsAvailable, boolean getDimmerLevelAvailable, - @Nullable Integer diummerLevelMin, @Nullable Integer diummerLevelMax, byte[][] specialCharacters) { + @Nullable Integer diummerLevelMin, @Nullable Integer diummerLevelMax, List otherCommands, + byte[][] specialCharacters) { this(name, baudRate, POWER, sourceCategory, 0, false, false, volumeMax, directVolume, toneLevelMax, toneLevelMax != null, balanceLevelMax, playControl, null, dspCategory, getFrequencyAvailable, - getSpeakerGroupsAvailable, getDimmerLevelAvailable, diummerLevelMin, diummerLevelMax, (byte) 0, 0, 0, - false, RotelFlagsMapping.NO_MAPPING, specialCharacters); + getSpeakerGroupsAvailable, getDimmerLevelAvailable, diummerLevelMin, diummerLevelMax, otherCommands, + (byte) 0, 0, 0, false, RotelFlagsMapping.NO_MAPPING, specialCharacters); } /** @@ -233,6 +285,7 @@ private RotelModel(String name, int baudRate, int sourceCategory, @Nullable Inte * @param getDimmerLevelAvailable true if the command to get the front display dimmer level is available * @param diummerLevelMin the minimum front display dimmer level or null if dimmer control is unavailable * @param diummerLevelMax the maximum front display dimmer level or null if dimmer control is unavailable + * @param otherCommands the list of other available commands to expose * @param deviceId the device id (value to be used in the messages) * @param respNbChars the number of bytes for the characters in the standard response * @param respNbFlags the number of bytes for the flags in the standard response @@ -245,8 +298,8 @@ private RotelModel(String name, int baudRate, RotelCommand powerStateCmd, int so @Nullable Integer toneLevelMax, boolean getBypassStatusAvailable, @Nullable Integer balanceLevelMax, boolean playControl, @Nullable RotelCommand zoneSelectCmd, int dspCategory, boolean getFrequencyAvailable, boolean getSpeakerGroupsAvailable, boolean getDimmerLevelAvailable, @Nullable Integer diummerLevelMin, - @Nullable Integer diummerLevelMax, byte deviceId, int respNbChars, int respNbFlags, - boolean charsBeforeFlags, RotelFlagsMapping flagsMapping, byte[][] specialCharacters) { + @Nullable Integer diummerLevelMax, List otherCommands, byte deviceId, int respNbChars, + int respNbFlags, boolean charsBeforeFlags, RotelFlagsMapping flagsMapping, byte[][] specialCharacters) { this.name = name; this.baudRate = baudRate; this.powerStateCmd = powerStateCmd; @@ -267,6 +320,7 @@ private RotelModel(String name, int baudRate, RotelCommand powerStateCmd, int so this.getDimmerLevelAvailable = getDimmerLevelAvailable; this.diummerLevelMin = diummerLevelMin; this.diummerLevelMax = diummerLevelMax; + this.otherCommands = otherCommands; this.deviceId = deviceId; this.respNbChars = respNbChars; this.respNbFlags = respNbFlags; @@ -809,6 +863,37 @@ public RotelDsp getDspFromFeedback(String feedback) throws RotelException { return RotelDsp.getFromFeedback(dspCategory, feedback); } + /** + * Get the list of {@link CommandOption} associated to the available other commands + * + * @param protocol the used protocol for the model + * + * @return the list of {@link CommandOption} associated to the available other commands + */ + public List getOtherCommandsOptions(RotelProtocol protocol) { + List options = new ArrayList<>(); + for (RotelCommand cmd : otherCommands) { + switch (protocol) { + case HEX: + if (cmd.getHexType() != 0) { + options.add(new CommandOption(cmd.name(), cmd.getLabel())); + } + break; + case ASCII_V1: + if (cmd.getAsciiCommandV1() != null) { + options.add(new CommandOption(cmd.name(), cmd.getLabel())); + } + break; + case ASCII_V2: + if (cmd.getAsciiCommandV2() != null) { + options.add(new CommandOption(cmd.name(), cmd.getLabel())); + } + break; + } + } + return options; + } + /** * Get the model associated to a name * diff --git a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelCommand.java b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelCommand.java index 742e9fe108bfa..f625feb1a300f 100644 --- a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelCommand.java +++ b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelCommand.java @@ -14,6 +14,11 @@ import static org.openhab.binding.rotel.internal.RotelBindingConstants.*; +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; + import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; import org.openhab.binding.rotel.internal.RotelException; @@ -29,6 +34,7 @@ public enum RotelCommand { POWER_TOGGLE("Power Toggle", PRIMARY_CMD, (byte) 0x0A, "power_toggle", "power_toggle"), POWER_OFF("Power Off", PRIMARY_CMD, (byte) 0x4A, "power_off", "power_off"), POWER_ON("Power On", PRIMARY_CMD, (byte) 0x4B, "power_on", "power_on"), + POWER_OFF_ALL_ZONES("Power Off All Zones", PRIMARY_CMD, (byte) 0x71), POWER("Request current power status", "get_current_power", "power?"), ZONE_SELECT("Zone Select", PRIMARY_CMD, (byte) 0x23), MAIN_ZONE_POWER_TOGGLE("Main Zone Power Toggle", MAIN_ZONE_CMD, (byte) 0x0A), @@ -49,6 +55,8 @@ public enum RotelCommand { VOLUME_GET("Request current volume level", "get_volume", "volume?"), VOLUME_GET_MIN("Request Min volume level", "get_volume_min", null), VOLUME_GET_MAX("Request Max volume level", "get_volume_max", null), + REMOTE_VOLUME_UP("Remote Volume Up", PRIMARY_CMD, (byte) 0x00), + REMOTE_VOLUME_DOWN("Remote Volume Down", PRIMARY_CMD, (byte) 0x01), MUTE_TOGGLE("Mute Toggle", PRIMARY_CMD, (byte) 0x1E, "mute", "mute"), MUTE_ON("Mute On", "mute_on", "mute_on"), MUTE_OFF("Mute Off", "mute_off", "mute_off"), @@ -212,20 +220,30 @@ public enum RotelCommand { STEREO7("7 Channel Stereo", PRIMARY_CMD, (byte) 0x5C, "7channel", "7channel"), STEREO9("9 Channel Stereo", "9channel", "9channel"), STEREO11("11 Channel Stereo", "11channel", "11channel"), + DSP_TOGGLE("DSP Mode Toggle", PRIMARY_CMD, (byte) 0x14), DSP1("DSP 1", PRIMARY_CMD, (byte) 0x57), DSP2("DSP 2", PRIMARY_CMD, (byte) 0x58), DSP3("DSP 3", PRIMARY_CMD, (byte) 0x59), DSP4("DSP 4", PRIMARY_CMD, (byte) 0x5A), + PROLOGIC_TOGGLE("Dolby 3 Stereo / Pro Logic Toggle", PRIMARY_CMD, (byte) 0x53), PROLOGIC("Dolby Pro Logic", PRIMARY_CMD, (byte) 0x5F), PLII_CINEMA("Dolby PLII Cinema", PRIMARY_CMD, (byte) 0x5D, "prologic_movie", "prologic_movie"), PLII_MUSIC("Dolby PLII Music", PRIMARY_CMD, (byte) 0x5E, "prologic_music", "prologic_music"), PLII_GAME("Dolby PLII Game", PRIMARY_CMD, (byte) 0x74, "prologic_game", "prologic_game"), PLIIZ("Dolby PLIIz", PRIMARY_CMD, (byte) 0x92, "prologic_iiz", "prologic_iiz"), + PLII_PANORAMA_TOGGLE("PLII Panorama Toggle", PRIMARY_CMD, (byte) 0x62), + PLII_DIMENSION_UP("PLII Dimension Up", PRIMARY_CMD, (byte) 0x63), + PLII_DIMENSION_DOWN("PLII Dimension Down", PRIMARY_CMD, (byte) 0x64), + PLII_CENTER_WIDTH_UP("PLII Center Width Up", PRIMARY_CMD, (byte) 0x65), + PLII_CENTER_WIDTH_DOWN("PLII Center Width Down", PRIMARY_CMD, (byte) 0x66), + DDEX_TOGGLE("Dolby Digital EX Toggle", PRIMARY_CMD, (byte) 0x68), + NEO6_TOGGLE("dts Neo:6 Music/Cinema Toggle", PRIMARY_CMD, (byte) 0x54), NEO6_MUSIC("dts Neo:6 Music", PRIMARY_CMD, (byte) 0x60, "neo6_music", "neo6_music"), NEO6_CINEMA("dts Neo:6 Cinema", PRIMARY_CMD, (byte) 0x61, "neo6_cinema", "neo6_cinema"), ATMOS("Dolby Atmos", "dolby_atmos", "dolby_atmos"), NEURAL_X("dts Neural:X", "dts_neural", "dts_neural"), BYPASS("Analog Bypass", PRIMARY_CMD, (byte) 0x11, "bypass", "bypass"), + NEXT_MODE("Next Surround Mode", PRIMARY_CMD, (byte) 0x22), DSP_MODE("Request current DSP mode", "get_dsp_mode", null), TONE_MAX("Request Max tone level", "get_tone_max", null), TONE_CONTROL_SELECT("Tone Control Select", PRIMARY_CMD, (byte) 0x67), @@ -271,9 +289,13 @@ public enum RotelCommand { RANDOM_MODE("Request current random play mode", null, "rnd?"), REPEAT_TOGGLE("Repeat Play Mode Toggle", PRIMARY_CMD, (byte) 0x26, "repeat", "rpt"), REPEAT_MODE("Request current repeat play mode", null, "rpt?"), - TRACK_FORWARD("Track Forward", PRIMARY_CMD, (byte) 0x09, "track_fwd", "trkf"), - TRACK_BACKWORD("Track Backward", PRIMARY_CMD, (byte) 0x08, "track_back", "trkb"), + TRACK_FWD("Track Forward/Tune Up", PRIMARY_CMD, (byte) 0x09, "track_fwd", "trkf"), + TRACK_BACK("Track Backward/Tune Down", PRIMARY_CMD, (byte) 0x08, "track_back", "trkb"), + FAST_FWD("Fast Forward/Search Forward", PRIMARY_CMD, (byte) 0x0B, "fast_fwd", "ff"), + FAST_BACK("Fast Backward/Search Backward", PRIMARY_CMD, (byte) 0x0A, "fast_back", "fb"), TRACK("Request current CD track number", null, "track?"), + EJECT("Eject CD", "eject", "eject"), + TIME_TOGGLE("Toggle CD Time Display", "time", "time"), FREQUENCY("Request current frequency for digital source input", "get_current_freq", "freq?"), DISPLAY_REFRESH("Display Refresh", PRIMARY_CMD, (byte) 0xFF), DIMMER_LEVEL_GET("Request current front display dimmer level", "get_current_dimmer", "dimmer?"), @@ -309,12 +331,211 @@ public enum RotelCommand { SPEAKER_B_ON("Set Speaker B Output", "speaker_b_on", "speaker_b_on"), SPEAKER_B_OFF("Unset Speaker B Output", "speaker_b_off", "speaker_b_off"), SPEAKER("Request current active speaker outputs", "get_current_speaker", "speaker?"), + TUNE_UP("Tune Up", PRIMARY_CMD, (byte) 0x28), + TUNE_DOWN("Tune Down", PRIMARY_CMD, (byte) 0x29), + PRESET_UP("Preset Up", PRIMARY_CMD, (byte) 0x6F), + PRESET_DOWN("Preset Down", PRIMARY_CMD, (byte) 0x70), + FREQUENCY_UP("Frequency Up", PRIMARY_CMD, (byte) 0x72), + FREQUENCY_DOWN("Frequency Down", PRIMARY_CMD, (byte) 0x73), + MEMORY("Memory", PRIMARY_CMD, (byte) 0x27), + BAND_TOGGLE("Band Toggle", PRIMARY_CMD, (byte) 0x24), + AM("AM", PRIMARY_CMD, (byte) 0x56), + FM("FM", PRIMARY_CMD, (byte) 0x55), + TUNE_PRESET_TOGGLE("Tune / Preset", PRIMARY_CMD, (byte) 0x20), + TUNING_MODE_SELECT("Tuning Mode Select", PRIMARY_CMD, (byte) 0x69), + PRESET_MODE_SELECT("Preset Mode Select", PRIMARY_CMD, (byte) 0x6A), + FREQUENCY_DIRECT("Frequency Direct", PRIMARY_CMD, (byte) 0x25), + PRESET_SCAN("Preset Scan", PRIMARY_CMD, (byte) 0x21), + TUNER_DISPLAY("Tuner Display", PRIMARY_CMD, (byte) 0x44), + RDS_PTY("RDS PTY", PRIMARY_CMD, (byte) 0x45), + RDS_TP("RDS TP", PRIMARY_CMD, (byte) 0x46), + RDS_TA("RDS TA", PRIMARY_CMD, (byte) 0x47), + FM_MONO_TOGGLE("FM Mono", PRIMARY_CMD, (byte) 0x26), + ZONE2_TUNE_UP("Zone 2 Tune Up", ZONE2_CMD, (byte) 0x28), + ZONE2_TUNE_DOWN("Zone 2 Tune Down", ZONE2_CMD, (byte) 0x29), + ZONE2_PRESET_UP("Zone 2 Preset Up", ZONE2_CMD, (byte) 0x6F), + ZONE2_PRESET_DOWN("Zone 2 Preset Down", ZONE2_CMD, (byte) 0x70), + ZONE2_FREQUENCY_UP("Zone 2 Frequency Up", ZONE2_CMD, (byte) 0x72), + ZONE2_FREQUENCY_DOWN("Zone 2 Frequency Down", ZONE2_CMD, (byte) 0x73), + ZONE2_BAND_TOGGLE("Zone 2 Band Toggle", ZONE2_CMD, (byte) 0x24), + ZONE2_AM("Zone 2 AM", ZONE2_CMD, (byte) 0x56), + ZONE2_FM("Zone 2 FM", ZONE2_CMD, (byte) 0x55), + ZONE2_TUNE_PRESET_TOGGLE("Zone 2 Tune / Preset", ZONE2_CMD, (byte) 0x20), + ZONE2_TUNING_MODE_SELECT("Zone 2 Tuning Mode Select", ZONE2_CMD, (byte) 0x69), + ZONE2_PRESET_MODE_SELECT("Zone 2 Preset Mode Select", ZONE2_CMD, (byte) 0x6A), + ZONE2_PRESET_SCAN("Zone 2 Preset Scan", ZONE2_CMD, (byte) 0x21), + ZONE2_FM_MONO_TOGGLE("Zone 2 FM Mono", ZONE2_CMD, (byte) 0x26), + ZONE3_TUNE_UP("Zone 3 Tune Up", ZONE3_CMD, (byte) 0x28), + ZONE3_TUNE_DOWN("Zone 3 Tune Down", ZONE3_CMD, (byte) 0x29), + ZONE3_PRESET_UP("Zone 3 Preset Up", ZONE3_CMD, (byte) 0x6F), + ZONE3_PRESET_DOWN("Zone 3 Preset Down", ZONE3_CMD, (byte) 0x70), + ZONE3_FREQUENCY_UP("Zone 3 Frequency Up", ZONE3_CMD, (byte) 0x72), + ZONE3_FREQUENCY_DOWN("Zone 3 Frequency Down", ZONE3_CMD, (byte) 0x73), + ZONE3_BAND_TOGGLE("Zone 3 Band Toggle", ZONE3_CMD, (byte) 0x24), + ZONE3_AM("Zone 3 AM", ZONE3_CMD, (byte) 0x56), + ZONE3_FM("Zone 3 FM", ZONE3_CMD, (byte) 0x55), + ZONE3_TUNE_PRESET_TOGGLE("Zone 3 Tune / Preset", ZONE3_CMD, (byte) 0x20), + ZONE3_TUNING_MODE_SELECT("Zone 3 Tuning Mode Select", ZONE3_CMD, (byte) 0x69), + ZONE3_PRESET_MODE_SELECT("Zone 3 Preset Mode Select", ZONE3_CMD, (byte) 0x6A), + ZONE3_PRESET_SCAN("Zone 3 Preset Scan", ZONE3_CMD, (byte) 0x21), + ZONE3_FM_MONO_TOGGLE("Zone 3 FM Mono", ZONE3_CMD, (byte) 0x26), + ZONE4_TUNE_UP("Zone 4 Tune Up", ZONE4_CMD, (byte) 0x28), + ZONE4_TUNE_DOWN("Zone 4 Tune Down", ZONE4_CMD, (byte) 0x29), + ZONE4_PRESET_UP("Zone 4 Preset Up", ZONE4_CMD, (byte) 0x6F), + ZONE4_PRESET_DOWN("Zone 4 Preset Down", ZONE4_CMD, (byte) 0x70), + ZONE4_FREQUENCY_UP("Zone 4 Frequency Up", ZONE4_CMD, (byte) 0x72), + ZONE4_FREQUENCY_DOWN("Zone 4 Frequency Down", ZONE4_CMD, (byte) 0x73), + ZONE4_BAND_TOGGLE("Zone 4 Band Toggle", ZONE4_CMD, (byte) 0x24), + ZONE4_AM("Zone 4 AM", ZONE4_CMD, (byte) 0x56), + ZONE4_FM("Zone 4 FM", ZONE4_CMD, (byte) 0x55), + ZONE4_TUNE_PRESET_TOGGLE("Zone 4 Tune / Preset", ZONE4_CMD, (byte) 0x20), + ZONE4_TUNING_MODE_SELECT("Zone 4 Tuning Mode Select", ZONE4_CMD, (byte) 0x69), + ZONE4_PRESET_MODE_SELECT("Zone 4 Preset Mode Select", ZONE4_CMD, (byte) 0x6A), + ZONE4_PRESET_SCAN("Zone 4 Preset Scan", ZONE4_CMD, (byte) 0x21), + ZONE4_FM_MONO_TOGGLE("Zone 4 FM Mono", ZONE4_CMD, (byte) 0x26), + MENU("Display the Menu", PRIMARY_CMD, (byte) 0x18, "menu", null), + EXIT("Exit Key", PRIMARY_CMD, (byte) 0x90, "exit", null), + UP("Cursor Up", PRIMARY_CMD, (byte) 0x1C, "up", null), + UP_PRESSED("Cursor Up – Key Pressed", PRIMARY_CMD, (byte) 0x1C), + UP_RELEASED("Cursor Up – Key Released", (byte) 0x11, (byte) 0x1C), + DOWN("Cursor Down", PRIMARY_CMD, (byte) 0x1D, "down", null), + DOWN_PRESSED("Cursor Down – Key Pressed", PRIMARY_CMD, (byte) 0x1D), + DOWN_RELEASED("Cursor Down – Key Released", (byte) 0x11, (byte) 0x1D), + LEFT("Cursor Left", PRIMARY_CMD, (byte) 0x1B, "left", null), + LEFT_PRESSED("Cursor Left – Key Pressed", PRIMARY_CMD, (byte) 0x1B), + LEFT_RELEASED("Cursor Left – Key Released", (byte) 0x11, (byte) 0x1B), + RIGHT("Cursor Right", PRIMARY_CMD, (byte) 0x1A, "right", null), + ENTER("Enter Key", PRIMARY_CMD, (byte) 0x19, "enter", null), + RIGHT_PRESSED("Cursor Right – Key Pressed", PRIMARY_CMD, (byte) 0x1A), + RIGHT_RELEASED("Cursor Right – Key Released", (byte) 0x11, (byte) 0x1A), + KEY1("Number Key 1", PRIMARY_CMD, (byte) 0x2A, "1", "1"), + KEY2("Number Key 2", PRIMARY_CMD, (byte) 0x2B, "2", "2"), + KEY3("Number Key 3", PRIMARY_CMD, (byte) 0x2C, "3", "3"), + KEY4("Number Key 4", PRIMARY_CMD, (byte) 0x2D, "4", "4"), + KEY5("Number Key 5", PRIMARY_CMD, (byte) 0x2E, "5", "5"), + KEY6("Number Key 6", PRIMARY_CMD, (byte) 0x2F, "6", "6"), + KEY7("Number Key 7", PRIMARY_CMD, (byte) 0x30, "7", "7"), + KEY8("Number Key 8", PRIMARY_CMD, (byte) 0x31, "8", "8"), + KEY9("Number Key 9", PRIMARY_CMD, (byte) 0x32, "9", "9"), + KEY0("Number Key 0", PRIMARY_CMD, (byte) 0x33, "0", "0"), + ZONE2_KEY1("Zone 2 Number Key 1", ZONE2_CMD, (byte) 0x2A), + ZONE2_KEY2("Zone 2 Number Key 2", ZONE2_CMD, (byte) 0x2B), + ZONE2_KEY3("Zone 2 Number Key 3", ZONE2_CMD, (byte) 0x2C), + ZONE2_KEY4("Zone 2 Number Key 4", ZONE2_CMD, (byte) 0x2D), + ZONE2_KEY5("Zone 2 Number Key 5", ZONE2_CMD, (byte) 0x2E), + ZONE2_KEY6("Zone 2 Number Key 6", ZONE2_CMD, (byte) 0x2F), + ZONE2_KEY7("Zone 2 Number Key 7", ZONE2_CMD, (byte) 0x30), + ZONE2_KEY8("Zone 2 Number Key 8", ZONE2_CMD, (byte) 0x31), + ZONE2_KEY9("Zone 2 Number Key 9", ZONE2_CMD, (byte) 0x32), + ZONE2_KEY0("Zone 2 Number Key 0", ZONE2_CMD, (byte) 0x33), + ZONE3_KEY1("Zone 3 Number Key 1", ZONE3_CMD, (byte) 0x2A), + ZONE3_KEY2("Zone 3 Number Key 2", ZONE3_CMD, (byte) 0x2B), + ZONE3_KEY3("Zone 3 Number Key 3", ZONE3_CMD, (byte) 0x2C), + ZONE3_KEY4("Zone 3 Number Key 4", ZONE3_CMD, (byte) 0x2D), + ZONE3_KEY5("Zone 3 Number Key 5", ZONE3_CMD, (byte) 0x2E), + ZONE3_KEY6("Zone 3 Number Key 6", ZONE3_CMD, (byte) 0x2F), + ZONE3_KEY7("Zone 3 Number Key 7", ZONE3_CMD, (byte) 0x30), + ZONE3_KEY8("Zone 3 Number Key 8", ZONE3_CMD, (byte) 0x31), + ZONE3_KEY9("Zone 3 Number Key 9", ZONE3_CMD, (byte) 0x32), + ZONE3_KEY0("Zone 3 Number Key 0", ZONE3_CMD, (byte) 0x33), + ZONE4_KEY1("Zone 4 Number Key 1", ZONE4_CMD, (byte) 0x2A), + ZONE4_KEY2("Zone 4 Number Key 2", ZONE4_CMD, (byte) 0x2B), + ZONE4_KEY3("Zone 4 Number Key 3", ZONE4_CMD, (byte) 0x2C), + ZONE4_KEY4("Zone 4 Number Key 4", ZONE4_CMD, (byte) 0x2D), + ZONE4_KEY5("Zone 4 Number Key 5", ZONE4_CMD, (byte) 0x2E), + ZONE4_KEY6("Zone 4 Number Key 6", ZONE4_CMD, (byte) 0x2F), + ZONE4_KEY7("Zone 4 Number Key 7", ZONE4_CMD, (byte) 0x30), + ZONE4_KEY8("Zone 4 Number Key 8", ZONE4_CMD, (byte) 0x31), + ZONE4_KEY9("Zone 4 Number Key 9", ZONE4_CMD, (byte) 0x32), + ZONE4_KEY0("Zone 4 Number Key 0", ZONE4_CMD, (byte) 0x33), + PROGRAM("Program Key", "program", null), + PCUSB_CLASS_1("Set PC-USB Audio Class to 1.0", "pcusb_class_1", "pcusb_class_1"), + PCUSB_CLASS_2("Set PC-USB Audio Class to 2.0", "pcusb_class_2", "pcusb_class_2"), + PCUSB_CLASS_GET("Request current PC-USB class", "get_pcusb_class", "pcusb?"), + RESET_FACTORY("Reset unit to factory defaults", PRIMARY_CMD, (byte) 0x93, "factory_default_on", + "factory_default_on"), + DYNAMIC_RANGE("Dynamic Range", PRIMARY_CMD, (byte) 0x16), + DIGITAL_INPUT_SELECT("Digital Input Select", PRIMARY_CMD, (byte) 0x1F), + ZONE_TOGGLE("Zone Toggle", PRIMARY_CMD, (byte) 0x23), + CENTER_TRIM("Temporary Center Trim", PRIMARY_CMD, (byte) 0x4C), + SUB_TRIM("Temporary Subwoofer Trim", PRIMARY_CMD, (byte) 0x4D), + SURROUND_TRIM("Temporary Surround Trim", PRIMARY_CMD, (byte) 0x4E), + CINEMA_EQ_TOGGLE("Cinema EQ Toggle", PRIMARY_CMD, (byte) 0x4F), + DISPLAY_TOGGLE("Front Display On/Off", PRIMARY_CMD, (byte) 0x52), + PARTY_MODE_TOGGLE("Party Mode Toggle", PRIMARY_CMD, (byte) 0x6E), + ZONE2_PARTY_MODE_TOGGLE("Zone 2 Party Mode Toggle", ZONE2_CMD, (byte) 0x6E), + ZONE3_PARTY_MODE_TOGGLE("Zone 3 Party Mode Toggle", ZONE3_CMD, (byte) 0x6E), + ZONE4_PARTY_MODE_TOGGLE("Zone 4 Party Mode Toggle", ZONE4_CMD, (byte) 0x6E), + OUTPUT_RESOLUTION("Output Resolution", PRIMARY_CMD, (byte) 0x75), + HDMI_AMP_MODE("HDMI Amp Mode", PRIMARY_CMD, (byte) 0x78), + HDMI_TV_MODE("HDMI TV Mode", PRIMARY_CMD, (byte) 0x79), + ROOM_EQ_TOGGLE("Temporary Room EQ Toggle", PRIMARY_CMD, (byte) 0x67), + SPEAKER_SETTING_TOGGLE("Speaker Level Setting Toggle", PRIMARY_CMD, (byte) 0xA1), MODEL("Request the model number", null, "model?"), VERSION("Request the main CPU software version", null, "version?"); + public static final List DSP_CMDS_SET1 = List.of(DSP_TOGGLE, PROLOGIC_TOGGLE, PLII_PANORAMA_TOGGLE, + PLII_DIMENSION_UP, PLII_DIMENSION_DOWN, PLII_CENTER_WIDTH_UP, PLII_CENTER_WIDTH_DOWN, DDEX_TOGGLE, + NEO6_TOGGLE, NEXT_MODE); + + public static final List SRC_CTRL_CMDS_SET1 = List.of(PLAY, STOP, PAUSE, TRACK_FWD, TRACK_BACK); + public static final List SRC_CTRL_CMDS_SET2 = List.of(FAST_FWD, FAST_BACK, RANDOM_TOGGLE, + REPEAT_TOGGLE); + public static final List SRC_CTRL_CMDS_SET3 = List.of(FAST_FWD, FAST_BACK, EJECT, TIME_TOGGLE); + + public static final List TUNER_CMDS_SET1 = List.of(TUNE_UP, TUNE_DOWN, MEMORY, BAND_TOGGLE, AM, FM, + TUNE_PRESET_TOGGLE, TUNING_MODE_SELECT, PRESET_MODE_SELECT, FREQUENCY_DIRECT, PRESET_SCAN, TUNER_DISPLAY, + RDS_PTY, RDS_TP, RDS_TA, FM_MONO_TOGGLE); + public static final List TUNER_CMDS_SET2 = List.of(TUNE_UP, TUNE_DOWN, PRESET_UP, PRESET_DOWN, + FREQUENCY_UP, FREQUENCY_DOWN, MEMORY, BAND_TOGGLE, AM, FM, TUNE_PRESET_TOGGLE, TUNING_MODE_SELECT, + PRESET_MODE_SELECT, FREQUENCY_DIRECT, PRESET_SCAN, TUNER_DISPLAY, RDS_PTY, RDS_TP, RDS_TA, FM_MONO_TOGGLE); + public static final List ZONE2_TUNER_CMDS_SET1 = List.of(ZONE2_TUNE_UP, ZONE2_TUNE_DOWN, + ZONE2_BAND_TOGGLE, ZONE2_AM, ZONE2_FM, ZONE2_TUNE_PRESET_TOGGLE, ZONE2_TUNING_MODE_SELECT, + ZONE2_PRESET_MODE_SELECT, ZONE2_PRESET_SCAN, ZONE2_FM_MONO_TOGGLE); + public static final List ZONE2_TUNER_CMDS_SET2 = List.of(ZONE2_TUNE_UP, ZONE2_TUNE_DOWN, + ZONE2_PRESET_UP, ZONE2_PRESET_DOWN, ZONE2_FREQUENCY_UP, ZONE2_FREQUENCY_DOWN, ZONE2_BAND_TOGGLE, ZONE2_AM, + ZONE2_FM, ZONE2_TUNE_PRESET_TOGGLE, ZONE2_TUNING_MODE_SELECT, ZONE2_PRESET_MODE_SELECT, ZONE2_PRESET_SCAN, + ZONE2_FM_MONO_TOGGLE); + public static final List ZONE234_TUNER_CMDS_SET1 = List.of(ZONE2_TUNE_UP, ZONE2_TUNE_DOWN, + ZONE2_PRESET_UP, ZONE2_PRESET_DOWN, ZONE2_FREQUENCY_UP, ZONE2_FREQUENCY_DOWN, ZONE2_BAND_TOGGLE, ZONE2_AM, + ZONE2_FM, ZONE2_TUNE_PRESET_TOGGLE, ZONE2_TUNING_MODE_SELECT, ZONE2_PRESET_MODE_SELECT, ZONE2_PRESET_SCAN, + ZONE2_FM_MONO_TOGGLE, ZONE3_TUNE_UP, ZONE3_TUNE_DOWN, ZONE3_PRESET_UP, ZONE3_PRESET_DOWN, + ZONE3_FREQUENCY_UP, ZONE3_FREQUENCY_DOWN, ZONE3_BAND_TOGGLE, ZONE3_AM, ZONE3_FM, ZONE3_TUNE_PRESET_TOGGLE, + ZONE3_TUNING_MODE_SELECT, ZONE3_PRESET_MODE_SELECT, ZONE3_PRESET_SCAN, ZONE3_FM_MONO_TOGGLE, ZONE4_TUNE_UP, + ZONE4_TUNE_DOWN, ZONE4_PRESET_UP, ZONE4_PRESET_DOWN, ZONE4_FREQUENCY_UP, ZONE4_FREQUENCY_DOWN, + ZONE4_BAND_TOGGLE, ZONE4_AM, ZONE4_FM, ZONE4_TUNE_PRESET_TOGGLE, ZONE4_TUNING_MODE_SELECT, + ZONE4_PRESET_MODE_SELECT, ZONE4_PRESET_SCAN, ZONE4_FM_MONO_TOGGLE); + + public static final List MENU_CTRL_CMDS = List.of(MENU, EXIT, UP, DOWN, LEFT, RIGHT, ENTER); + public static final List MENU2_CTRL_CMDS = List.of(MENU, UP, DOWN, LEFT, RIGHT, ENTER); + public static final List MENU3_CTRL_CMDS = List.of(MENU, EXIT, UP_PRESSED, UP_RELEASED, DOWN_PRESSED, + DOWN_RELEASED, LEFT_PRESSED, LEFT_RELEASED, RIGHT_PRESSED, RIGHT_RELEASED, ENTER); + + public static final List NUMERIC_KEY_CMDS = List.of(KEY1, KEY2, KEY3, KEY4, KEY5, KEY6, KEY7, KEY8, + KEY9, KEY0); + public static final List ZONE2_NUMERIC_KEY_CMDS = List.of(ZONE2_KEY1, ZONE2_KEY2, ZONE2_KEY3, + ZONE2_KEY4, ZONE2_KEY5, ZONE2_KEY6, ZONE2_KEY7, ZONE2_KEY8, ZONE2_KEY9, ZONE2_KEY0); + public static final List ZONE234_NUMERIC_KEY_CMDS = List.of(ZONE2_KEY1, ZONE2_KEY2, ZONE2_KEY3, + ZONE2_KEY4, ZONE2_KEY5, ZONE2_KEY6, ZONE2_KEY7, ZONE2_KEY8, ZONE2_KEY9, ZONE2_KEY0, ZONE3_KEY1, ZONE3_KEY2, + ZONE3_KEY3, ZONE3_KEY4, ZONE3_KEY5, ZONE3_KEY6, ZONE3_KEY7, ZONE3_KEY8, ZONE3_KEY9, ZONE3_KEY0, ZONE4_KEY1, + ZONE4_KEY2, ZONE4_KEY3, ZONE4_KEY4, ZONE4_KEY5, ZONE4_KEY6, ZONE4_KEY7, ZONE4_KEY8, ZONE4_KEY9, ZONE4_KEY0); + + public static final List PCUSB_CLASS_CMDS = List.of(PCUSB_CLASS_1, PCUSB_CLASS_2); + + public static final List OTHER_CMDS_SET1 = List.of(RECORD_FONCTION_SELECT, TONE_CONTROL_SELECT, + DYNAMIC_RANGE, DIGITAL_INPUT_SELECT, ZONE_TOGGLE, CENTER_TRIM, SUB_TRIM, SURROUND_TRIM, CINEMA_EQ_TOGGLE); + public static final List OTHER_CMDS_SET2 = List.of(POWER_OFF_ALL_ZONES, PARTY_MODE_TOGGLE, + ZONE2_PARTY_MODE_TOGGLE, ZONE3_PARTY_MODE_TOGGLE, ZONE4_PARTY_MODE_TOGGLE, OUTPUT_RESOLUTION, HDMI_AMP_MODE, + HDMI_TV_MODE); + public static final List OTHER_CMDS_SET3 = List.of(RECORD_FONCTION_SELECT, DYNAMIC_RANGE, + DIGITAL_INPUT_SELECT, ZONE_TOGGLE, CENTER_TRIM, SUB_TRIM, SURROUND_TRIM, CINEMA_EQ_TOGGLE); + public static final List OTHER_CMDS_SET4 = List.of(POWER_OFF_ALL_ZONES, PARTY_MODE_TOGGLE, + ZONE2_PARTY_MODE_TOGGLE, ZONE3_PARTY_MODE_TOGGLE, ZONE4_PARTY_MODE_TOGGLE, OUTPUT_RESOLUTION, HDMI_AMP_MODE, + HDMI_TV_MODE, ROOM_EQ_TOGGLE, SPEAKER_SETTING_TOGGLE, RESET_FACTORY); + public static final byte PRIMARY_COMMAND = (byte) 0x10; - private String name; + private String label; private byte hexType; private byte hexKey; private @Nullable String asciiCommandV1; @@ -323,37 +544,37 @@ public enum RotelCommand { /** * Constructor when the textual commands are undefined * - * @param name the command name + * @param label the command label * @param hexType the the command type (HEX protocol) * @param hexKey the the command key (HEX protocol) */ - private RotelCommand(String name, byte hexType, byte hexKey) { - this(name, hexType, hexKey, null, null); + private RotelCommand(String label, byte hexType, byte hexKey) { + this(label, hexType, hexKey, null, null); } /** * Constructor when the HEX command is undefined * - * @param name the command name + * @param label the command label * @param asciiCommandV1 the textual command (ASCII protocol V1) * @param asciiCommandV2 the textual command (ASCII protocol V2) */ - private RotelCommand(String name, @Nullable String asciiCommandV1, @Nullable String asciiCommandV2) { - this(name, (byte) 0, (byte) 0, asciiCommandV1, asciiCommandV2); + private RotelCommand(String label, @Nullable String asciiCommandV1, @Nullable String asciiCommandV2) { + this(label, (byte) 0, (byte) 0, asciiCommandV1, asciiCommandV2); } /** * Constructor * - * @param name the command name + * @param label the command label * @param hexType the the command type (HEX protocol) * @param hexKey the the command key (HEX protocol) * @param asciiCommandV1 the textual command (ASCII protocol V1) * @param asciiCommandV2 the textual command (ASCII protocol V2) */ - private RotelCommand(String name, byte hexType, byte hexKey, @Nullable String asciiCommandV1, + private RotelCommand(String label, byte hexType, byte hexKey, @Nullable String asciiCommandV1, @Nullable String asciiCommandV2) { - this.name = name; + this.label = label; this.hexType = hexType; this.hexKey = hexKey; this.asciiCommandV1 = asciiCommandV1; @@ -361,12 +582,12 @@ private RotelCommand(String name, byte hexType, byte hexKey, @Nullable String as } /** - * Get the command name + * Get the command label * - * @return the command name + * @return the command label */ - public String getName() { - return name; + public String getLabel() { + return label; } /** @@ -405,6 +626,18 @@ public byte getHexKey() { return asciiCommandV2; } + /** + * Indicate if the command is relative to a particular zone + * + * @param numZone the zone number + * + * @return true if the command is relative to the zone + */ + public boolean isCommandForZone(int numZone) { + String prefix = String.format("ZONE%d", numZone); + return name().startsWith(prefix); + } + /** * Get the command associated to a textual command * @@ -422,4 +655,68 @@ public static RotelCommand getFromAsciiCommand(String text) throws RotelExceptio } throw new RotelException("Invalid textual command: " + text); } + + /** + * Get the command from its name + * + * @param name the command name used to identify the command + * + * @return the command associated to the searched name + * + * @throws RotelException - If no command is associated to the searched name + */ + public static RotelCommand getFromName(String name) throws RotelException { + for (RotelCommand value : RotelCommand.values()) { + if (value.name().equals(name)) { + return value; + } + } + throw new RotelException("Invalid command: " + name); + } + + public static List concatenate(List list1, List list2) { + return Stream.of(list1, list2).flatMap(Collection::stream).collect(Collectors.toList()); + } + + public static List concatenate(List list1, List list2, + List list3) { + return Stream.of(list1, list2, list3).flatMap(Collection::stream).collect(Collectors.toList()); + } + + public static List concatenate(List list1, List list2, + List list3, List list4) { + return Stream.of(list1, list2, list3, list4).flatMap(Collection::stream).collect(Collectors.toList()); + } + + public static List concatenate(List list1, List list2, + List list3, List list4, List list5) { + return Stream.of(list1, list2, list3, list4, list5).flatMap(Collection::stream).collect(Collectors.toList()); + } + + public static List concatenate(List list1, List list2, + List list3, List list4, List list5, List list6) { + return Stream.of(list1, list2, list3, list4, list5, list6).flatMap(Collection::stream) + .collect(Collectors.toList()); + } + + public static List concatenate(List list1, List list2, + List list3, List list4, List list5, List list6, + List list7) { + return Stream.of(list1, list2, list3, list4, list5, list6, list7).flatMap(Collection::stream) + .collect(Collectors.toList()); + } + + public static List concatenate(List list1, List list2, + List list3, List list4, List list5, List list6, + List list7, List list8) { + return Stream.of(list1, list2, list3, list4, list5, list6, list7, list8).flatMap(Collection::stream) + .collect(Collectors.toList()); + } + + public static List concatenate(List list1, List list2, + List list3, List list4, List list5, List list6, + List list7, List list8, List list9) { + return Stream.of(list1, list2, list3, list4, list5, list6, list7, list8, list9).flatMap(Collection::stream) + .collect(Collectors.toList()); + } } diff --git a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelDsp.java b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelDsp.java index 929d5441c8985..5d8ca2eb85a9d 100644 --- a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelDsp.java +++ b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelDsp.java @@ -238,6 +238,6 @@ public static RotelDsp getFromCommand(int category, RotelCommand command) throws return value; } } - throw new RotelException("Invalid command for a DSP mode: " + command.getName()); + throw new RotelException("Invalid command for a DSP mode: " + command.getLabel()); } } diff --git a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelSimuConnector.java b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelSimuConnector.java index 6e210d21fb371..97844aac61d0c 100644 --- a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelSimuConnector.java +++ b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelSimuConnector.java @@ -770,11 +770,11 @@ public void buildFeedbackMessage(RotelCommand cmd, @Nullable Integer value) { case PLAY_STATUS: textAscii = buildPlayStatusAsciiResponse(); break; - case TRACK_FORWARD: + case TRACK_FWD: track++; textAscii = buildTrackAsciiResponse(); break; - case TRACK_BACKWORD: + case TRACK_BACK: if (track > 1) { track--; } diff --git a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelSource.java b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelSource.java index f6f42867f5aa8..07c259aa1782b 100644 --- a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelSource.java +++ b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelSource.java @@ -493,6 +493,6 @@ public static RotelSource getFromCommand(int category, RotelCommand command, int return value; } } - throw new RotelException("Invalid command for a source: " + command.getName()); + throw new RotelException("Invalid command for a source: " + command.getLabel()); } } diff --git a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/handler/RotelHandler.java b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/handler/RotelHandler.java index 518cc6a026dba..01abba47b771e 100644 --- a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/handler/RotelHandler.java +++ b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/handler/RotelHandler.java @@ -26,6 +26,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; import org.openhab.binding.rotel.internal.RotelBindingConstants; +import org.openhab.binding.rotel.internal.RotelCommandDescriptionOptionProvider; import org.openhab.binding.rotel.internal.RotelException; import org.openhab.binding.rotel.internal.RotelModel; import org.openhab.binding.rotel.internal.RotelPlayStatus; @@ -60,6 +61,7 @@ import org.openhab.core.thing.ThingStatusDetail; import org.openhab.core.thing.binding.BaseThingHandler; import org.openhab.core.types.Command; +import org.openhab.core.types.CommandOption; import org.openhab.core.types.RefreshType; import org.openhab.core.types.State; import org.openhab.core.types.StateOption; @@ -82,13 +84,14 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL private static final boolean USE_SIMULATED_DEVICE = false; private static final int SLEEP_INTV = 30; + private final RotelStateDescriptionOptionProvider stateDescriptionProvider; + private final RotelCommandDescriptionOptionProvider commandDescriptionProvider; + private final SerialPortManager serialPortManager; + private @Nullable ScheduledFuture reconnectJob; private @Nullable ScheduledFuture powerOffJob; private @Nullable ScheduledFuture[] powerOnZoneJobs = { null, null, null, null, null }; - private RotelStateDescriptionOptionProvider stateDescriptionProvider; - private SerialPortManager serialPortManager; - private RotelModel model; private RotelProtocol protocol; private RotelAbstractProtocolHandler protocolHandler; @@ -132,9 +135,10 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL * Constructor */ public RotelHandler(Thing thing, RotelStateDescriptionOptionProvider stateDescriptionProvider, - SerialPortManager serialPortManager) { + RotelCommandDescriptionOptionProvider commandDescriptionProvider, SerialPortManager serialPortManager) { super(thing); this.stateDescriptionProvider = stateDescriptionProvider; + this.commandDescriptionProvider = commandDescriptionProvider; this.serialPortManager = serialPortManager; this.model = DEFAULT_MODEL; this.protocolHandler = new RotelHexProtocolHandler(model, Map.of()); @@ -460,6 +464,14 @@ public void initialize() { model.getDspStateOptions()); } + List options = model.getOtherCommandsOptions(protocol); + if (!options.isEmpty()) { + commandDescriptionProvider.setCommandOptions(new ChannelUID(getThing().getUID(), CHANNEL_OTHER_COMMAND), + options); + commandDescriptionProvider + .setCommandOptions(new ChannelUID(getThing().getUID(), CHANNEL_MAIN_OTHER_COMMAND), options); + } + updateStatus(ThingStatus.UNKNOWN); scheduleReconnectJob(); @@ -785,9 +797,9 @@ public void handleCommand(ChannelUID channelUID, Command command) { sendCommand(RotelCommand.PLAY_STATUS); } } else if (command instanceof NextPreviousType && command == NextPreviousType.NEXT) { - sendCommand(RotelCommand.TRACK_FORWARD); + sendCommand(RotelCommand.TRACK_FWD); } else if (command instanceof NextPreviousType && command == NextPreviousType.PREVIOUS) { - sendCommand(RotelCommand.TRACK_BACKWORD); + sendCommand(RotelCommand.TRACK_BACK); } else { success = false; logger.debug("Command {} from channel {} failed: invalid command value", command, channel); @@ -903,6 +915,24 @@ public void handleCommand(ChannelUID channelUID, Command command) { RotelCommand.SPEAKER_B_OFF, RotelCommand.SPEAKER_B_TOGGLE); } break; + case CHANNEL_OTHER_COMMAND: + case CHANNEL_MAIN_OTHER_COMMAND: + if (!isPowerOn()) { + success = false; + logger.debug("Command {} from channel {} ignored: device in standby", command, channel); + } else { + try { + cmd = RotelCommand.getFromName(command.toString()); + } catch (RotelException e) { + success = false; + logger.debug("Command {} from channel {} failed: undefined command", command, channel); + cmd = null; + } + if (cmd != null) { + sendCommand(cmd); + } + } + break; default: success = false; logger.debug("Command {} from channel {} failed: nnexpected command", command, channel); @@ -2717,7 +2747,7 @@ private void sendCommand(RotelCommand cmd, @Nullable Integer value) throws Rotel logger.debug("sendCommand: {}", e.getMessage()); return; } - connector.writeOutput(cmd.getName(), message); + connector.writeOutput(cmd.getLabel(), message); if (connector instanceof RotelSimuConnector) { if ((protocol == RotelProtocol.HEX && cmd.getHexType() != 0) diff --git a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/protocol/ascii/RotelAsciiV1ProtocolHandler.java b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/protocol/ascii/RotelAsciiV1ProtocolHandler.java index 5e47063ccb6a9..2da067efbc6a1 100644 --- a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/protocol/ascii/RotelAsciiV1ProtocolHandler.java +++ b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/protocol/ascii/RotelAsciiV1ProtocolHandler.java @@ -53,7 +53,7 @@ public RotelProtocol getProtocol() { public byte[] buildCommandMessage(RotelCommand cmd, @Nullable Integer value) throws RotelException { String messageStr = cmd.getAsciiCommandV1(); if (messageStr == null) { - throw new RotelException("Command \"" + cmd.getName() + "\" ignored: not available for ASCII V1 protocol"); + throw new RotelException("Command \"" + cmd.getLabel() + "\" ignored: not available for ASCII V1 protocol"); } if (value != null) { switch (cmd) { @@ -94,7 +94,7 @@ public byte[] buildCommandMessage(RotelCommand cmd, @Nullable Integer value) thr messageStr += "!"; } byte[] message = messageStr.getBytes(StandardCharsets.US_ASCII); - logger.debug("Command \"{}\" => {}", cmd.getName(), messageStr); + logger.debug("Command \"{}\" => {}", cmd.getLabel(), messageStr); return message; } } diff --git a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/protocol/ascii/RotelAsciiV2ProtocolHandler.java b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/protocol/ascii/RotelAsciiV2ProtocolHandler.java index ab406c8cda11e..661936b1f8f3b 100644 --- a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/protocol/ascii/RotelAsciiV2ProtocolHandler.java +++ b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/protocol/ascii/RotelAsciiV2ProtocolHandler.java @@ -55,7 +55,7 @@ public RotelProtocol getProtocol() { public byte[] buildCommandMessage(RotelCommand cmd, @Nullable Integer value) throws RotelException { String messageStr = cmd.getAsciiCommandV2(); if (messageStr == null) { - throw new RotelException("Command \"" + cmd.getName() + "\" ignored: not available for ASCII V2 protocol"); + throw new RotelException("Command \"" + cmd.getLabel() + "\" ignored: not available for ASCII V2 protocol"); } if (value != null) { switch (cmd) { @@ -112,7 +112,7 @@ public byte[] buildCommandMessage(RotelCommand cmd, @Nullable Integer value) thr messageStr += "!"; } byte[] message = messageStr.getBytes(StandardCharsets.US_ASCII); - logger.debug("Command \"{}\" => {}", cmd.getName(), messageStr); + logger.debug("Command \"{}\" => {}", cmd.getLabel(), messageStr); return message; } diff --git a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/protocol/hex/RotelHexProtocolHandler.java b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/protocol/hex/RotelHexProtocolHandler.java index 0214b96e6a841..eca760b942b1c 100644 --- a/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/protocol/hex/RotelHexProtocolHandler.java +++ b/bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/protocol/hex/RotelHexProtocolHandler.java @@ -133,7 +133,7 @@ public RotelProtocol getProtocol() { @Override public byte[] buildCommandMessage(RotelCommand cmd, @Nullable Integer value) throws RotelException { if (cmd.getHexType() == 0) { - throw new RotelException("Command \"" + cmd.getName() + "\" ignored: not available for HEX protocol"); + throw new RotelException("Command \"" + cmd.getLabel() + "\" ignored: not available for HEX protocol"); } final int size = 6; byte[] message = new byte[size]; @@ -151,7 +151,7 @@ public byte[] buildCommandMessage(RotelCommand cmd, @Nullable Integer value) thr } else { message[idx++] = checksum; } - logger.debug("Command \"{}\" => {}", cmd.getName(), HexUtils.bytesToHex(message)); + logger.debug("Command \"{}\" => {}", cmd.getLabel(), HexUtils.bytesToHex(message)); return message; } diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/i18n/rotel.properties b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/i18n/rotel.properties index c60d8d3d6cf36..005ab93a80ed1 100644 --- a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/i18n/rotel.properties +++ b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/i18n/rotel.properties @@ -114,6 +114,171 @@ channel-type.rotel.frequency.label = Current Frequency channel-type.rotel.frequency.description = The current frequency (in kHz) for digital source input channel-type.rotel.frontPanelLine.label = Front Panel Line channel-type.rotel.frontPanelLine.description = The line content displayed on the device front panel +channel-type.rotel.otherCommand.label = Other Command +channel-type.rotel.otherCommand.description = Choose the command to send to the device +channel-type.rotel.otherCommand.command.option.POWER_OFF_ALL_ZONES = Power Off All Zones +channel-type.rotel.otherCommand.command.option.REMOTE_VOLUME_UP = Remote Volume Up +channel-type.rotel.otherCommand.command.option.REMOTE_VOLUME_DOWN = Remote Volume Down +channel-type.rotel.otherCommand.command.option.DSP_TOGGLE = DSP Mode Toggle +channel-type.rotel.otherCommand.command.option.PROLOGIC_TOGGLE = Dolby 3 Stereo / Pro Logic Toggle +channel-type.rotel.otherCommand.command.option.PLII_PANORAMA_TOGGLE = PLII Panorama Toggle +channel-type.rotel.otherCommand.command.option.PLII_DIMENSION_UP = PLII Dimension Up +channel-type.rotel.otherCommand.command.option.PLII_DIMENSION_DOWN = PLII Dimension Down +channel-type.rotel.otherCommand.command.option.PLII_CENTER_WIDTH_UP = PLII Center Width Up +channel-type.rotel.otherCommand.command.option.PLII_CENTER_WIDTH_DOWN = PLII Center Width Down +channel-type.rotel.otherCommand.command.option.DDEX_TOGGLE = Dolby Digital EX Toggle +channel-type.rotel.otherCommand.command.option.NEO6_TOGGLE = dts Neo:6 Music/Cinema Toggle +channel-type.rotel.otherCommand.command.option.NEXT_MODE = Next Surround Mode +channel-type.rotel.otherCommand.command.option.TUNE_UP = Tune Up +channel-type.rotel.otherCommand.command.option.TUNE_DOWN = Tune Down +channel-type.rotel.otherCommand.command.option.PRESET_UP = Preset Up +channel-type.rotel.otherCommand.command.option.PRESET_DOWN = Preset Down +channel-type.rotel.otherCommand.command.option.FREQUENCY_UP = Frequency Up +channel-type.rotel.otherCommand.command.option.FREQUENCY_DOWN = Frequency Down +channel-type.rotel.otherCommand.command.option.MEMORY = Memory +channel-type.rotel.otherCommand.command.option.BAND_TOGGLE = Band Toggle +channel-type.rotel.otherCommand.command.option.AM = AM +channel-type.rotel.otherCommand.command.option.FM = FM +channel-type.rotel.otherCommand.command.option.TUNE_PRESET_TOGGLE = Tune / Preset +channel-type.rotel.otherCommand.command.option.TUNING_MODE_SELECT = Tuning Mode Select +channel-type.rotel.otherCommand.command.option.PRESET_MODE_SELECT = Preset Mode Select +channel-type.rotel.otherCommand.command.option.FREQUENCY_DIRECT = Frequency Direct +channel-type.rotel.otherCommand.command.option.PRESET_SCAN = Preset Scan +channel-type.rotel.otherCommand.command.option.TUNER_DISPLAY = Tuner Display +channel-type.rotel.otherCommand.command.option.RDS_PTY = RDS PTY +channel-type.rotel.otherCommand.command.option.RDS_TP = RDS TP +channel-type.rotel.otherCommand.command.option.RDS_TA = RDS TA +channel-type.rotel.otherCommand.command.option.FM_MONO_TOGGLE = FM Mono +channel-type.rotel.otherCommand.command.option.ZONE2_TUNE_UP = Zone 2 Tune Up +channel-type.rotel.otherCommand.command.option.ZONE2_TUNE_DOWN = Zone 2 Tune Down +channel-type.rotel.otherCommand.command.option.ZONE2_PRESET_UP = Zone 2 Preset Up +channel-type.rotel.otherCommand.command.option.ZONE2_PRESET_DOWN = Zone 2 Preset Down +channel-type.rotel.otherCommand.command.option.ZONE2_FREQUENCY_UP = Zone 2 Frequency Up +channel-type.rotel.otherCommand.command.option.ZONE2_FREQUENCY_DOWN = Zone 2 Frequency Down +channel-type.rotel.otherCommand.command.option.ZONE2_BAND_TOGGLE = Zone 2 Band Toggle +channel-type.rotel.otherCommand.command.option.ZONE2_AM = Zone 2 AM +channel-type.rotel.otherCommand.command.option.ZONE2_FM = Zone 2 FM +channel-type.rotel.otherCommand.command.option.ZONE2_TUNE_PRESET_TOGGLE = Zone 2 Tune / Preset +channel-type.rotel.otherCommand.command.option.ZONE2_TUNING_MODE_SELECT = Zone 2 Tuning Mode Select +channel-type.rotel.otherCommand.command.option.ZONE2_PRESET_MODE_SELECT = Zone 2 Preset Mode Select +channel-type.rotel.otherCommand.command.option.ZONE2_PRESET_SCAN = Zone 2 Preset Scan +channel-type.rotel.otherCommand.command.option.ZONE2_FM_MONO_TOGGLE = Zone 2 FM Mono +channel-type.rotel.otherCommand.command.option.ZONE3_TUNE_UP = Zone 3 Tune Up +channel-type.rotel.otherCommand.command.option.ZONE3_TUNE_DOWN = Zone 3 Tune Down +channel-type.rotel.otherCommand.command.option.ZONE3_PRESET_UP = Zone 3 Preset Up +channel-type.rotel.otherCommand.command.option.ZONE3_PRESET_DOWN = Zone 3 Preset Down +channel-type.rotel.otherCommand.command.option.ZONE3_FREQUENCY_UP = Zone 3 Frequency Up +channel-type.rotel.otherCommand.command.option.ZONE3_FREQUENCY_DOWN = Zone 3 Frequency Down +channel-type.rotel.otherCommand.command.option.ZONE3_BAND_TOGGLE = Zone 3 Band Toggle +channel-type.rotel.otherCommand.command.option.ZONE3_AM = Zone 3 AM +channel-type.rotel.otherCommand.command.option.ZONE3_FM = Zone 3 FM +channel-type.rotel.otherCommand.command.option.ZONE3_TUNE_PRESET_TOGGLE = Zone 3 Tune / Preset +channel-type.rotel.otherCommand.command.option.ZONE3_TUNING_MODE_SELECT = Zone 3 Tuning Mode Select +channel-type.rotel.otherCommand.command.option.ZONE3_PRESET_MODE_SELECT = Zone 3 Preset Mode Select +channel-type.rotel.otherCommand.command.option.ZONE3_PRESET_SCAN = Zone 3 Preset Scan +channel-type.rotel.otherCommand.command.option.ZONE3_FM_MONO_TOGGLE = Zone 3 FM Mono +channel-type.rotel.otherCommand.command.option.ZONE4_TUNE_UP = Zone 4 Tune Up +channel-type.rotel.otherCommand.command.option.ZONE4_TUNE_DOWN = Zone 4 Tune Down +channel-type.rotel.otherCommand.command.option.ZONE4_PRESET_UP = Zone 4 Preset Up +channel-type.rotel.otherCommand.command.option.ZONE4_PRESET_DOWN = Zone 4 Preset Down +channel-type.rotel.otherCommand.command.option.ZONE4_FREQUENCY_UP = Zone 4 Frequency Up +channel-type.rotel.otherCommand.command.option.ZONE4_FREQUENCY_DOWN = Zone 4 Frequency Down +channel-type.rotel.otherCommand.command.option.ZONE4_BAND_TOGGLE = Zone 4 Band Toggle +channel-type.rotel.otherCommand.command.option.ZONE4_AM = Zone 4 AM +channel-type.rotel.otherCommand.command.option.ZONE4_FM = Zone 4 FM +channel-type.rotel.otherCommand.command.option.ZONE4_TUNE_PRESET_TOGGLE = Zone 4 Tune / Preset +channel-type.rotel.otherCommand.command.option.ZONE4_TUNING_MODE_SELECT = Zone 4 Tuning Mode Select +channel-type.rotel.otherCommand.command.option.ZONE4_PRESET_MODE_SELECT = Zone 4 Preset Mode Select +channel-type.rotel.otherCommand.command.option.ZONE4_PRESET_SCAN = Zone 4 Preset Scan +channel-type.rotel.otherCommand.command.option.ZONE4_FM_MONO_TOGGLE = Zone 4 FM Mono +channel-type.rotel.otherCommand.command.option.PLAY = Play Source +channel-type.rotel.otherCommand.command.option.STOP = Stop Source +channel-type.rotel.otherCommand.command.option.PAUSE = Pause Source +channel-type.rotel.otherCommand.command.option.TRACK_FWD = Track Forward/Tune Up +channel-type.rotel.otherCommand.command.option.TRACK_BACK = Track Backward/Tune Down +channel-type.rotel.otherCommand.command.option.FAST_FWD = Fast Forward/Search Forward +channel-type.rotel.otherCommand.command.option.FAST_BACK = Fast Backward/Search Backward +channel-type.rotel.otherCommand.command.option.RANDOM_TOGGLE = Random Play Mode Toggle +channel-type.rotel.otherCommand.command.option.REPEAT_TOGGLE = Repeat Play Mode Toggle +channel-type.rotel.otherCommand.command.option.EJECT = Eject CD +channel-type.rotel.otherCommand.command.option.TIME_TOGGLE = Toggle CD Time Display +channel-type.rotel.otherCommand.command.option.MENU = Display the Menu +channel-type.rotel.otherCommand.command.option.EXIT = Exit Key +channel-type.rotel.otherCommand.command.option.UP = Cursor Up +channel-type.rotel.otherCommand.command.option.UP_PRESSED = Cursor Up - Key Pressed +channel-type.rotel.otherCommand.command.option.UP_RELEASED = Cursor Up - Key Released +channel-type.rotel.otherCommand.command.option.DOWN = Cursor Down +channel-type.rotel.otherCommand.command.option.DOWN_PRESSED = Cursor Down - Key Pressed +channel-type.rotel.otherCommand.command.option.DOWN_RELEASED = Cursor Down - Key Released +channel-type.rotel.otherCommand.command.option.LEFT = Cursor Left +channel-type.rotel.otherCommand.command.option.LEFT_PRESSED = Cursor Left - Key Pressed +channel-type.rotel.otherCommand.command.option.LEFT_RELEASED = Cursor Left - Key Released +channel-type.rotel.otherCommand.command.option.RIGHT = Cursor Right +channel-type.rotel.otherCommand.command.option.RIGHT_PRESSED = Cursor Right - Key Pressed +channel-type.rotel.otherCommand.command.option.RIGHT_RELEASED = Cursor Right - Key Released +channel-type.rotel.otherCommand.command.option.ENTER = Enter Key +channel-type.rotel.otherCommand.command.option.KEY1 = Number Key 1 +channel-type.rotel.otherCommand.command.option.KEY2 = Number Key 2 +channel-type.rotel.otherCommand.command.option.KEY3 = Number Key 3 +channel-type.rotel.otherCommand.command.option.KEY4 = Number Key 4 +channel-type.rotel.otherCommand.command.option.KEY5 = Number Key 5 +channel-type.rotel.otherCommand.command.option.KEY6 = Number Key 6 +channel-type.rotel.otherCommand.command.option.KEY7 = Number Key 7 +channel-type.rotel.otherCommand.command.option.KEY8 = Number Key 8 +channel-type.rotel.otherCommand.command.option.KEY9 = Number Key 9 +channel-type.rotel.otherCommand.command.option.KEY0 = Number Key 0 +channel-type.rotel.otherCommand.command.option.ZONE2_KEY1 = Zone 2 Number Key 1 +channel-type.rotel.otherCommand.command.option.ZONE2_KEY2 = Zone 2 Number Key 2 +channel-type.rotel.otherCommand.command.option.ZONE2_KEY3 = Zone 2 Number Key 3 +channel-type.rotel.otherCommand.command.option.ZONE2_KEY4 = Zone 2 Number Key 4 +channel-type.rotel.otherCommand.command.option.ZONE2_KEY5 = Zone 2 Number Key 5 +channel-type.rotel.otherCommand.command.option.ZONE2_KEY6 = Zone 2 Number Key 6 +channel-type.rotel.otherCommand.command.option.ZONE2_KEY7 = Zone 2 Number Key 7 +channel-type.rotel.otherCommand.command.option.ZONE2_KEY8 = Zone 2 Number Key 8 +channel-type.rotel.otherCommand.command.option.ZONE2_KEY9 = Zone 2 Number Key 9 +channel-type.rotel.otherCommand.command.option.ZONE2_KEY0 = Zone 2 Number Key 0 +channel-type.rotel.otherCommand.command.option.ZONE3_KEY1 = Zone 3 Number Key 1 +channel-type.rotel.otherCommand.command.option.ZONE3_KEY2 = Zone 3 Number Key 2 +channel-type.rotel.otherCommand.command.option.ZONE3_KEY3 = Zone 3 Number Key 3 +channel-type.rotel.otherCommand.command.option.ZONE3_KEY4 = Zone 3 Number Key 4 +channel-type.rotel.otherCommand.command.option.ZONE3_KEY5 = Zone 3 Number Key 5 +channel-type.rotel.otherCommand.command.option.ZONE3_KEY6 = Zone 3 Number Key 6 +channel-type.rotel.otherCommand.command.option.ZONE3_KEY7 = Zone 3 Number Key 7 +channel-type.rotel.otherCommand.command.option.ZONE3_KEY8 = Zone 3 Number Key 8 +channel-type.rotel.otherCommand.command.option.ZONE3_KEY9 = Zone 3 Number Key 9 +channel-type.rotel.otherCommand.command.option.ZONE3_KEY0 = Zone 3 Number Key 0 +channel-type.rotel.otherCommand.command.option.ZONE4_KEY1 = Zone 4 Number Key 1 +channel-type.rotel.otherCommand.command.option.ZONE4_KEY2 = Zone 4 Number Key 2 +channel-type.rotel.otherCommand.command.option.ZONE4_KEY3 = Zone 4 Number Key 3 +channel-type.rotel.otherCommand.command.option.ZONE4_KEY4 = Zone 4 Number Key 4 +channel-type.rotel.otherCommand.command.option.ZONE4_KEY5 = Zone 4 Number Key 5 +channel-type.rotel.otherCommand.command.option.ZONE4_KEY6 = Zone 4 Number Key 6 +channel-type.rotel.otherCommand.command.option.ZONE4_KEY7 = Zone 4 Number Key 7 +channel-type.rotel.otherCommand.command.option.ZONE4_KEY8 = Zone 4 Number Key 8 +channel-type.rotel.otherCommand.command.option.ZONE4_KEY9 = Zone 4 Number Key 9 +channel-type.rotel.otherCommand.command.option.ZONE4_KEY0 = Zone 4 Number Key 0 +channel-type.rotel.otherCommand.command.option.PROGRAM = Program Key +channel-type.rotel.otherCommand.command.option.PCUSB_CLASS_1 = Set PC-USB Audio Class to 1.0 +channel-type.rotel.otherCommand.command.option.PCUSB_CLASS_2 = Set PC-USB Audio Class to 2.0 +channel-type.rotel.otherCommand.command.option.RESET_FACTORY = Reset unit to factory defaults +channel-type.rotel.otherCommand.command.option.RECORD_FONCTION_SELECT = Record Function Select +channel-type.rotel.otherCommand.command.option.TONE_CONTROL_SELECT = Tone Control Select +channel-type.rotel.otherCommand.command.option.DYNAMIC_RANGE = Dynamic Range +channel-type.rotel.otherCommand.command.option.DIGITAL_INPUT_SELECT = Digital Input Select +channel-type.rotel.otherCommand.command.option.ZONE_TOGGLE = Zone Toggle +channel-type.rotel.otherCommand.command.option.CENTER_TRIM = Temporary Center Trim +channel-type.rotel.otherCommand.command.option.SUB_TRIM = Temporary Subwoofer Trim +channel-type.rotel.otherCommand.command.option.SURROUND_TRIM = Temporary Surround Trim +channel-type.rotel.otherCommand.command.option.CINEMA_EQ_TOGGLE = Cinema EQ Toggle +channel-type.rotel.otherCommand.command.option.PARTY_MODE_TOGGLE = Party Mode Toggle +channel-type.rotel.otherCommand.command.option.ZONE2_PARTY_MODE_TOGGLE = Zone 2 Party Mode Toggle +channel-type.rotel.otherCommand.command.option.ZONE3_PARTY_MODE_TOGGLE = Zone 3 Party Mode Toggle +channel-type.rotel.otherCommand.command.option.ZONE4_PARTY_MODE_TOGGLE = Zone 4 Party Mode Toggle +channel-type.rotel.otherCommand.command.option.OUTPUT_RESOLUTION = Output Resolution +channel-type.rotel.otherCommand.command.option.HDMI_AMP_MODE = HDMI Amp Mode +channel-type.rotel.otherCommand.command.option.HDMI_TV_MODE = HDMI TV Mode +channel-type.rotel.otherCommand.command.option.ROOM_EQ_TOGGLE = Temporary Room EQ Toggle +channel-type.rotel.otherCommand.command.option.SPEAKER_SETTING_TOGGLE = Speaker Level Setting Toggle channel-type.rotel.random.label = Random Mode channel-type.rotel.random.description = The current random mode channel-type.rotel.recordSource.label = Record Source diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/a11.xml b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/a11.xml index 7a8a74216e591..1eda784ef4723 100644 --- a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/a11.xml +++ b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/a11.xml @@ -21,6 +21,7 @@ + diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/a12.xml b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/a12.xml index 441fcc8b6b024..eac95bf6ac6b0 100644 --- a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/a12.xml +++ b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/a12.xml @@ -22,6 +22,7 @@ + diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/a14.xml b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/a14.xml index 0260bcd6a02e1..bda9fe43290a7 100644 --- a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/a14.xml +++ b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/a14.xml @@ -22,6 +22,7 @@ + diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/cd11.xml b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/cd11.xml index 634fa228cb655..fed8e355636b7 100644 --- a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/cd11.xml +++ b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/cd11.xml @@ -16,6 +16,7 @@ + diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/cd14.xml b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/cd14.xml index 416501567112d..dc947ca650bcf 100644 --- a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/cd14.xml +++ b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/cd14.xml @@ -16,6 +16,7 @@ + diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/channels.xml b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/channels.xml index b0132fea9566e..a87f436d014aa 100644 --- a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/channels.xml +++ b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/channels.xml @@ -18,6 +18,7 @@ + @@ -33,6 +34,7 @@ + @@ -49,6 +51,7 @@ + @@ -66,6 +69,7 @@ + @@ -82,6 +86,7 @@ + @@ -267,4 +272,10 @@ Turn on/off the speaker group B + + + String + + Choose the command to send to the device + diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/p5.xml b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/p5.xml index cd70e6c5ef121..0172fb361988c 100644 --- a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/p5.xml +++ b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/p5.xml @@ -20,6 +20,7 @@ + diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/ra11.xml b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/ra11.xml index 0ff59b1e9eb45..5ddd84e2e1879 100644 --- a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/ra11.xml +++ b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/ra11.xml @@ -21,6 +21,7 @@ + diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/ra12.xml b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/ra12.xml index 0330c19d29d1e..bac1a02619ccb 100644 --- a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/ra12.xml +++ b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/ra12.xml @@ -21,6 +21,7 @@ + diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/ra1570.xml b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/ra1570.xml index dd38072af3ed7..aff4084ff0ccc 100644 --- a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/ra1570.xml +++ b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/ra1570.xml @@ -23,6 +23,7 @@ + diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/ra1572.xml b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/ra1572.xml index cc84c5b118751..b3d0d79752392 100644 --- a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/ra1572.xml +++ b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/ra1572.xml @@ -22,6 +22,7 @@ + diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/rc1570.xml b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/rc1570.xml index 449f6d61241fa..e8e8a3e5b625f 100644 --- a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/rc1570.xml +++ b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/rc1570.xml @@ -21,6 +21,7 @@ + diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/rc1572.xml b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/rc1572.xml index 466f3e4cf7eff..06457ba3a1021 100644 --- a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/rc1572.xml +++ b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/rc1572.xml @@ -20,6 +20,7 @@ + diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/rcd1572.xml b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/rcd1572.xml index 4a2ac1d8eaabc..3cecb98bfabfd 100644 --- a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/rcd1572.xml +++ b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/rcd1572.xml @@ -16,6 +16,7 @@ + diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/x3.xml b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/x3.xml index ef40d58681817..674a52f599fa6 100644 --- a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/x3.xml +++ b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/x3.xml @@ -20,6 +20,7 @@ + diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/x5.xml b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/x5.xml index 17e7af859f85a..72cb5c6715df0 100644 --- a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/x5.xml +++ b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/x5.xml @@ -20,6 +20,7 @@ +