Harman Kardon Serial Control

Questions and comments specific to a particular plugin should go here.

Re: Harman Kardon Serial Control

Postby kingtd » Sun Apr 12, 2009 5:46 pm

It's very possible that I've tweaked the plug-in since I originally posted it here some time ago. The Harman Kardon plug-in was one of the first I ever wrote, and is certainly not my best work. =)

I've attached the version here that I use on my server, which is running the 0.3.6.1484 Eventghost version that you have there in the screenshot.

The problem seems to be with an old construct that was changed in Eventghost. It looks like I fixed it in my personal copy but never uploaded the change:

# dialog = eg.ConfigurationDialog(self)
dialog = eg.ConfigPanel(self)

Hope that helps!
~K
Attachments
__init__.py
HK Pluging, known working with 0.3.6.1484
(12.88 KiB) Downloaded 226 times
kingtd
Plugin Developer
 
Posts: 78
Joined: Fri Jul 13, 2007 7:39 am

Re: Harman Kardon Serial Control

Postby HVR4000er » Sun Apr 12, 2009 8:36 pm

thx for help.

I have testet the new __init__.py and I am near on target.

Harman Kardon plugin is now errorless to activate in eventghost. It opens a dialog box and I have to type the command what I want to send on AVR. I dont know any syntax of commands wich HK AVR needs. I typed "test".

There are just now a new problem. When I click "run" for "test" command, a lot of error messages tell me eventghost. Look new screenshot.

How we can fix this error?
Attachments
eventghost_fehler2.jpg
HVR4000er
 
Posts: 7
Joined: Sun Apr 12, 2009 8:36 am

Re: Harman Kardon Serial Control

Postby kingtd » Mon Apr 13, 2009 2:23 am

