MLServer 4 Primer

From Cinemar Wiki
Jump to: navigation, search

Introduction

Welcome to the MLServer 4.0 Primer

MLS4.png


MLServer 4.0 represents Cinemar's fourth generation of media management and home automation software components. MLServer 4 has been rewritten from the ground up using the latest Microsoft .NET libraries and moves from a single process controller to a multi-tasking server engine powered by a robust SQL Server back end database. The following sections will take you through all the MLServer components, what they are used for and how you use them. There is a lot here so take your time and enjoy.


What's New (Overview)

  • Complete and total rewrite using Microsoft .NET 4.0 technologies.

  • All data is now stored in a SQL Server database

  • Multi-Threaded and Multi-Tasking. MLServer won't get hung while some device driver is communicating with external devices. (Caveat - If you use any legacy plugins then these plugins are not multi-threaded so legacy plugins still could make MLServer pause.)

  • Elimination of old plugin model. (Some MLServer 3 plugins are supported but users should migrate to the equivalent version 4 releases)

  • Addition of new "Family" structure and licensing schemes. You are now required to license a "Family" and not the individual device drivers. You will never have to purchase a device driver. If you have a license for the Family then the device driveres will work. Currently there are 11 master family categories. They are as follows:
    • AV - Audio Video device and players e.g. Denon, ArcsoftTMT, Netflix
    • Climate - Thermostat controls and related devices
    • Control - I/O control relays and sensors
    • DataComm - Telephony devices
    • Energy - Energy Management devices
    • Irrigation - Irrigation controllers
    • Lighting - Lighting controllers
    • Pool - Pool and Spa controllers
    • Security - Security panels like Elk, Hai, GE
    • Switching - Video and audio Matrix switchers and multi-zone controllers
    • Video - Cameras and other Video equipment

  • Addition of new Family Manager Editor. All devices that are controlled from a Family device driver are now created and edited using the new Family Manager.

  • Addition of MLServer Apps. Apps are mini applications that augment MLServer's functionality. Examples of MLServer Apps are DVDLobby, MusicLobby, PhotoLobby, Weather, Netflix etc. Apps may or may not be licensed.

  • Addition of MLServer Device Drivers. Device drivers are small programs dedicated to one task. Like connecting to a Russound CAV and controlling it. A Device Driver is always a member of at least one Family. However a device driver may belong to multiple Families. Device drivers are never licensed.

  • Intelligent Command Builder Wizard. A new wizard is available from within MLServer and the Mainlobby client that will walk you through the process of building a MLServer command. No more hunting and pecking through wiki pages to figure out what the command syntax.

  • Command macros now accept parameters. Previously you had to create multiple command macros because you could not pass parameters to the macro. Now you can. e.g. DVR.ChangeChannel|123

  • Macros can now be nested up to 4 levels deep. Each Layer uses an additional ! delimiter. Lever 1 = 1, Level2 = !!, Level 3 = !!!, Level 4 = !!!!

  • Normalization of Server Variable naming conventions. For example all device drivers that are family members will always create server variables using the naming convention FamilyName_FamilyID_Some Identifier. Likewise MLServer Apps will always create variable names using the naming convention AppName_Some Identifier

  • Elimination of legacy MLWorker process. Old MLWorker functions are now internal MLServer routines

  • Enhanced Web Server functionality for both the user and system internal web servers




Legacy Plugins

Legacy MLServer 3 plugins are not compatible with MLServer and will not work unless they have been modified to make them compatible. This means that you cannot simply copy your plugins from the old MLServer\Plugins folder into the new one. This will only get you into trouble.

All Legacy MLServer 3 plugins can easily be modified to be made compatible with MLServer 4. You can tell if a Cinemar Legacy plugin is compatible with 4 by its version number. Any Cinemar plugin with a version number 3.99.0 or higher is compatible with MLServer 4. Third-party plugins will not work unless they too make the simple change to bring them up to spec. Third-party plugin developers will have to contact Cinemar for instructions on what changes are required.

When you install the new Cinemar Installation Assistant for MLServer 4 you will see a section dedicated to Legacy plugins. The rule of thumb will be that if you cannot locate all your plugins in the installer then they have not been converted yet and you should hold off upgrading until everything you need is there.


Device Drivers and Apps

