-
Notifications
You must be signed in to change notification settings - Fork 130
Items HARMON
See original
Module for sending commands to and tracking the current settings of the Harmon Kardon x65 line of receivers (AVR3650, AVR365, AVR2650, AVR265).
At minimum, you must define the receiver. In addition, this library provides for the ability to define separate objects for Power, Volume, Mute, Input, and Control for each Zone. This allows for the display of these settings for each zone as separate items in the MH interface and allows users to interact directly with these objects using the basic Generic_Item functions such as tie_event.
Interface Configuration There is a small difference in configuring the HARMON Interface for direct connections Serial or IP Connections (Ser2Sock).
HARMON_serial_port=/dev/ttyAMA0 @This is the serial device
HARMON_baudrate=115200 @This must be 115200
Wherein the format for the parameter name is:
HARMON_serial_port
HARMON_baudrate
HARMON_server_ip=192.168.1.33 @IP address of the machine running ser2sock
HARMON_server_port=36000 @Port configured in the ser2sock config
HARMON_server_recon=10 @Amount of time to wait before trying to reconnect
Wherein the format for the parameter name is:
HARMON-Prefix_server_ip
HARMON-Prefix_server_port
**NOTE: In the ser2sock configuration you must enable "raw_device_mode = 1".
In addition to the above configuration, you must also define the interface object. The object can be defined in either an mht file or user code.
Parameter | Code | Format |
---|---|---|
$HARMON = new HARMON('HARMON'); |
$HARMON = new HARMON('HARMON'); |
|
Power | $HARMON_POWER_Z1 = new HARMON_Power('HARMON', 1); |
<object_name> = new HARMON_Power(<receiver>, <zone_number>); |
Volume | $HARMON_VOLUME_Z1 = new HARMON_Volume('HARMON', 1); |
<object_name> = new HARMON_Volume(<receiver>, <zone_number>); |
Mute | $HARMON_MUTE_Z1 = new HARMON_Mute('HARMON', 1); |
<object_name> = new HARMON_Volume(<receiver>, <zone_number>); |
Input | $HARMON_INPUT_Z1 = new HARMON_Input('HARMON', 1); |
<object_name> = new HARMON_Volume(<receiver>, <zone_number>); |
Control | $HARMON_CONTROL_Z1 = new HARMON_Control('HARMON', 1); |
<object_name> = new HARMON_Volume(<receiver>, <zone_number>); |
Method | Description |
---|---|
register() |
Used to associate child objects with the interface. |
User code:
$HARMON_POWER_Z1 = new HARMON_Power('HARMON', 1);
Wherein the format for the definition is:
<object_name> = new HARMON_Power(<receiver>, <zone_number>);
Method | Description |
---|---|
new($receiver, $zone ) |
Instantiates a new object.$receiver = The Harmon-Prefix of the receiver that this zone is found on$zone = The zone number, usually 1 |
User code:
$HARMON_VOLUME_Z1 = new HARMON_Volume('HARMON', 1);
Wherein the format for the definition is:
<object_name> = new HARMON_Volume(<receiver>, <zone_number>);
Method | Description |
---|---|
new($receiver, $zone ) |
Instantiates a new object. $receiver = The Harmon-Prefix of the receiver that this zone is found on$zone = The zone number, usually 1 |
User code:
$HARMON_MUTE_Z1 = new HARMON_Mute('HARMON', 1);
Wherein the format for the definition is:
<object_name> = new HARMON_Volume(<receiver>, <zone_number>);
Method | Description |
---|---|
new($receiver, $zone ) |
Instantiates a new object. $receiver = The Harmon-Prefix of the receiver that this zone is found on$zone = The zone number, usually 1 |
User code:
$HARMON_INPUT_Z1 = new HARMON_Input('HARMON', 1);
Wherein the format for the definition is:
<object_name> = new HARMON_Volume(<receiver>, <zone_number>);
Method | Description |
---|---|
new($receiver, $zone ) |
Instantiates a new object. $receiver = The Harmon-Prefix of the receiver that this zone is found on$zone = The zone number, usually 1 |
User code:
$HARMON_CONTROL_Z1 = new HARMON_Control('HARMON', 1);
Wherein the format for the definition is:
<object_name> = new HARMON_Volume(<receiver>, <zone_number>);
Method | Description |
---|---|
new($receiver, $zone ) |
Instantiates a new object. $receiver = The Harmon-Prefix of the receiver that this zone is found on$zone = The zone number, usually 1 |
Wayne Gatlin [email protected]
Add the following commands and Acks:
Specification: Discrete Volume
When zone1 is on the Discrete volume command allows the user to enter a specific volume eg: -63dB. When command received via RS232, the AVR should display the Volume OSD with the specified volume and adjust to that specified volume. 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 02, XX XX means user setted a specific Volume value. Top bit means minus -90 : 5A + 80 = DA +10 : 10
Specification: Discrete Volume ACK
When zone1 is on AVR return current volume value, 41, 56, 52, 41, 43, 4B, 02, 02, XX, Checksum XX means user set a specific Volume value. Top bit means minus -90 : 5A + 80 = DA +10 : 10
Specification: Discrete Bass
When zone1 is on the Discrete bass command allows the user to enter a specific Bass value e.g. 1dB. When command received via RS232 the AVR adjusts to that specified bass setting. If Tone Control was set to Off it should be turned On. No OSD needs to be shown by the AVR when these commands are received, however when the user reviews the OSD menus that show the status they should be updated to show the correct bass setting / tone control on status. 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 03, XX XX means user setted a specific Bass Level. Top bit means minus(-1dB = 0x81)
Specification: Return Bass Value
When zone1 is on AVR Return bass value. 41, 56, 52, 41, 43, 4B, 02, 12 XX,Checksum XX means user setted a specific Treble Level. Top bit means minus(-1dB = 0x81)
Specification: Get Bass Value
When zone1 is on From RS-232 Device query the bass value by sponsor. 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 38, 00
Specification: Return Bass Value
When zone1 is on AVR Return bass value. 41, 56, 52, 41, 43, 4B, 02, 12 XX,Checksum XX means user setted a specific Treble Level. Top bit means minus(-1dB = 0x81)
Specification: Bass Up/Down
When zone1 is on From RS-232 Device The bass up/down command allows the user to turn the bass up/down. When command received via RS232 the AVR should turn the bass up/down accordingly. If Tone Control was set to Off it should be turned On. No OSD needs to be shown by the AVR when these commands are received, however when the user reviews the OSD menus that show the status they should be updated to show the correct bass setting / tone control on status. 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 04, 00 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 05, 00
Specification: Return Bass Value
When zone1 is on AVR Return bass value. 41, 56, 52, 41, 43, 4B, 02, 12 XX,Checksum XX means user setted a specific Treble Level. Top bit means minus(-1dB = 0x81)
Discrete Treble When zone1 is on From RS-232 Device The Discrete treble command allows the user to enter a specific treble value e.g. 1dB. When command received via IP / RS232 the AVR adjusts to that specified treble setting. If Tone Control was set to Off it should be turned On. No OSD needs to be shown by the AVR when these commands are received, however when the user reviews the OSD menus that show the status they should be updated to show the correct treble setting / tone control on status. 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 06, XX XX means user setted a specific Treble Level. Top bit means minus(-1dB = 0x81)
Specification: Return Treble
Value When zone1 is on AVR Return Treble value. 41, 56, 52, 41, 43, 4B, 02, 13 XX,Checksum XX means user setted a specific Treble Level. Top bit means minus(-1dB = 0x81)
Specification: Get Treble Value all zones at any state From RS-232 Device query the Treble value by sponsor. 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 39, 00
Specification: Return Treble
Value all zones at any state AVR Return Treble value. 41, 56, 52, 41, 43, 4B, 02, 13 XX,Checksum XX means user setted a specific Treble Level. Top bit means minus(-1dB = 0x81)
Specification: TrebleUp/Down
When zone1 is on From RS-232 Device The treble up/down command allows the user to turn the treble up/down. When command received via RS232 the AVR should turn the treble up/down accordingly. If Tone Control was set to Off it should be turned On. No OSD needs to be shown by the AVR when these commands are received, however when the user reviews the OSD menus that show the status they should be updated to show the correct treble setting / tone control on status. 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 07, 00 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 08, 00
Specification: Return Treble Value
When zone1 is on AVR Return Treble value. 41, 56, 52, 41, 43, 4B, 02, 13 XX,Checksum XX means user setted a specific Treble Level. Top bit means minus(-1dB = 0x81)
Specification: RDS
zone1 is on From RS-232 Device RDS info must be able to be communicated from the AVR over RS232 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 0D, 00
Return RDS info zone1 is on AVR return the RDS info to device under control system Long packet format :41, 56, 52, 41, 43, 4B, 00, Length1,Length2, 05, XX,XX,. Checksum Short packet format:41, 56, 52, 41, 43, 4B, Length, 05,XX,XX,. Checksum 00: Packet length marker of long payload Length1:High byte of length Length2:Low byte of length XX: RDS hex format data XX=0x20: No data(blank) 20
Specification: iPod/USB MP3 Player Repeat
zone1 is on From RS-232 Device This feature allows the user to control iPod / MP3 (USB) over RS232. 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 0E, XX 1: Repeat All 2: Repeat one 3: Repeat Off 21
Specification: iPod/USB MP3 Player Shuffle
zone1 is on From RS-232 Device This feature allows the user to control iPod / MP3 (USB) over RS232. 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 01, 0E, XX 1: Shuffle On 2: Shuffle Off
Specification: Get iPod/USB MP3 Metadata zone1 is on From RS-232 Device iPod & MP3 (via USB) metadata info must be able to be communicated from the AVR over RS232 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 0F, XX 1: Title 2: Artist 3: Album
Specification: Return iPod/USB MP3 Metadata
zone1 is on AVR return iPod/USB MP3 Metadata to device under control Long packet format :41, 56, 52, 41, 43, 4B, 00, Length1,Length2, 06,NN, XX,XX,. Checksum Short packet format:41, 56, 52, 41, 43, 4B, Length, 06,NN, XX,XX,. Checksum NN: stands for title-0x01, artist-0x02, album-0x03. 00: Packet length marker of long payload Length1:High byte of length Length2:Low byte of length XX: data XX=0x20: No data(blank)
Specification: Get Sirius Metadata zone1 is on From RS-232 Device Sirius Metadata info must be able to be communicated from the AVR over RS232 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 11, XX 1: Song 2: Artist 3: Category
Specification: Return Sirius metadata
zone1 is on AVR return sirius Metadata to device under control Long packet format :41, 56, 52, 41, 43, 4B, 00, Length1,Length2, 07,NN, XX,XX,. Checksum Short packet format:41, 56, 52, 41, 43, 4B, Length, 07,NN, XX,XX,. Checksum NN: stands for title-0x01, artist-0x02, category-0x03. 00: Packet length marker of long payload Length1:High byte of length Length2:Low byte of length XX: data XX=0x20: No data(blank)
Specification: Get Sirius station name and station number
zone1 is on or zone2 on state From RS-232 Device This request is send by device under control or the other sponsor. The purpose is to fetch Sirius station number and name that AVR playing. 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 31, 00
Specification: Return Sirius station name and station number
zone1 is on or zone2 on state AVR return the information to sponsor. 41, 56, 52, 41, 43, 4B, Length, 10, XX,XX,. Checksum XX,XX: the string should compose and parsed by format: station name + ' '+ "No"+ station Number when XX,XX=0x20,means blank no data. Tune up/Down --Sirius Radio zone1 is on or zone2 on state When AVR received this request, it tunes up or down the Sirius radio. 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 32, 00 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 33, 00
Specification: Return Sirius station number and station number
zone1 is on or zone2 on state return the information to sponsor. 41, 56, 52, 41, 43, 4B, Length, 10, XX,XX,. Checksum XX,XX: the string should compose and parsed by format: station name + ' '+ "No"+ station Number when XX,XX=0x20,means blank no data.
Specification: Direct Channel Selection-- Sirius Radio
zone1 is on or zone2 on state Direct Channel Selection allows the user to enter a specific frequency that they want the AVR to tune to with Sirius radio. When command received via RS232 the AVR should switch to the entered frequency and update the Radio Now playing page to show the correct now playing and metadata. Note: If the AVR wasnt in the Radio source when this command is received it must switch the the AVR source also. 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 13, XX 1 ~ 255
Specification: Return direct channel selection-- Sirius Radio
zone1 is on or zone2 on state AVR Return the channel selected with Sirius radio. 41, 56, 52, 41, 43, 4B, Length,0E,XX,Checksum
00: Packet length marker of long payload 0x0E: return command's sequence number. XX: channel number.
Specification: Search Up/Down
zone1 is on, or zone2 is on When command received via RS232 behaves the same as up / down remote button when in Radio source and Mode is set to Auto'. Effect with FM and AM source. 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 14, 00 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 15, 00
Specification: Return Station Frequency and Preset number
zone1 is on, or zone2 is on AVR In Auto search mode, it should send back every station and it's preset number when there is a channel searched. Then the searching will be stopped. Long packet format :41, 56, 52, 41, 43, 4B, 00, Length1,Length2, 0B,NN, XX,XX,. Checksum Short packet format:41, 56, 52, 41, 43, 4B, Length, 0B,NN, XX,XX,. Checksum Searching End 41, 56, 52, 41, 43, 4B, 02, 0B ,20,1B 00: Packet length marker of long payload Length1:High byte of length Length2:Low byte of length 0x0B: return command's sequence number. XX: data
Specification: Tune Up/Down
zone1 is on, or zone2 is on When command received via RS232 behaves the same as up / down remote button when in Radio source and Mode is set to Manual', Effect with FM and AM source. 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 16, 00 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 17, 00
Specification: Return Current station Frequency-- AM,FM
zone1 is on, or zone2 is on AVR Return the current frequency data when it's changed 41, 56, 52, 41, 43, 4B, Length, 0C, XX,XX,. Checksum
Specification: Direct Preset Selection
zone1 is on, or zone2 is on Direct Preset Selection allows the user to enter a specific preset number that they want the AVR to tune to. FM,AM 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 18, XX 1 ~ 255
Specification: Return Station Frequency and Preset number
zone1 is on, or zone2 is on AVR When preset station has changed ,it should be send back automatic. Long packet format :41, 56, 52, 41, 43, 4B, 00, Length1,Length2, 0B, XX,XX,. Checksum Short packet format:41, 56, 52, 41, 43, 4B, Length, 0B,XX,XX,. Checksum 00: Packet length marker of long payload Length1:High byte of length Length2:Low byte of length 0x0B: return command's sequence number. XX: the string should compose and parse by format: frequency data + "Preset" Number The preset number can picked up by "Preset" Like "FM 87.50MHz Preset01"
Specification: Preset Toggle
zone1 is on, or zone2 is on From RS-232 Device When command received via RS232 behaves the same as Left / right remote button when in Radio source, For FM,AM 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 19, 00 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 1A, 00 Preset Up/Down
Specification: Return Station Frequency and Preset number
zone1 is on, or zone2 is on AVR When preset station has changed ,it should be send back automatic. Long packet format :41, 56, 52, 41, 43, 4B, 00, Length1,Length2, 0B,XX,XX,. Checksum Short packet format:41, 56, 52, 41, 43, 4B, Length, 0B, XX,XX,. Checksum 00: Packet length marker of long payload Length1:High byte of length Length2:Low byte of length 0x0B: return command's sequence number. XX: the string should compose and parse by format: frequency data + "Preset" Number The preset number can picked up by "Preset" Like "FM 87.50MHz Preset01"
Specification: Get Current station Frequency-- FM,AM
zone1 is on, or zone2 is on This request is send by device under control or the other sponsor. The purpose is to fetch current frequency that AVR playing 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 34, 00
Specification: Return Current station Frequency-- AM,FM
zone1 is on,or zone2 is on AVR return current station frequency 41, 56, 52, 41, 43, 4B, Length, 0C, XX,XX,. Checksum XX,,XX: stands for frequency, it's should in string format.
Specification: Set Current station Frequency-- FM,AM
zone1 is on, or zone2 is on This request is send by device under control or the other sponsor. The purpose is to fetch current frequency that AVR playing 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 35, 01, XX,XX,XX,'.',XX,XX 50, 43, 53, 45, 4E, 44, 02, 04, 80, 70, 00, 00, 35, 02, XX,XX,XX,XX XX,XX,XX,'.',XX,XX - 101.50 XX,XX,XX,'.',XX,XX - 087.50 XX,XX,XX,XX - 1710 XX,XX,XX,XX - 0520
Specification: Return Current station Frequency--AM,FM
zone1 is on, or zone2 is on return current station frequency after the setting command have done 41, 56, 52, 41, 43, 4B, Length, 0C, XX,XX,. Checksum XX,...XX: stands for frequency, it's should in string format.