External Control of MLServer 4

Topics related to MLServer 4
User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

External Control of MLServer 4

Postby CinemarDave » Fri Mar 02, 2012 3:02 pm

With today's release of MLServer 4 (version 4.0.4444.22949) you are now able to control MLServer from any external device capable of opening a network connection to the server. MLServer now supports a standard Telnet interface for command and control of the server. Telnet port 23 is used by default but you can change the port to any other open port in the server settings.

The Telnet interface is really simple to implement.
Open the port
Send any valid MLServer command using standard MLServer command syntax. Terminate the command with a carriage return (char 13).
If you want to know the value of a server variable send the command GetVariable|SomeVariableName and the server will respond with the current value of the variable.

This should allow MLServer to be easily integrated into existing Crestron, Control 4, AMX and RTI environments. If you develop integration with MLServer using this functionality please be sure to tell us about it.

User avatar
rondepping
Expert
Expert
Posts: 638
Joined: Sat Jan 08, 2005 9:18 pm
Location: Grand Blanc, Mi
Contact:

Re: External Control of MLServer 4

Postby rondepping » Sun Mar 04, 2012 4:33 pm

Dave,

Was playing connecting using telent, when disconnecting the message in the log looks is not the correct vaule.

3/3/2012 1:55:55 PM Telnet_ConnectionsChanged Connection from ÿûÿû ÿûÿû'ÿýÿûÿý terminated

[EDIT]
Should Server variables be evaluated? Doesn't appear to be at least using getvariable, see the output below.

