PDA

View Full Version : Help a novice



number6.mi
December 27th, 2005, 12:46 PM
I want to use Girder to operate a Meridian processor through a serial connection. There is a download on the Promixis website for a GML file and a serial file which I've attached. The reference manual describes how to download a plug-in that really doesn't seem to help at all in terms of how to add this to the girder software and activate it. Cany anyone tell me how to use this download??

Rob H
December 27th, 2005, 12:51 PM
You can't use it directly with Girder 4 as it's for the serial plugin in Girder 3.3

Do you have a URL for a document describing the serial protocol used by the Meridian?

number6.mi
December 27th, 2005, 01:14 PM
Well that answers that question. The document at the address below has the serial protocol if you have any suggestions.

Ben

http://www.meridian-audio.com/apps/232_G68v12.pdf

Vinny Singh
December 28th, 2005, 11:00 AM
Mike C made a serial LUA script for my projector over here.

http://www.promixis.com/phpBB2/viewtopic.php?t=13627

What if you take the LUA script he wrote, and modify it for your meridian device? Mine takes HEX characters, yours takes ASCII, so those portions would have to be modified. My projector also takes a start code, the code, and then a termination code to work. Mine also doesn't send info back to you (later models might). I don't know what you would do with the return codes, do you need them?

Your hardware is expecting just *2 characters of ASCII, and a CR (carriage return), *sometimes an additional argument of 2 more ASCII characters.

Port settings are standard, 9600 8, N, 1, just like my projector. Your FlowControl might be 'S' or might be 'N' not sure.

If you set LogLevel = true , you can see it in the lua console as you send commands. Make sure you start the console before doing any serial stuff on a fresh restart of Girder.

Promixis
December 28th, 2005, 12:20 PM
Even easier ... ;) try the attached.

Use the serial action from the action tree to send commands.

number6.mi
December 28th, 2005, 03:36 PM
which attached?

Rob H
December 28th, 2005, 03:46 PM
Do you not see a download link in that message? Note that you need to be logged in to see attachments.

number6.mi
January 2nd, 2006, 05:00 AM
Thanks didn't realize you had to be logged in. I've copied the file into serial folder and gone into the serial settings plug in to set the device. I am struggling what to do next. I tried copying the GML file for the original plug in referred to at the start of this string into the GML folder and then opened the GML file in Girder so I see the tree. Is this the right thing to do? Then what? how can I test a command?

Best regards,
Ben

Promixis
January 2nd, 2006, 08:13 AM
the .lua file goes in the plugins/serial directory.

restart girder

goto the setup page/serial plugin tab, select the com port the receiver is attached to, select the Meridian device.

you will send commands to it using the serial action from the tree

see the attached gml that sends a mute command

number6.mi
January 2nd, 2006, 10:50 AM
Afraid I'm still struggling with this and very much appreciate your help. I thought the attached file was to replace the earlier GML file I downloaded from the Promixis site, but it is much smaller and doesn't generate a full tree like the earlier file. Is it a supplement to the earlier GML file or is it incomplete by mistake? I assumed it was a supplement , so at this point, I've copied the earlier GML file into the GML folder and I've used the "Open GML file" button to select the earlier GML file so I can see the tree. I've first been trying to initiate commands using the "test action" button but nothing seems to happen. I don't know if its significant but when I go into the tree, the "general" box has a tick for enabled but has a message that says "plug-in command (unavailable)"

I have gone to the setup page/serial tab and selected com1 and the serial file

Promixis
January 2nd, 2006, 03:30 PM
this gml is just a short test gml to make sure things work. did you try this one? the old gml/ini files do not work.

number6.mi
January 2nd, 2006, 05:22 PM
Sorry it wasn't clear to me. When I open the test file in Girder, it only has a group called new and no commands to test. Am I doing something wrong or is the file not as you thought -- you actually sent me 2 gml files but I assumed they are identical (I can't tell any difference)

Promixis
January 2nd, 2006, 09:05 PM
hm, something must have went wrong with the upload :x

I don't have the file here. From the action tree, add a send command from the serial folder and type in the text you want to sent. Click the test button and see if it works.