If you open up the init.py in a text editor, all of the possible actions are at the top. Just paste in the command code and you're good to go. I went ahead and listed them here as well. As different receivers come out, HK sometimes adds new commands, so if you don't see one here that you need (or if you find one that doesn't work) you may need to go to their website and get the list of codes for your device.

I should really go back and make this one work more like the Onkyo plug-in, but I haven't had the time or inclination to rework it, since it does all I need it to. =)

~K

# POWER ON 80 70 C0 3F
# POWER OFF 80 70 9F 60
# MUTE 80 70 C1 3E
# AVR 82 72 35 CA
# DVD 80 70 D0 2F
# CD 80 70 C4 3B
# TAPE 80 70 CC 33
# VID1 80 70 CA 35
# VID2 80 70 CB 34
# VID3 80 70 CE 31
# VID4 80 70 D1 2E
# VID5 80 70 F0 0F
# AM/FM 80 70 81 7E
# 6CH/8CH 82 72 DB 24
# SLEEP 80 70 DB 24
# SURR 82 72 58 A7
# DOLBY 82 72 50 AF
# DTS 82 72 A0 5F
# DTS NEO:6 82 72 A1 5E
# LOGIC7 82 72 A2 5D
# STEREO 82 72 9B 64
# TEST TONE 82 72 8C 73
# NIGHT 82 72 96 69
# 1 80 70 87 78
# 2 80 70 88 77
# 3 80 70 89 76
# 4 80 70 8A 75
# 5 80 70 8B 74
# 6 80 70 8C 73
# 7 80 70 8D 72
# 8 80 70 8E 71
# 9 80 70 9D 62
# 0 80 70 9E 61
# TUNE UP 80 70 84 7B
# TUNE DOWN 80 70 85 7A
# VOL UP 80 70 C7 38
# VOL DOWN 80 70 C8 37
# PRESET UP 82 72 D0 2F
# PRESET DOWN 82 72 D1 2E
# DIGITAL 82 72 54 AB
# DIGITAL UP 82 72 57 A8
# DIGITAL DOWN 82 72 56 A9
# FMMODE 80 70 93 6C
# DELAY 82 72 52 AD
# DELAY UP 82 72 8A 75
# DELAY DOWN 82 72 8B 74
# COM SET 82 72 84 7B
# COM UP 82 72 99 66
# COM DOWN 82 72 9A 65
# SPEAKER 82 72 53 AC
# SPEAKER UP 82 72 8E 71
# SPEAKER DOWN 82 72 8F 70
# CHANNEL 82 72 5D A2
# RDS 82 72 DD 22
# DIRECT 80 70 9B 64
# CLEAR 82 72 D9 26
# MEMORY 80 70 86 79
# MULTIROOM 82 72 DF 20
# MULTIROOM UP 82 72 5E A1
# MULTIROOM DN 82 72 5F A0
# OSD 82 72 5C A3
# OSD LEFT 82 72 C1 3E
# OSD RIGHT 82 72 C2 3D
# SURR UP 82 72 85 7A
# SURR DOWN 82 72 86 79
# PRESCAN 80 70 96 69
# DIMMER 80 70 DC 23
# FAROUDJA 82 72 C6 39
# TONE 82 72 C5 3A
kingtd
Plugin Developer
 
Posts: 78
Joined: Fri Jul 13, 2007 7:39 am

Re: Harman Kardon Serial Control

Postby HVR4000er » Mon Apr 13, 2009 3:11 am

very thx for the commands. I think, commands become working. It don't must be like Onkyo Plugin.
There are another problem, you said not anything to them. You have don't understand my bad english...? Sorry.
Problem is: Event Ghost dont send any command. Event Ghost tell me a lot of error messages. I switch EventGhost in english language and paste the messages directly here for you:
Error in Action: "Harman Kardon: Send: # POWER ON 80 70 C0 3F "
Traceback (most recent call last) (1484):
File "C:\Programme\EventGhost\eg\Classes\ActionClass.py", line 157, in CallWrapper
File "C:\Programme\EventGhost\plugins\HarmanKardon\__init__.py", line 412, in __call__
File "C:\Programme\EventGhost\plugins\HarmanKardon\__init__.py", line 399, in HexToByte
ValueError: invalid literal for int() with base 16: '#P'


What's the reason of this errors? How I can repair this lines?
HVR4000er
 
Posts: 7
Joined: Sun Apr 12, 2009 8:36 am

Re: Harman Kardon Serial Control

Postby kingtd » Mon Apr 13, 2009 5:55 am

No worries, I think I just wasn't clear enough about the way the commands work. The plug-in is expecting a 4 byte code, and doesn't have error handling for anything else. Just use the 4 hex numbers at the end instead of the whole line:

Comment Command
# POWER ON 80 70 C0 3F

Just use the 80 70 C0 3F part.

You're almost there!
~K
kingtd
Plugin Developer
 
Posts: 78
Joined: Fri Jul 13, 2007 7:39 am

Re: Harman Kardon Serial Control

Postby HVR4000er » Mon Apr 13, 2009 7:02 am

Oh great, plugin works errorless now! :) THX
The next step is, I will go to htpc and connect AVR via nullmodem cable. I hope, it don't any destroy.
HVR4000er
 
Posts: 7
Joined: Sun Apr 12, 2009 8:36 am

Re: Harman Kardon Serial Control

Postby HVR4000er » Mon Apr 13, 2009 7:12 am

Ooops, I need a RS232 Cable male -> female :oops:
HVR4000er
 
Posts: 7
Joined: Sun Apr 12, 2009 8:36 am

Re: Harman Kardon Serial Control

Postby fredtp » Thu Jun 14, 2012 10:34 pm

Is anyone using this plug in with latest version of EventGhost? Installs fine, no errors but when commands are sent, nothing happens...Anyone still watching this?? Thanks for the help in advance!
fredtp
 
Posts: 2
Joined: Thu Jun 14, 2012 10:23 pm

Re: Harman Kardon Serial Control

Postby fredtp » Sun Jun 17, 2012 8:02 pm

FIXED - if anyone is trying to use this and is having an issue, I just had to set the baud rate to 38400 and it works perfectly!
fredtp
 
Posts: 2
Joined: Thu Jun 14, 2012 10:23 pm

Re: Harman Kardon Serial Control

Postby jang430 » Thu Feb 06, 2014 2:51 pm

Hello All,

Hope someone's still watching this thread. I added the plugin to use my Harman AVR 247. Plugin installed successfully. Plugin set as COM1, Baudrate at 38400, Number of bits 8, Parity: No Parity, Stopbits: 1, Flow control: None, Generate events on incoming data unchecked.