getvariable|{{weather_current_temp{{Weather_units}}}
{{weather_current_temp{{Weather_units}}}=
getvariable|{{weather_current_tempf}}
{{weather_current_tempf}}=
getvariable|weather_current_tempf
weather_current_tempf=28
getvariable|weather_current_temp{{Weather_units}}
weather_current_temp{{Weather_units}}=

proaudiocd
Newbie
Newbie
Posts: 1
Joined: Thu Aug 06, 2009 11:23 pm
Contact:

Re: External Control of MLServer 4

Postby proaudiocd » Sat Mar 10, 2012 10:40 pm

i use commandfusion to take control of MLserver V4 with telnet,work fine but can i see feedback with getvariable|somename

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: External Control of MLServer 4

Postby CinemarDave » Sun Mar 11, 2012 11:43 am

Do not surround the GetVariable requests with {{ }}

getvariable|{{weather_current_temp{{Weather_units}}}} == Not Okay
getvariable|weather_current_temp{{Weather_units}} == Okay

getvariable|{{weather_current_tempf}} == Not Okay
getvariable|weather_current_tempf == Okay

Note: since there is no real {{clientname}} via telnet any server variables with an embedded clientname must be translated prior to using the GetVariable request

getvariable|movies_activeplayer_{{clientname}} == Not Okay
getvariable|movies_activeplayer_myclient1 == Okay

User avatar
rondepping
Expert
Expert
Posts: 638
Joined: Sat Jan 08, 2005 9:18 pm
Location: Grand Blanc, Mi
Contact:

Re: External Control of MLServer 4

Postby rondepping » Sun Mar 11, 2012 3:04 pm

Dave,

getvariable|weather_current_tempf == Okay -- Works
getvariable|movies_activeplayer_myclient1 == Okay --Works
getvariable|weather_current_temp{{Weather_units}} == Okay -- Doesn't work.

I get :
getvariable|weather_current_temp{{Weather_units}}
weather_current_temp{{Weather_units}}=

So I'm assuming that there is no variable substution allowed, or is it a bug and that should work?

Thanks,

Ron

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: External Control of MLServer 4

Postby CinemarDave » Sun Mar 11, 2012 3:37 pm

No variables substitution does work. I thought it was working fine for me. I'll recheck.

shakey
Intermediate
Intermediate
Posts: 285
Joined: Sat Jun 28, 2008 9:55 pm
Contact:

Re: External Control of MLServer 4

Postby shakey » Sun Mar 18, 2012 4:18 pm

I'm trying to control the DVD 16x9 remote scences thru telnet. Can't seem to get them to respond. Any guidance?
Here is the command syntax I'm using "DVDLobby|RemoteBrowse~Right\r".

Here is a screen shot of the DVDlobby App, events.

The only differnce I can see is the telnet ones don't come in with a from {{clientname}}.
You do not have the required permissions to view the files attached to this post.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: External Control of MLServer 4

Postby CinemarDave » Sun Mar 18, 2012 4:47 pm

Yes - any command that relies on needing a real client won't work. However, I just released a new version of the server that will let you disguise your commands as any client. All you need to do is add a suffix to the end of your command giving the name of the client who you would like to mimic.

So instead of sending
DVDLobby|RemoteBrowse~Down

send

DVDLobby|RemoteBrowse~Down^MyClient1

The ^ acts as the delimiter between the MLServer command and the client name to use. To MLServer the telnet command will appear as if it came from MyClient1. Do this for any client you would like to mimic.

shakey
Intermediate
Intermediate
Posts: 285
Joined: Sat Jun 28, 2008 9:55 pm
Contact:

Re: External Control of MLServer 4

Postby shakey » Sun Mar 18, 2012 5:15 pm

Thanks Dave,

Works great! Much faster than the remote using IR. If the cable company would make a Cable Box that had real control (IP or 232) my system would become IR free. Now to work passing some images and variables back. Seems to be alot of possibilities, just wish I was a better programmer. I think you have more talent in you small toe than I have altogether.

shakey
Intermediate
Intermediate
Posts: 285
Joined: Sat Jun 28, 2008 9:55 pm
Contact:

Re: External Control of MLServer 4

Postby shakey » Sun Mar 18, 2012 10:02 pm

Dave,

I spoke a little to soon," DVDLobby|Remotebrowse~Up,Down,Right, Left^MyClientName" works great. What command would I use to select the highlighted movie. I've tried "DVDLobby|RemoteBrowse~Ok,Enter,Play,Select, First^MyClientName" etc. "First" is what shows in the log when using an MCE remote with the agent but thru telnet it goes back to the first movie which makes sense to me at least. I've also tried "DVDLobby|SelectMovie" and with~{{movies_rc_activeicon_theater}}. DVDLobby|PlayMovie~{{movies_nowplaying_dvdnumber_theater}}" will play a movie its just not the highlighted one. I set the "movies-Activeplayer_theater~AV2" which is the theater. Your great guidance is needed again. Would I have better luck thru the web server?

Chad

EDIT-3-18-12 11:33 PM: I just found how you are using the Movies_Remote_Nav.mls to capture the MCE commands. I might be able to figure it out yet.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: External Control of MLServer 4

Postby CinemarDave » Mon Mar 19, 2012 1:56 pm

You found it. Look at what happens on the button assigned to "Enter"

shakey
Intermediate
Intermediate
Posts: 285
Joined: Sat Jun 28, 2008 9:55 pm
Contact:

Re: External Control of MLServer 4

Postby shakey » Tue Mar 20, 2012 1:06 pm

Is there a way to send command or variable out on the telnet server from within MLserver?

What I'm thinking or trying to do is make a Command macro on MLS that I can send in and it will fire and a command to send the variable out on telnet.

For instance
A Command Macro named DVDlobby.Next

I would send in MLServe.cmd|DVDLobby.Next^Theater and it would do something like the following.(Not sure if MLServe.cmd is needed)

Macro|
DVDLobby|Remotebrowse~Next
Telnet|SetVariable~{{movies_selection_title_theater}}

That way I wouldn't have to constantly poll with Getvariable|request. Better yet would be an option in the Server Varisimilarb(or similiar) to set it to send out a variable any time it changes status by class.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: External Control of MLServer 4

Postby CinemarDave » Tue Mar 20, 2012 1:32 pm

No such command exists now.

If it is just variables then I can treat Telnet clients just like MainLobby clients and whenever a variable changes value I can broadcast that variable update to all connected telnet clients. The downside is that your telnet client needs to be capable of handling potentially 10s of thousands of variables or at least have the knowledge of picking and choosing the ones it needs.

shakey
Intermediate
Intermediate
Posts: 285
Joined: Sat Jun 28, 2008 9:55 pm
Contact:

Re: External Control of MLServer 4

Postby shakey » Tue Mar 20, 2012 2:05 pm

Dave,

I think that would work for my application. If I don't tell the otherside a variable exist it will just chuck it to the weeds. Other than high traffic at startup it shouldn't be a problem.

Thanks

User avatar
Krumpy
Developer
Developer
Posts: 1228
Joined: Thu Sep 04, 2003 10:17 pm
Location: Minneapolis, Mn
Contact:

Re: External Control of MLServer 4

Postby Krumpy » Tue Mar 20, 2012 5:40 pm

Dave,

I think that would be a good idea. Been watching this develop and been meaning to ask for this. My only other thought is that it might be good to have this type of interface on yet another port.

So one port for cresteon toy elf control (one way communication), and another for two way.


Return to “MLServer 4”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests