Page 1 of 2

Ethernet Plugin for Pioneer AV Amplifiers

Posted: Tue Oct 11, 2011 1:46 am
by sergiensergien
Hi, everybody!

This is my first post, so let's it start with a small contibution.

I've modified the Onkyo ethernet plugin for use with the Pioneer AV Amplifiers, adding to it listener capabilities to query the device. I'm not a Python programmer (this is my first program in it), so the code can be a little weird, but it works!!

Thanks to prostetnic, Bartman, Fiasco, FoLLgoTT for the Onkio plugin used as basis for mine.

Changes history:

Release 0.3 - Errors revision
Main changes:
1. Modified On/Off responses from Power status.
2. Handling of device disconnected / non available connection exceptions.
3. Added messages indicating "connected"/"disconnected" status of device.

Release 0.2 - Major revision
Main changes:
1. Variable commands are now supported and working (Volume).
2. Parsing of received hex additional data with verbose info from the device.
3. Standby and Resume is now supported.
4. Added comments into code.
5. Communication socket is now managed into the listener.
6. Debug support added.
Still to do:
1. Compile a full list of Pioneer commands and responses.

Release 0.1 - First Working release
Still to do:
1. Compile a full list of Pioneer commands and responses.
2. Add handling of received numerical values in VOL, PWR, MUT, ... responses.
3. Find how to set the volume to a fixed level.
4. Add conversion of Hex strings that the Pioneer device sends to add extra information.

Ah! Funny thing is my Pioneer AV Reveiver (VSX-920K) theoreticaly cannot be controlled by ethernet. Pioneer's information states that the ethernet controller can only be use for listening Internet radio stations ... but thanks to GS know it can be controlled to the fullest!!!!

Best regards,
Sergio
PioneerEthernet-0.2.zip
(43.9 KiB) Downloaded 501 times

Ethernet Plugin for Pioneer AV Amplifiers -- v0.2 published

Posted: Thu Oct 13, 2011 12:05 am
by sergiensergien
Hi,

I've published v0.2 of the plugin with many changes.

Best regards to all,
Sergien

Re: Ethernet Plugin for Pioneer AV Amplifiers

Posted: Thu Oct 27, 2011 2:44 pm
by Nallebj├Ârn01
Thanks for a very nice plugin! :D :D
I have a Pioneer VSX-921 and it works very nice with it.
(The only problem i can detect is that the plugin? crashes when i change the input.)
Thanks again nice work!

Re: Ethernet Plugin for Pioneer AV Amplifiers

Posted: Fri Oct 28, 2011 3:22 pm
by cguy123
Sergio,

Thank you very much for this plugin. I have a pioneer vsx-1020 and was literally just about to hire someone to code a plugin for it! Thanks for saving me the money and time.

Couple of things to note.

On my system the returned state of power is backwards, so if the receiver is on it says Off, and if the receiver is off I get the following errors:

Error in Action: "Pioneer AV Ethernet: Power On"
Traceback (most recent call last) (1540):
File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 170, in CallWrapper
return self(*args)
File "C:\Program Files (x86)\EventGhost\plugins\PioneerEthernet\__init__.py", line 241, in __call__
datum = self.plugin.eventer.socket.send(str(self.cmd) + '\x0d')

File "socket.pyc", line 165, in _dummy
error: [Errno 9] Bad file descriptor



After this error, even if I manually turn on the receiver again, no other commands work, all giving similar errors to the one above. I assume this is because the listener socket is closed or dead and isn't re-initialized before each command? ?

I don't know if it's possible to 'turn on' the receiver from the network port if it's turned off?? I read someplace else about a 'network standby' setting that would allow the receiver to turn on from the network port, but i looked in my
settings menu and don't see this command. Additionally the icontrol app published by pioneer doesn't work unless the receiver is already on, so I have to assume that function doesn't exist with my receiver.

It would be good to be able to turn off the receiver from the network port, or query the status correctly, so could you look into these issues?

Again,thanks so much for your work here.

- Cguy

Re: Ethernet Plugin for Pioneer AV Amplifiers

Posted: Sat Oct 29, 2011 10:15 am
by sergiensergien
Hi, CGuy123

I'll correct the pluign as you're right ... the Power state is backwards.

The reconnect-on-error problem is something I have to work on. The socket must be open in order to receive all the info that is send by the receiver (it's a very talkative thing, you know). If you are curious, start EventGhost in Debug mode and you will see how much!

The Wakeup problem has the following problem: when the receiver is in Stand-by mode is LAN dead. That is a characteristic of this receiver that I really don't like. A pity!

I'll work on that during the weekend.

Best regards,
Sergio

Re: Ethernet Plugin for Pioneer AV Amplifiers

Posted: Sat Oct 29, 2011 10:17 am
by sergiensergien
Hi, Nallebj├Ârn01

Can you give me more info? Which error gives you back when crashes? If you start EG in debug mode the plugin gives a lot more information.

Best regards,
Sergio

Re: Ethernet Plugin for Pioneer AV Amplifiers

Posted: Sat Oct 29, 2011 1:12 pm
by Nallebj├Ârn01
Hi Sergio,

Can this help?:

Error in Action: "Pioneer AV Ethernet: HTPC"
Traceback (most recent call last) (1534):
File "C:\Program\EventGhost\eg\Classes\ActionBase.py", line 170, in CallWrapper
return self(*args)
File "C:\Program\EventGhost\plugins\PioneerEthernet\__init__.py", line 241, in __call__
datum = self.plugin.eventer.socket.send(str(self.cmd) + '\x0d')
File "socket.pyc", line 165, in _dummy
error: [Errno 9] Bad file descriptor

I am new to this program so i solved it by doing a disable and enable plugin before chosing input so now it works alright.

Thanks again!! :-)

Best regards

Nallebj├Ârn

Re: Ethernet Plugin for Pioneer AV Amplifiers

Posted: Sun Oct 30, 2011 9:37 am
by sergiensergien
Hi,

I've posted a new version of the plugin (v0.3). It should solve the detected issues.

Best regards,
Sergien

Re: Ethernet Plugin for Pioneer AV Amplifiers

Posted: Sun Oct 30, 2011 3:35 pm
by cguy123
Hi,

Thanks again for updating this plugin. I read here about the issue with the ethernet port going dead? Is it possible that sending multiple messages 'wakes' it up ?

Read what this guy did here:

http://www.perceptiveautomation.com/use ... =11&t=6909

and this guy talks about that issue too here:

http://tech.groups.yahoo.com/group/Cres ... age/136506

Something about sending 2 commands., first one wakes up the port, and second gets the command. Not sure if this is the same on IP control, but it's probably worth the read.

Thanks again for your awesome work!

- Cguy

Re: Ethernet Plugin for Pioneer AV Amplifiers

Posted: Sun Oct 30, 2011 5:59 pm
by sergiensergien
Hi, CGuy123

If I read correctly you have an VSX-1020k, so you have a nice option called "Network Standby". If this option is "on" the IP interface is keep connected. Can you tell me if you have it activated?

The problem is that I have a VSK-920k, and this unit does not "officially" have neither the capability to be IP controlled nor the network standby option. So I don't have the capabilities to debug the option.

Ah! I have to work a little into the plugin to solve reconnection after device standby .... it seems that is not working correctly.

Best regards,
Sergio

Re: Ethernet Plugin for Pioneer AV Amplifiers

Posted: Fri Dec 02, 2011 9:00 pm
by kkl
Thanks very much for providing this useful plug-in. Can the result of a command be used? I have a VSX-1120 and would like to set the mode to DOLBY DIGITAL EX. This receiver will not accept that command directly, so I must use the "Dolby Surround Mode (Cycle)" command. When the result is "PIONEER: Says FLO2 : |-DIGITAL EX", I need to know that. However, this info statement does not appear to be usable. I also tried using the event that follows, "PioneerEthernet.Received.Unknown 'LM1103'", but it doesn't seem to trigger. Also, eg.result always yields 'None". Any suggestions on how to get and use the result of a command? Thanks very much.

Re: Ethernet Plugin for Pioneer AV Amplifiers

Posted: Fri Dec 16, 2011 6:12 pm
by rauul
Hi,

I wonder if you can help me catch a "print" from your code. What I need is to change "signal sel". I need to change between HDMI and Digital. as I understands it, I can't to this by commands? So I solved it by sending IR-commands, but I would like to catch which "signal sel" I choose. This is shown in your code as "Pioneer: says FL02: Sigsel Auto. I would like to use this information, tried eg.event.payload etc. But can't get it work.

Any suggestions?

regards,

M

Re: Ethernet Plugin for Pioneer AV Amplifiers

Posted: Thu Dec 22, 2011 12:00 pm
by rauul
I solved it by adding some rows in the .py file in pioneer plugin folder. What I did was to add the follwing into the .py file (think you need to install Python so you can open it with IDLE)

take a look below where it says ###Magnus Kod. What I do is to trigger an event called "balle" instead of just print the information (you don't need to know what balle means in swedish :) )

### The PIONEER device sends a keep-alive consisting only in the terminator
### So if "data" is not empty, we want to process it.
if len(data):
### First we search through our known fixed responses for a match
response = operator.itemgetter(4)
try:
datum = map(response, cmdList).index(str(data))
self.plugin.TriggerEvent("Received." + cmdList[datum][0], None)
except ValueError:
### If not fixed match, it can be a long info message ...
if len(data) > 6:
print "PIONEER: Says " + data[:4] + " : " + binascii.unhexlify(data[4:])
###Magnus Kod
self.plugin.TriggerEvent("Received.balle", str(data))
### Or, perhaps, it's a big hole in our knowledge of Pioneer devices ...
else:
self.plugin.TriggerEvent("Received.Unknown", str(data))
else:
if eg.debugLevel:
print "PIONEER (Debug): Keep alive"

In EG, each time the event is fired (when you change something) the receiver will fire the event (Balle) and with a simple python-script you can translate it to something useful like:

import binascii
eg.globals.opthdmi = binascii.unhexlify(eg.event.payload[4:])
print eg.globals.opthdmi

Now you could use the eg.globals.opthdmi to check what input/mode etc. I check what type of information that I receive and after that I do some actions.

My full Script:

import binascii
eg.globals.opthdmi = binascii.unhexlify(eg.event.payload[4:])
print eg.globals.opthdmi
if str(eg.globals.opthdmi)== "SIGSEL HDMI ":
print 'det kommer HDMI, det vill jag veta'
eg.plugins.CommandFusion.SerialChange(1215, 'HDMI')


elif str(eg.globals.opthdmi) == "SIGSEL ANALOG ":
print 'kommer SIGSEL ANALOG'
eg.plugins.CommandFusion.SerialChange(1215, 'Analogt')


elif str(eg.globals.opthdmi)== "SIGSEL DIGITAL":
print 'kommer Sigsel digital, det vill jag ha'
eg.plugins.CommandFusion.SerialChange(1215, 'Digitalt TV-ljud')

elif str(eg.globals.opthdmi)== "SIGSEL Auto":
print 'kommer Sigsel Auto, det vill jag ha'
eg.plugins.CommandFusion.SerialChange(1215, 'HDMI Auto')

elif str(eg.globals.opthdmi) == "STEREO":
print 'kommer stereo'
#eg.plugins.CommandFusion.SerialChange(1215, 'HDMI')

else:
print 'annat'

Re: Ethernet Plugin for Pioneer AV Amplifiers

Posted: Mon May 07, 2012 11:20 am
by piert
Hi,

This looks rather promising. I am about to buy a new receiver and am thinking of either the Pioneer VSX 2021 or even the more expensive sc lx85.

I would like to know if it is possible to control the multi zones (zone 2 and 3) of these receivers with this plugin.


For example, suppose I am using the receiver to watch TV and somebody else wants to start using zone 2 of the receiver to listen to radio in another room. Is it possible for him/her to fully control this zone (i.e. switch input, set volume, switch the zone on and off, etc.) through Eventghost with this plugin?

Thanks for any information.

Best regards,
Perry

Re: Ethernet Plugin for Pioneer AV Amplifiers

Posted: Tue Nov 20, 2012 8:58 am
by frotzamuta
Hi,
I made some modifications to the Plugin and want to share them with you.
Check it out!

Frotza