Legacy plugins are being phase out and support for them is there only to maintain backwards compatibility with MLServer 3


MLServer 4 introduces "Device Drivers" and "Apps"


A device driver is a component that talks to and controls a specific device like the UPB driver for lighting control. Device drivers must be a member of at least one family and must respond to the appropriate family commands. So in the case of the UPB driver it is a member of the Lighting family. MLServer commands take the form of "Lighting|Alias~Command~Parameters". There is no MLServer "UPB|whatever" type commands. That way all lighting device drivers respond to the same command set. You could change lighting devices and never have to change your scenes. All Family devices work that way.


An App is a module that performs a specific function that is not family related. Say DVDLobby, Musiclobby, Weather. You get the picture. MLServer commands for Apps all take on the format "AppName|Command~Parameters" and are unique for each app. To assist users in figuring out the command structure we have introduced a new command builder wizard that is in MLServer and the MainLobby client. Each app and family has a special xml data file that the command builder users to help the user build the command.



Managing the MLServer 4 Database (Optional)

For power users, that might want direct access to the CinemarSQL database, here is a method to connect directly to the DB using Access.

The first item is to create an ODBC link to the CinemarSQL database (unless it is the local server)

   Start the ODBC control panel applet (Start - Settings - Control Panel - ODBC)
   Under User Data Sources will be a list of data sources you can connect to. Click Add
   Select SQL Server and click Finish
   Enter a name for the source (CinemarSQL), a description (CinemarSQL) and a server name/IP address (CinemarSQL). Click Next
   Select the type of authentication and enter the username "SA" and password "Cinemar". Click Next
   You can set the default database by clicking "Change the default database to" and select "Cinemar". Click Next
   Select character translation (except default) and click Next
   Select log options and click Finish
   At the end a summary will be displayed and click "Test Data Source" to perform a brief test. Click OK to complete
   Close the ODBC dialog box by clicking OK

Now you have the connection you need to configure Access to use it

   Start Access 97
   Select Blank Database and click OK
   Enter a name and directory, click Create
   Select the Tables tab
   From the File menu select Get External Data - Link Tables
   In the bottom left corner of the displayed dialog will be "Files of type:". Change this to "ODBC databases"
   A new dialog will be displayed. Click the "Machine Data Source" tab
   Select the Data Source created using ODBC earlier (CinemarSQL) and click OK
   You may need to enter the password "Cinemar" for the database.
   You will now see "Link Table" dialog, select and click OK.  Select All tables.  You will then have to click OK a zillion times to bring in all of the tables.
   Under your main Table tab you will now see dbo.CinemarSQL and double clicking will give a graphical view.

Upgrade Considerations

Question: Should I upgrade?
Answer: Yes, and for a lot of reasons. Primarily because the V4 generation of products is where all the development efforts are focused. When MLServer 4 gets released there will not be any further development of MLServer 3 and its legacy plugins and agents. MLServer 4 will represent the most robust automation controller on the market today. You will want to take advantage of its stability and features.


Question: What will the upgrade cost?
Answer: If you are a current owner of MLServer 3 then you will be able to upgrade to MLServer 4 for $99. This upgrade will get you a MLServer 4 license valid for 5 client connections and a license for the MainLobby 4 designer.


Question: Will me old license keys and activation codes work?
Answer: Yes and No. Yes for all your legacy MLServer plugins that you may choose to use. No for any product that supports a version number of 4 or greater. This means that you can upgrade the core MLServer for a nominal fee and re-use all your existing MLServer legacy plugins. This is the most cost effective upgrade path. You can then upgrade to newer V4 generation products as they become available and you are ready to upgrade.


Question: Will I have to make any changes to my current Mainlobby client scenes?
Answer: Yes! When you start to migrate from the legacy plugins to the new V4 apps and drivers then you will have to modify your scenes to compensate for the new MLServer command and server variable syntax. The wiki pages associated with these components will document the changes.


Question: My MLServer isn't broke. Do I need to fix it?
Answer: No! If you are not ready to upgrade and your current MLServer installation is functioning fine then you do not have to jump in and upgrade. If you are not comfortable with performing the upgrade or making the changes to your MainLobby scenes then you can purchase professional consulting hours from us and we'll make the changes for you. Contact us for more information on this service.