number6.mi
January 3rd, 2006, 05:13 AM
:D Success -- I was able to send a serial command. I guess I can go ahead and build a tree myself but I thought I'ld ask if you are a Meridian owner and have a full GML file, or did you just make the Lua file for me from the link to the Meridian web site I provided earlier.

Best regards,

Ben

Promixis
January 3rd, 2006, 10:11 AM
Ben,

I just made the Meridian file for you from the docs.

We would appreciate you zipping up the .lua and .gml files and uploading to the G4 area (goto the front web page/developer/upload) so other users can benefit.

number6.mi
January 3rd, 2006, 10:28 AM
Thanks Mike I will do that. Can you tell me by the way how I can open the lua file to see the coding or how (or where to go in the girder softwhere or elsewhere) to write my own lua files -- not clear to me in any of the girder documentation.

Couple other questions on a separate subjects I was going to post but thought I'ld start by asking you:

Do you know if I can use girder to use an IR remote to start a pc from shutdown or standby (and ideally select as a default one of 2 users set up on the PC)?

Does Girder have a view window you can configure to see the status of the devices it is controlling other than just the default window you see when you show girder?

Best regards,
Ben

Promixis
January 3rd, 2006, 10:53 AM
I think most people use scite for editing lua files outside of G4

http://users.hfx.eastlink.ca/~gisdev/scite-1.67-setup-2.exe

I think you can change the autologon settings via the registry but you cannot use Girder to select a user from the logon screen.


See the OSD help topic in the manual for creating your own windows..

number6.mi
January 3rd, 2006, 11:01 AM
Thanks Mike. Just to clarify, is there anyway to create or edit lua files in girder or do you need scite or a similiar software to do it?

Best regards,
ben

jetblast
January 3rd, 2006, 11:04 AM
Hope you don't mind me joining in with this thread......

I posted the original Meridian gml file which I put together about a year ago.. At the time I felt that Girder along with Netremote and my Dell Axim would be ideal for my requirements ( Controlling my home cinema, comprising of the Meridian proccessor, DVD player, Panasonic Plasma and Sky Satellite ) When it worked it was fantastic. But unfortunatly the whole system was just to unreliable. Mainly the battery life on the Dell and its very flakey Wi-fi were the main culprits, along with the serial plugin causing the occational problem. I eventually gave up and went back to my Philips Pronto.....(not ideal)

However with the introduction of Girder 4 I thought I would give it another go.....I see from the above that there is not an easy way to convert my Meridian file over to Girder 4.(or is there) Basically do I have to start all over again.

Roy

Promixis
January 3rd, 2006, 11:07 AM
Thanks Mike. Just to clarify, is there anyway to create or edit lua files in girder or do you need scite or a similiar software to do it?

Best regards,
ben

Use Scite for code that is not part of the commands in GML's. Ie serial plugins.

For code within G4, you use the luascript action to add/edit code there.

Promixis
January 3rd, 2006, 11:09 AM
Hope you don't mind me joining in with this thread......

I posted the original Meridian gml file which I put together about a year ago.. At the time I felt that Girder along with Netremote and my Dell Axim would be ideal for my requirements ( Controlling my home cinema, comprising of the Meridian proccessor, DVD player, Panasonic Plasma and Sky Satellite ) When it worked it was fantastic. But unfortunatly the whole system was just to unreliable. Mainly the battery life on the Dell and its very flakey Wi-fi were the main culprits, along with the serial plugin causing the occational problem. I eventually gave up and went back to my Philips Pronto.....(not ideal)

However with the introduction of Girder 4 I thought I would give it another go.....I see from the above that there is not an easy way to convert my Meridian file over to Girder 4.(or is there) Basically do I have to start all over again.

Roy

Hi Roy,

There is no upgrade path between G3.3 and G4 serial stuff. It just wasn't doable given the changes in lua syntax and changes between G3 and G4.

However, the lua code you wrote should be convertable without too much effort. I am assuming your were processing the responses from the receiver for display in NR? Post your code here and I will give you a hand.

jetblast
January 3rd, 2006, 11:28 AM
I have to admit that my lua progrmming skills are practically nil.........no not practically, they are nil..... all of the programming was done by Mark F.

I think these are what you mean.....

jetblast
January 3rd, 2006, 11:31 AM
Sorry don't seem to be able to attach the file.......will see if I can later...