When I execute 80 70 9F 60, to turn it off, nothing happens.

harman_event.png
jang430
Experienced User
 
Posts: 55
Joined: Fri Dec 21, 2012 8:24 am

Re: Harman Kardon Serial Control

Postby jang430 » Fri Feb 14, 2014 9:34 am

just a few updates on my last post, this is how usb to serial appears on my system.
harman.png
jang430
Experienced User
 
Posts: 55
Joined: Fri Dec 21, 2012 8:24 am

Re: Harman Kardon Serial Control

Postby jang430 » Wed Feb 26, 2014 7:18 am

Hello. I changed to a different Serial to USB cable, no more ! on my devices. I followed instructions by another to set baud rate to 38400, and still it wasn't working. I have "HK" as prefix set.

When I send commands, it's not responding to it. When I turn off or on the receiver, no events is logged in the window.

I then replaced the serial to usb with a serial cable, from HK's rs232 connected to my pc. Still, no event is being logged whenever I do a power on and off.

Hope someone can help.
jang430
Experienced User
 
Posts: 55
Joined: Fri Dec 21, 2012 8:24 am

Re: Harman Kardon Serial Control

Postby kgschlosser » Fri Jun 05, 2015 6:01 am

jang430 wrote:Hello. I changed to a different Serial to USB cable, no more ! on my devices. I followed instructions by another to set baud rate to 38400, and still it wasn't working. I have "HK" as prefix set.

When I send commands, it's not responding to it. When I turn off or on the receiver, no events is logged in the window.

I then replaced the serial to usb with a serial cable, from HK's rs232 connected to my pc. Still, no event is being logged whenever I do a power on and off.

Hope someone can help.



first thing is first, have you tried a terminal program to see if there is communication??? and also, need the model number because alot of the lower end harman have the serial db9 but only for flashing the AVR, if it is a 2 series. a 247 is the most common, that is not for control!!! only for firmware upgrade. i have a list of all the supported models by serial can't seem to locate it at the moment i will post back when i find it.



the 6XX and 7XX and 7XXX and 6XXX have serial.


if you have a volt ohm meter you need to measure the output voltage of the serial adapter you have. most usb to serial are only 3.3 or 5 volts and the logic on some of them is TTL backwards from rs232 most people don't know that. you need to have old school RS 232 12+ volts the pinning on the cable looking at the connector will look like this
THIS PIN
|
| AND THIS PIN
________|_____|____
\ O O O O O / PIN SIDE NOT WIRE SIDE
\ O O O O /
------------------

gonna take a couple of tries to get it if it's only you checking, set meter to DC colts, plug the adapter into usb, and check voltage
pin on far right is ground pin in the middle is transmit data

don't worry about shorting there is no real current there and that is how they work any ways high and low power and ground blah blah blah

if it reads anything lower than 5 volts is rs232 spec but i am pretty sure the receiver needs to see higher. i screwed around with one of those usb jobs for a while could never get it to latch properly. was intermittent. almost all PC's have a com port they just don't have the connector, you have to go and buy the header (connector to the mainboard). and...
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2699
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Harman Kardon Serial Control

Postby A.Green » Mon Jul 11, 2016 12:28 pm

You can monitoring the data RS232/422/485 COM ports and also displays, logs and analyzes all serial port activity in a system by utility Serial Port Monitor by Eltima. I also used it in my work to "sniff" the serial commands sent/received over the serial port. This product is fully baked. Good developer tech support. Product does all it claims to do. (http://www.eltima.com/products/serial-port-monitor/)
A.Green
 
Posts: 1
Joined: Mon Jul 11, 2016 12:18 pm

Re: Harman Kardon Serial Control

Postby kgschlosser » Mon Jul 11, 2016 7:57 pm

you have to be careful using the analyzers with EG sometimes it will cause a permissions error. this usually occurs if you go into the plugin config and click apply or ok. because the comport gets released and then reconnected in a fast manner and the analyzer doesn't have time to do it's thing and release the port as well. and when the plugin goes to reconnect it thinks the port is in use. because the only way to analyze a serial port is the man in the middle way. either on the wire or by use of virtual com ports and redirection.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2699
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

PreviousNext

Return to Plugin Support

Who is online

Users browsing this forum: No registered users and 5 guests