Pioneer Elite Receiver Plug-in

Repository of MainLobby Server plug-ins and updates not available in the current installation.

Postby srgny » Mon Apr 17, 2006 6:18 pm

OK, I looked up the Pioneer RS232 codes. To find out the power status send ?P<CR>. This should return PWR0 or PWR1. Map commands:
command name: powerstatus
incoming:PWR*
mlservecmd to run:MLServeCmd.Macro|SetVariable|power~<<*1>>!MLConditional|IsEqual##{{power}}##1##elitestatus~off##elitestatus~off
srgny
Intermediate
Intermediate
 
Posts: 392
Joined: Tue Jun 22, 2004 8:43 am

Postby srgny » Mon Apr 17, 2006 6:24 pm

You probably have the "append CR and LF" box checked. Uncheck this box. You need to follow your commands with a carriage retun ONLY. To do this you need to "capture" a carriage return symbol. This looks like a small rectangle. See previous posts to learn how to do this.
srgny
Intermediate
Intermediate
 
Posts: 392
Joined: Tue Jun 22, 2004 8:43 am

Postby srgny » Mon Apr 17, 2006 6:40 pm

Oops. Should be:

MLServeCmd.Macro|SetVariable|power~<<*1>>!MLConditional|IsEqual##{{power}}##1##elitestatus~off##elitestatus~on
srgny
Intermediate
Intermediate
 
Posts: 392
Joined: Tue Jun 22, 2004 8:43 am

Postby AccessHA » Mon Apr 17, 2006 11:08 pm

srgny,

At the bare minimum, I'm going to owe you a six-pack when we figure this out. :? I’ve attached a log file that logged two sets of power ON/OFF commands. The first ON command works like a champ, after that it gets ugly.

I have the following mapped commands…

Name: poweron
Incoming: PO<cr>

Name: poweroff
Incoming: PF<cr>

Name: elitestatus
Incoming: ?P<cr>

Name: pioneerpowerstatus
Incoming: PWR*
MLServeCmd to Run: MLServeCmd.Macro|SetVariable|power~<<*1>>!MLConditional|IsEqual##{{power}}##1##elitestatus~off##elitestatus~on

Append CR LF to send command is de-selected. I’ve also copied the carriage return symbol as suggested in other threads.

Did I setup the mapped commands properly?
Hell-bent on automating everything! I’m too lazy to do anything else.

www.accessHA.com
Access Home Automation
The ultimate Insteon resource on the web.
User avatar
AccessHA
Expert
Expert
 
Posts: 644
Joined: Sun Feb 13, 2005 8:44 pm
Location: MI

Postby AccessHA » Mon Apr 17, 2006 11:09 pm

Hmmm... attachments aren’t working. I'll try to post a link to it.
Last edited by AccessHA on Mon Apr 17, 2006 11:27 pm, edited 1 time in total.
Hell-bent on automating everything! I’m too lazy to do anything else.

www.accessHA.com
Access Home Automation
The ultimate Insteon resource on the web.
User avatar
AccessHA
Expert
Expert
 
Posts: 644
Joined: Sun Feb 13, 2005 8:44 pm
Location: MI

Postby srgny » Mon Apr 17, 2006 11:26 pm

Whoa, that is WAY too much data for me. What is the return if you send ?P<cr>
By the way, the commands:
PO<cr> = Power On – Answer = PWRX<cr+lf> *2
PF<cr> = Power Off - Answer = PWRX<cr+lf> *2
?P<cr> = Request Power Status – Answer = PWRX<cr+lf> *2
are wrong. The *2 part refers to a footnote. Sending PO<cr> should return PWR0<cr><lf>.

Try setting the terminating character to 13 in the little box at the lower right corner of the generiic serial dialogue screen. The added <lf> on the returns may be screwing up the variable assignment.
srgny
Intermediate
Intermediate
 
Posts: 392
Joined: Tue Jun 22, 2004 8:43 am

Postby AccessHA » Mon Apr 17, 2006 11:32 pm

srgny wrote:Whoa, that is WAY too much data for me. What is the return if you send ?P<cr>
By the way, the commands:
PO<cr> = Power On – Answer = PWRX<cr+lf> *2
PF<cr> = Power Off - Answer = PWRX<cr+lf> *2
?P<cr> = Request Power Status – Answer = PWRX<cr+lf> *2
are wrong. The *2 part refers to a footnote. Sending PO<cr> should return PWR0<cr><lf>.

Try setting the terminating character to 13 in the little box at the lower right corner of the generiic serial dialogue screen. The added <lf> on the returns may be screwing up the variable assignment.


:) I'm with you. I'm only using the PO<cr> and not the footnote. The terminating character is set to 13.

Check this link for the actual log.

http://www.accessha.com/forums/showthre ... 8#post7218
Hell-bent on automating everything! I’m too lazy to do anything else.

www.accessHA.com
Access Home Automation
The ultimate Insteon resource on the web.
User avatar
AccessHA
Expert
Expert
 
Posts: 644
Joined: Sun Feb 13, 2005 8:44 pm
Location: MI

Postby srgny » Mon Apr 17, 2006 11:34 pm

OK. In reviewing your log, I see this:

WILDCARD matches located 1 commands to execute
Executing Command: pioneerpowerstatus - MLServeCmd.Macro|SetVariable|power~<<*1>>!MLConditional|IsEqual##{{power}}##1##elitestatus~off##elitestatus~on
Command processing completed successfully


Received data:
- Writing out ascii value
Char - 1 - Value =
- Asc = 10
Current Buffer =

The top stuff shows that the wildcard match was made and the ML command was issued. The bottom stuff shows receipt of a <lf>. This may be the problem. It looks like you are getting alot of these.
srgny
Intermediate
Intermediate
 
Posts: 392
Joined: Tue Jun 22, 2004 8:43 am

Postby srgny » Mon Apr 17, 2006 11:45 pm

Try setting the terminating character to 10. It seems like all your returns end with a <lf>, That's the problem.
srgny
Intermediate
Intermediate
 
Posts: 392
Joined: Tue Jun 22, 2004 8:43 am

Postby srgny » Mon Apr 17, 2006 11:51 pm

When (and how) did I become a senior member? I'm really not all that well-versed in this stuff.
srgny
Intermediate
Intermediate
 
Posts: 392
Joined: Tue Jun 22, 2004 8:43 am

Postby AccessHA » Tue Apr 18, 2006 10:04 am

srgny wrote:When (and how) did I become a senior member? I'm really not all that well-versed in this stuff.

You reached the magic 100 posts! :shock:

You hit the nail on the head with the line feed being the issue. I finally pulled out the trusty ACSII to Decimal conversion table and walked through the log as well.

So I tried what you suggested and put a 10 in the Terminating Character box for the various command maps. Unfortunately, I’m still getting the same <lf> responses.

How does Terminating Character in the Map Commands window and Terminate incoming on character code [or string] in the main GenericSerial window differ?

Reviewing the log, it almost looks like I’m getting an <lf> before the second response and not after the first. Maybe this is an incorrect assumption on my part but it:

1) Processes the power on command (PO<cr>) and then responds properly with PWR0.
2) Runs the MLServeCMD.
3) The next response is <lf> and then LM128 which is the mode identifier (stereo).

Now in the Generic Serial plug-in Incoming Data window it looks like:

?LM128
PWR0

So the fact that the question mark is in front of the ML128 and not at the end of PWR0 leads me to believe the <lf> is coming before the second response. Obviously the question mark is the <lf> which was causing some confusion. This must be a glitch in MLGenericSerial or MLServer in general?
Hell-bent on automating everything! I’m too lazy to do anything else.

www.accessHA.com
Access Home Automation
The ultimate Insteon resource on the web.
User avatar
AccessHA
Expert
Expert
 
Posts: 644
Joined: Sun Feb 13, 2005 8:44 pm
Location: MI

Postby srgny » Tue Apr 18, 2006 4:36 pm

You wrote:
How does Terminating Character in the Map Commands window and Terminate incoming on character code [or string] in the main GenericSerial window differ?

I'm not sure how these differ, but I suspect herein lies the root of your problem. As it stands now, the MLGS plugin "sees" the first Elite response as PWR0<cr> with the <cr> teminating the reply. The Elite actually sends PWR0<cr><lf>. Unfortunately, the plugin "reads" the <lf> as the first character of the NEXT elite response. Hence the "?" at the beginning.

Try a PM to Mario or Dave to see if they can help you get the MLGenericSerial to somehow ignore the extra line feeds sent with every reply. Also, you might try to use 1310 (=<cr><lf>)to terminate incoming character code in the main window.
srgny
Intermediate
Intermediate
 
Posts: 392
Joined: Tue Jun 22, 2004 8:43 am

Postby AccessHA » Tue Apr 18, 2006 8:07 pm

srgny,

Thanks again for all your help. I'll take your advice and fire off an email to Dave and Mario. Hopefully there is a way to handle or discard the <lf>.
Hell-bent on automating everything! I’m too lazy to do anything else.

www.accessHA.com
Access Home Automation
The ultimate Insteon resource on the web.
User avatar
AccessHA
Expert
Expert
 
Posts: 644
Joined: Sun Feb 13, 2005 8:44 pm
Location: MI

Elite Pioneer Plug-In

Postby geislerk » Sat Sep 02, 2006 8:49 am

I too was trying to get the Generic Serial plugin to work for my VSX-52TX, but I was having some problems just like you have described. So I have started writing my own plugin modeled after the Sony 777ES plugin. It can support up to 4 Elite VSXs using direct serial com port or using a Global Cache (GC-100). If anybody is interested in testing this plugin, please let me know. I have a little bit more work to do, but most of the plugin works.
geislerk
New Member
New Member
 
Posts: 26
Joined: Wed Jan 12, 2005 10:53 pm
Location: Dallas, TX

Postby AccessHA » Sat Sep 02, 2006 10:04 am

Hi geislerk,

I'm very interested! Will it work on a standard serial port as well?
Hell-bent on automating everything! I’m too lazy to do anything else.

www.accessHA.com
Access Home Automation
The ultimate Insteon resource on the web.
User avatar
AccessHA
Expert
Expert
 
Posts: 644
Joined: Sun Feb 13, 2005 8:44 pm
Location: MI

PreviousNext

Return to MLServer Plug-Ins

Who is online

Users browsing this forum: No registered users and 1 guest