number6.mi
January 3rd, 2006, 11:46 AM
Jetblast,

The serial code for the 568 and the G68 are the same, so the Lua file Mike sent in an earlier thread should work for you as well. I think then setting up the GML file is the easy part. I haven't done it yet but plan to by the end of the week and will post it on the girder site when done unless you beat me to it.

Ben

Promixis
January 3rd, 2006, 12:16 PM
attached is an update incorporating Mark's event generation code.

I have changed the global name to MeridianReceiver so it is more obvious when using the Serial Send Action.

jetblast
January 3rd, 2006, 12:46 PM
this was the code that mark f wrote to send info to be displayed on netremote when either the volume changed or a DSP mode changed.....


[Device]
UserName=Meridian 568
Description=Serial plugin support for Meridian 568
[Properties]
BaudRate=6
Handshaking=0
ParityBits=0
WordSize=4
StopBits=0
EnableScript=1
EnableScriptVal=local sourceValues = {"CD","Radio","LP","DTV","TV","Tape1","Cam","Tape2","CDR","Cable","DVD","VCR1","VCR2","Ldisc","LD"} ■local sourceNames={} ■ ■foreachi(sourceValues, function(i,v) %sourceNames[v]=i end) ■ ■Meridian = { ■DeviceName = SerialValue, ■Sources = sourceNames, ■} ■ ■print("Initialized "..Meridian.DeviceName) ■ ■
DisableScript=1
DisableScriptVal=Meridian = nil ■collectgarbage() ■
[InputMessage]
Timeout=30
TimeoutValid=1
Timeout2=1
Timeout2Valid=0
ShowEvents=0
TermVal=13
TermSize=1
TerminatorProcessing=1
PrefixProcessing=0
Length=1
Translate=0
Type=2
BufferLength=100
UseName=0
NoCharEvents=0
CharEventScript=1
CharEventScriptString= ■-- define local variable for parsed data ■local fields={n=0} ■-- parse the data (based on white space) into the fields table ■gsub(SerialValue, "(%w+)", function (w) tinsert(%fields, w) end) ■-- if this is a source message ■if (Meridian.Sources[fields[1]] ~= nil) then ■ -- send an event to Girder ■ TriggerEvent(Meridian.DeviceName.." Source", 18, fields[1], fields[2]) ■else ■ -- send an event to Girder ■ TriggerEvent(Meridian.DeviceName.." Other", 18, fields[1], fields[2]) ■end ■
ModemEventScript=0
ModemEventScriptString=
RawChar=0
SilentErrors=0
[OutputMessage]
Timeout=10
TimeoutValid=0
Timeout2=1
Timeout2Valid=0
ShowEvents=0
TermVal=13
TermSize=1
TerminatorProcessing=1
PrefixProcessing=0
Length=1
Translate=0
Type=1
BufferLength=201
UseName=0
NoCharEvents=0
CharEventScript=0
CharEventScriptString=
ModemEventScript=0
ModemEventScriptString=
RawChar=0
SilentErrors=0

Promixis
January 3rd, 2006, 12:54 PM
see the updated download

jetblast
January 3rd, 2006, 01:16 PM
Sorry about that......should have refreshed the page before posting

Roy

P.S. I see that you recommend the Axim as the PPC of choice for Netremote...As I said before I had lots of problems with the Wi-Fi on mine and was one of the main reasons for giving up last time.....Have they improved with the latest version (maybe there is a new firmware for mine).....

Thanks again for the file

Promixis
January 3rd, 2006, 01:25 PM
Sorry about that......should have refreshed the page before posting

Roy

P.S. I see that you recommend the Axim as the PPC of choice for Netremote...As I said before I had lots of problems with the Wi-Fi on mine and was one of the main reasons for giving up last time.....Have they improved with the latest version (maybe there is a new firmware for mine).....

Thanks again for the file

I have had 5 Axims and generally no wifi issues.

I think it comes down to getting the right PPC and router. I have a linksys router WRTGS54.

jetblast
January 3rd, 2006, 03:22 PM
Having problems with Norton now....... I have upgraded to antvirus 2006 and when I launch Girder it say's it has blocked an intrusion attempt...when I ask for more info It displays the following

