MLGenericSerial plugin v2.0

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

MLGenericSerial plugin v2.0

Postby rlindblad » Tue Apr 12, 2005 9:38 am

This plugin should also be available on the Cinemar website plugin page. The .dll file version is 2.0.0.119, dated 5/12/2005.

The zip file contains 2 files, a MLGenericSerial.msi file and the MLGenericSerial.pdf file. Follow the instructions included in the pdf to install the plugin. Also note the plugin installs an additional copy of the documentation with a shortcut in Start ->All Program -> MainLobby Server. I wanted to make sure the documenation was available both before and after installation... :shock:

Bob
Attachments
MLGenericSerial.zip
(529.55 KiB) Downloaded 227 times
Last edited by rlindblad on Fri Jun 24, 2005 8:37 am, edited 2 times in total.
rlindblad
Expert
Expert
 
Posts: 712
Joined: Sat Jan 29, 2005 2:15 pm

Termination options

Postby pantherman007 » Mon May 23, 2005 7:35 pm

The updated plugin looks great, but I'm running into a problem with my Pioneer elite receiver. It's RS232 documentation states that it accepts ASCII commands terminated by a carriage return only - sending a CR + LF causes an error and all subsequent commands to fail. So two questions for the masses:

1) Can the "append CR LF" option in the plugin be split so that none/one/both could be selected?
2) If this issue is a purely a Pioneer quirk and #1 wouldn't benefit most people, can I translate the spec commands provided in ASCII into HEX myself and append just the 13? (Basically, anyone know if serial devices can accept both types of commands before I go to the trouble to convert the commands over?)

Thanks -

Blake
pantherman007
New Member
New Member
 
Posts: 38
Joined: Fri Nov 14, 2003 10:46 pm

Postby Near76 » Sun May 29, 2005 4:33 pm

I'm trying to make a device for an AudioAccess PX-700 and have a question. If I request a zone status update I get the following hex response: 7E10010463, followed by 4 bytes representing source, volume, bass, and treble values. Is it possible to parse each one of these data bytes into a different MLServer variable? I read the PDF help, but I'm still not sure how or if this can be done. Thanks.
-Matt
Near76
Intermediate
Intermediate
 
Posts: 423
Joined: Sun Jul 18, 2004 7:45 am

Strange Things?

Postby jpimentel » Mon Jun 13, 2005 8:16 am

Hi,

I have worked out most of the issues using this very cool and much needed plugin. With this tool, I see my abilities to use ML somewhat endless!! Very nice feature set and implementation.

So... on to the strange thing. I am writing a device for an Integra Receiver. When I execute a power on, or power off to this unit, it is sending MLServeCmds even though I have none specified for that event.

What appears to be happening is that my mapped commands for power on and power off are being matched when I send a power on or off command. I guess this is sort of expected although it would be better if we could separate outgoing mapped commands from incoming ones. But, then for some strange reason, I see a CAV66 command being generated whenever I send power on or off to the unit. Specifically the comand is:

MLServeCmd.MLCAV66|Keypad~1~1~PowerToggle

Could there be some corruption or crosstalk in the plugins?

This is a complete befuddlement to me. Any suggestions on debugging this would be appreciated.

Thanks,

John

EDIT: I removed the CAV66 plugin and all MLServer Command Maps and the command is still being generated!
Regards,

John
User avatar
jpimentel
Expert
Expert
 
Posts: 591
Joined: Tue Feb 04, 2003 12:28 pm
Location: Waterford, WI

Postby rlindblad » Mon Jun 13, 2005 8:43 am

John,

How are you sending this command? Button, command map? This doesn't sound like a MLGenericSerial plugin problem. If you want you can turn debugging on and send me the logs. If you need help on how to do that let me know. Lior, the person who wrote the plugin is out of pocket currently (vacation) and won't be back until the end of the month so I will try and help if I can.

Thanks,

Bob

PS - I noticed the other posts (the CR+LF and multi variable use) haven't been answered. Have the problems been figured out yet?
rlindblad
Expert
Expert
 
Posts: 712
Joined: Sat Jan 29, 2005 2:15 pm

Postby jpimentel » Mon Jun 13, 2005 9:24 am

Hi Bob,

Thanks for your willingness to help out.

I am sending the commands from inside the plugin using the manual send feature. If I unplug the serial port from the receiver, it seems to go away, so this implies the data to/from the receiver is triggering the command. I am going to try to install the plugin on a clean PC and see what hapens. This one has been around the block a few times...

Best,

John
Regards,

John
User avatar
jpimentel
Expert
Expert
 
Posts: 591
Joined: Tue Feb 04, 2003 12:28 pm
Location: Waterford, WI

Postby rlindblad » Mon Jun 13, 2005 9:30 am

Could you turn on debugging and send me the log? Is there a device defined at all in the MLGenericSerial plugin? Is the device showing as connected? From what you seem to be saying, there shouldn't be anything in the command maps, is this true? If you delete the device and recreate it, does the same thing happen?

Thanks,

Bob
rlindblad
Expert
Expert
 
Posts: 712
Joined: Sat Jan 29, 2005 2:15 pm

Postby jpimentel » Mon Jun 13, 2005 9:45 am

Hi Again,

Yes, There is a device defined and it is connected and the commands sent to the unit are working perfectly. I am able to capture volume levels and store to variables execute power on / off turn volume up and down switch inputs etc. no problem.

Also you are correct in saying I have no MLServer command maps. I deleted them all to troubleshoot this. I am trying to create the device on a new machine and I will let you kow what happens in a few minutes
Attachments
MLGeneric.zip
(1.74 KiB) Downloaded 56 times
Regards,

John
User avatar
jpimentel
Expert
Expert
 
Posts: 591
Joined: Tue Feb 04, 2003 12:28 pm
Location: Waterford, WI

Postby Guest » Mon Jun 13, 2005 10:14 am

OK, It must be a qwerk (sp) in my dev. system. I installed on this fresh system and no issues yet. I am going to install the CAV66 plugin and see if that has any effect.

JP
Guest
 

Postby rlindblad » Mon Jun 13, 2005 10:33 am

Let me know if I can help with anything else...

Bob
rlindblad
Expert
Expert
 
Posts: 712
Joined: Sat Jan 29, 2005 2:15 pm

Hex to decimal conversion??

Postby jpimentel » Wed Jun 15, 2005 10:21 pm

Well after a short period of bliss I find myself in a bind again.

As it turns out the Integra (and Onkyo I suppose) receivers communicate their numbers in a kind of strange way. They take their hex values and convert them to an ascii equivalent and send them across as part of an ascii string.

The issue I am having is trying to set a variable for the volume that accurately reflects what the front panel says.

The front panel says 0-100 or depending on the model may have some offset from 0, but the range is still 100 ticks.

For the main zone, they report this level as a ascii string as follows:

!1MVL00 is 0 volume
!1MVL0a is 10 volume
!1MVL20 is 32 volume

I think you get the idea. So if I call for a sting I can strip out the last two digits easily enough and display those, but who wants to do a hex to decimal conversion in their head?? Not me, that's for sure.

If I call the variable hex data I simply get the hex representation of the two digits and likewise for ascii I get the acsii decimal value.

So for a volume status of !1MVL3C the following data can be stripped

String gives me... 3c (probably the most useful because it at least incremnts in an orderly way).
Hex gives me... 3363 and
Decimal gives me... 5199

So to make along story short, I think I need a way to convert the digits I strip out from the string from hex to decimal. I know this function is in every basic scripting and programming language, but I don't see a way to do it in MLServer or this plugin.

Any ideas??

Thanks in advance.
Regards,

John
User avatar
jpimentel
Expert
Expert
 
Posts: 591
Joined: Tue Feb 04, 2003 12:28 pm
Location: Waterford, WI

Postby rlindblad » Wed Jun 15, 2005 11:04 pm

John,

Look at variable substitution at the end of the PDF documentation. Especially at the Hex/Decimal (*, #, x) variable identifiers.

Does that answer your problem?

Bob
rlindblad
Expert
Expert
 
Posts: 712
Joined: Sat Jan 29, 2005 2:15 pm

Postby jpimentel » Wed Jun 15, 2005 11:19 pm

Hi Thanks for the quick response.

I have read that section several times and conducted numerous experiments Unfortunately no, the various identifiers * string, # for ASCII and x for hex do what I explained in my previous post. The raw data is sent over as an ascii string but represents a hex # of the actual volume level.

The basic issue is that when you jump from "9" to "a" in ascii there is a jump of 39 integers to get there. Otherwise I could strip out the digits individually subtract the offset that ascii imposes and multiply MSD by the base of the digit (16) then add them together again and get a real # for displaying. But for now the best I can do is strip out the string and wind up with a hex # that wants to be converted somehow. MLMATH was a thought, but is has the same math functions as the Generic Serial plugin does.

Any other thoughts?
Regards,

John
User avatar
jpimentel
Expert
Expert
 
Posts: 591
Joined: Tue Feb 04, 2003 12:28 pm
Location: Waterford, WI

Postby rlindblad » Thu Jun 16, 2005 8:17 am

Well, you can always write a plugin yourself to handle it. Look at my plugin for the Yamaha volume control. It is doing basically what you want, but in reverse. I was using it to control output from a slider (1-100) and manipulate it into a 200 step hex value to send to the receiver.

Maybe that will show you the way?

Bob
rlindblad
Expert
Expert
 
Posts: 712
Joined: Sat Jan 29, 2005 2:15 pm

Postby Guest » Thu Jun 16, 2005 9:05 am

Hi Bob,

I think that is the only solution. Is there a way you can send me your plugin so I can see how it is done? I am not really a code developer, but I have written tons of scripts and even a few C programs in the old days.

Thanks for your help!

John
Guest
 

Next

Return to MLServer Plug-Ins

Who is online

Users browsing this forum: No registered users and 0 guests