Security rule Default Block Netspy Trojan horse
Date
time
path D:\Hobbies\Home Cinema\Girder\girder.exe
File name Girder
Direction Inbound
Local address all local network adapters
Local port 1024
protocol TCP

Does this stop Netremote talking to Girder

I did try a search but didn't come up with anything

jetblast
January 3rd, 2006, 03:28 PM
So sorry .......forget the above


fixed it.......................

number6.mi
January 3rd, 2006, 03:55 PM
Mike,
At present, I'm not planning to use netremote. Does the updated file you sent have any benefits if I'm only using girder or, even if no benefits, will it work as well as the earlier file if I'm only using girder?

Best regards,
Ben

Promixis
January 3rd, 2006, 04:54 PM
Ben,

It does generate events and the naming makes more sense etc etc.

Ron
January 3rd, 2006, 05:30 PM
If you are using Girder 4 please change the Girder setting inside NetRemote to be Girder 4 as well. Try again.

jetblast
January 4th, 2006, 08:49 AM
As part of my Meridian gml (Girder 3) I had the facility to send info to be displayed on the Netremote remote (Dell Axim)

I used the following

NetRemote.SendLabel("MeridianVolume",pld2,pld1)

and

NetRemote.SendLabel("MeridianDSP",pld1)

When I try to run these Girder reports a Script error

Is this now done differently in Girder 4

Could you point me in the right direction........

Thanks again

Rob H
January 4th, 2006, 09:20 AM
What's the error that you are getting? Open the Interactive Lua Console to see the full error message.

jetblast
January 4th, 2006, 09:38 AM
The full error is

TreeScript (gir_event): ...\Hobbies\Home Cinema\Girder\/plugins/serial/init.lua:434: attempt to index field `SendQueMutex' (a nil value)
stack traceback:
...\Hobbies\Home Cinema\Girder\/plugins/serial/init.lua:434: in function `QueInsert'
...\Hobbies\Home Cinema\Girder\/plugins/serial/init.lua:403: in function `SendCommand'
...Home Cinema\Girder\/plugins/treescript/Serial UI.lua:62: in function <...Home Cinema\Girder\/plugins/treescript/Serial UI.lua:44>
Volume Changed too old: read version 4.0; expected at least 5.0

Rob H
January 4th, 2006, 10:32 AM
Hmm... none of that has anything to do with sending information to NetRemote.

One thing though - the line


Volume Changed too old: read version 4.0; expected at least 5.0

means you need to edit and save the Volume Changed action to get it recompiled as a Lua 5 script.

number6.mi
January 7th, 2006, 04:45 AM
I've programmed a GML file for the Meridian G68 functions (but not the commands for other Meridian source equipment). Very happy with how well this seems to work for Meridian and now I need to figure out what else I might want to use the Girder software for. Great thanks to Mike for all the help.

I've uploaded the file and the latest Lua file to the Promixis site and can see it in "My uploads" but not anywhere else on the site. Is there something I need to do to make it generally accessable? I've also attached the files to this post.

Rob H
January 7th, 2006, 04:52 AM
Files need to be approved (by Mike or Ron) before they are generally downloadable.

number6.mi
January 7th, 2006, 05:36 AM
Earlier in this string I asked about using the OSD functionality. When I look this up in the manual it immediately starts talking about templates and showing programming logic without any simple explanation I can see of where or how to do this or access the functionality in Girder. Can someone tell me in a logical way where or how in Girder I can find or use this functionality, ie do I need to create a new command tree file and then where are the actions to select, or is the functionality accessed or used elsewhere.

Promixis
January 7th, 2006, 07:19 AM
Earlier in this string I asked about using the OSD functionality. When I look this up in the manual it immediately starts talking about templates and showing programming logic without any simple explanation I can see of where or how to do this or access the functionality in Girder. Can someone tell me in a logical way where or how in Girder I can find or use this functionality, ie do I need to create a new command tree file and then where are the actions to select, or is the functionality accessed or used elsewhere.

The OSD Menu is only availabe from lua, ie not the Action Tree. You need to add a scripting action. What are you trying to do?

number6.mi
January 14th, 2006, 04:27 AM
Guess, main functionality I was look for was a user-friendly display of the present status the Meridian processor you helped me program serial codes for -- the processor returns a message which in effect is the status

I just have no idea where I'm supposed to go in the software or in the promixis site to create this functionality. Is it something I find in the developer section of the site or do I need to use the Scintilla editor you sent me to write code shown in the Girder documentation. Maybe it's just me, but a general comment on the documentation is it seems to contain lots of information but it never puts the information in an overall context of where or how you do things.

Separate question, I have a streamzap remote. I'm struggling to get it to work through Girder. I ticked the serial box and when I press the remote buttons, the green bars in the bottom of the girder window blink like its receiving something but nothing happens. I'm specifically trying to use the arrow keys for the mouse. Do I need to create a GML file? I'm using the USB UIRT receiver instead of the streamzap receiver.

Promixis
January 14th, 2006, 08:38 AM
You want a status osd or a menu osd?

status would be easy...

you could do this in the receive method of the meridian.lua file using

local settings = table.copy (osd.Styles.StatusLightBlue)

settings.Text = 'MeridianOSD' -- set this to display the text you want

local OSD = osd.Classes.Text:New (settings)
OSD:Show ()

or add actions to the girder tree tracking the source change events you we have the file generating.

Promixis
January 14th, 2006, 08:39 AM
re the streamzap, please read the section of the manual on mapping your remote.

number6.mi
January 14th, 2006, 10:07 AM
Mike,

If I go the lua route, would it open a separate window or screen displaying the info?
I've opened the lua file with scintilla editor but it's not clear what I would do next. Could you explain more specifically (ideally step by step) how I incorporate the language indicated (e.g. do I just insert it into the file and is there a specific button in the edit menu I would select to go about this).

If I go the girder tree route, would it also open a separate window or screen, or would it somehow display the info in the existing girder window (If I do open one of the action windows on the girder tree, it already shows the status and I was looking to see the status in the general girder window). If this makes any sense, and their are actions I can add to show the status in the general girder window, what specifically is the name of the action from the action menu on the left of the girder window?

number6.mi
January 14th, 2006, 10:46 AM
For the bass level on my processor, I can send a serial command to set a specific level (for example level 5 or level 10), but the processor does not seem to have a command to tell it to just go up one increment in level (property of the processor, not girder). I can kind of get around this by just programming actions for each level in the range allowed (-05 to +5 input as the last 2 characters of a string) and then attach an IR code to each level. While probably unlikely, I thought I'ld at least ask if there is a way Girder could be configured to tell the processor to go to the next level whatever it is, either by 1) moving to the next action in a girder tree each time it receives the same command or 2) setting up a serial command string defined with a range of values where the girder changes the last two characters by a define increment each time an IR command is received.

Promixis
January 14th, 2006, 03:54 PM
For the bass level on my processor, I can send a serial command to set a specific level (for example level 5 or level 10), but the processor does not seem to have a command to tell it to just go up one increment in level (property of the processor, not girder). I can kind of get around this by just programming actions for each level in the range allowed (-05 to +5 input as the last 2 characters of a string) and then attach an IR code to each level. While probably unlikely, I thought I'ld at least ask if there is a way Girder could be configured to tell the processor to go to the next level whatever it is, either by 1) moving to the next action in a girder tree each time it receives the same command or 2) setting up a serial command string defined with a range of values where the girder changes the last two characters by a define increment each time an IR command is received.

you could track this within lua and girder but keeping them in sync would be the issue.

Promixis
January 14th, 2006, 03:56 PM
Mike,

If I go the lua route, would it open a separate window or screen displaying the info?
I've opened the lua file with scintilla editor but it's not clear what I would do next. Could you explain more specifically (ideally step by step) how I incorporate the language indicated (e.g. do I just insert it into the file and is there a specific button in the edit menu I would select to go about this).

If I go the girder tree route, would it also open a separate window or screen, or would it somehow display the info in the existing girder window (If I do open one of the action windows on the girder tree, it already shows the status and I was looking to see the status in the general girder window). If this makes any sense, and their are actions I can add to show the status in the general girder window, what specifically is the name of the action from the action menu on the left of the girder window?

Where do you want the info displayed... I am assuming you want it on an OSD ie a window that pops up and goes away alittle later?

The .lua file you have generates events in the logger. Have you see them?