<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.linuxmce.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AHagerty93</id>
	<title>LinuxMCE - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.linuxmce.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AHagerty93"/>
	<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php/Special:Contributions/AHagerty93"/>
	<updated>2026-07-21T23:09:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Usage_Intro&amp;diff=28693</id>
		<title>Usage Intro</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Usage_Intro&amp;diff=28693"/>
		<updated>2011-09-27T08:14:47Z</updated>

		<summary type="html">&lt;p&gt;AHagerty93: None&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
  | __TOC__&lt;br /&gt;
  |}&lt;br /&gt;
LinuxMCE&#039;s main concepts are [[Devices]], Commands (aka [[Scenarios]] and Activities), and [[Events]]. An  [[Orbiter]] is the device that displays the User Interface. It can be a [[Media Director|Media Station]], web pad, mobile phone, or other remote control device. The Orbiter User Interface is standardized for all Orbiters.&lt;br /&gt;
&lt;br /&gt;
== Devices ==&lt;br /&gt;
&lt;br /&gt;
A device is generally a piece of hardware or software, like the Xine Media Player, a light switch, or a mobile phone.  Devices have three functions, abbreviated &amp;quot;DCE&amp;quot; (Data, Commands, Events): &lt;br /&gt;
&lt;br /&gt;
# Retrieve configuration &#039;&#039;&#039;data&#039;&#039;&#039;&lt;br /&gt;
# Perform a &#039;&#039;&#039;command&#039;&#039;&#039; (turn on, turn off, fast forward, etc.)&lt;br /&gt;
# Report certain triggered &#039;&#039;&#039;events&#039;&#039;&#039; (e.g. &#039;motion detected&#039;, &#039;playback started&#039;, etc.)&lt;br /&gt;
&lt;br /&gt;
== Scenarios ==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;[[Scenarios]]&amp;quot;, &amp;quot;Activities&amp;quot;, and &amp;quot;Command Groups&amp;quot; are interchangeable terms -- they mean the same thing.  A scenario is a group of commands that can be sent to a device (or series of devices).  In LinuxMCE, the default Orbiter main menu consists of several scenario categories, grouped by room. These categories are:-&lt;br /&gt;
&lt;br /&gt;
* Lighting&lt;br /&gt;
* Media&lt;br /&gt;
* Climate&lt;br /&gt;
* Telecom&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
(These default categories are arbitrary and are set up at installation.) To perform an action in LinuxMCE, a scenario is chosen from one of these categories (located on the main menu of an Orbiter). &lt;br /&gt;
&lt;br /&gt;
For example, in rooms which have both a TV and lights, LinuxMCE automatically creates a scenario called &#039;Showtime.&#039; This scenario dims the lights to 10% whenever the TV starts playing.  In rooms with a PVR or other TV-enabled device, another scenario is created called &#039;TV&#039; (in the &#039;Media&#039; category) to start the TV.  Another scenario in the &#039;Media&#039; category called &#039;Video&#039; sends a command to the Orbiter to list your video content. Telecom scenarios are created to make phone calls. Security scenarios are created to view cameras and to arm an alarm.&lt;br /&gt;
&lt;br /&gt;
Some [[What_scenarios_are_created_automatically%3F|default scenarios]] are created for you at installation. A fully-functional system can run using only the default scenarios, if you choose. You can also change or remove the default scenarios or add new ones. This is done though the &#039;&#039;&#039;[[LinuxMCE Admin Website]]--&amp;gt;Wizard--&amp;gt;[[Scenarios]]&#039;&#039;&#039; menu. When creating a scenario, the [[LinuxMCE Admin Website]] will show you the most appropriate wizard, based on the category you pick.  If you&#039;re adding an activity in the lighting category, for example, the wizard will display a list of the lights in the room and let you pick which ones to turn off.  If you&#039;re creating a scenario in the security category, it will list the installed cameras and will allow you to select which ones to display.&lt;br /&gt;
&lt;br /&gt;
A scenario can send a command to any device in the system. By default, scenarios in the lighting category show you the room lights, allowing you to select which ones to send commands. However, from the &#039;&#039;&#039;Wizard--&amp;gt;[[Scenarios]]&#039;&#039;&#039; menu for the specific scenario, you can also specify a command to any device in your home. You could make a phone call, for example, even from a scenario in the lighting category.&lt;br /&gt;
&lt;br /&gt;
Certain scenarios are assigned to certain rooms by default. This can be customized, however. When you manually select a room from the Orbiter main menu, the default scenarios for that room are displayed. In general they control devices in that room, but this can also be changed. If your kitchen is near the garage and you want a scenario to &#039;turn off the garage light&#039;, you can assign a scenario to the room &#039;kitchen&#039; that will do just that. It doesn&#039;t matter that the light is in the garage.&lt;br /&gt;
&lt;br /&gt;
For a Media Director, the on-screen Orbiter User Interface appears on the TV screen. It is manipulated by the mouse/keyboard or remote control connected to your Media Director. By default it is set to display the scenarios for the room in which the Media Director is located.&lt;br /&gt;
&lt;br /&gt;
In contrast, a mobile Orbiter (such as a webpad) can be carried throughout the house. It must be able to select the scenarios for multiple rooms. Fortunately, the option to manually select which room you are currently in is available on every Orbiter&#039;s main menu.&lt;br /&gt;
&lt;br /&gt;
This can occasionally cause some confusion. Perhaps both the Living Room and the Bedroom have a scenario called &#039;TV&#039;. You may have a web pad that is in the Bedroom, but you then carry it to the Living Room. You may forget to tell the web pad that it&#039;s now in the Living Room (at the bottom of the Orbiter screen it will still say &#039;Bedroom&#039;). You hit the &#039;TV&#039; button expecting the Living Room TV to come on, but in fact you&#039;re still controlling the Bedroom and the TV comes on there instead. Finally, you may realize that you must change your room location to Living Room, then you can control the TV there.&lt;br /&gt;
&lt;br /&gt;
Once you get used to this concept, though, you&#039;ll find it very useful.  Conveniently, any Orbiter can be set to control any room and choose from the scenarios assigned to that room. No matter which Orbiter you use, the same set of scenarios will be displayed for each specific room. For example, the kitchen scenarios will always be the same, no matter which Orbiter you are using. (The scenarios are assigned by room -- not by Orbiter.) No matter whether you pick up your mobile phone, your web pad, or your remote control, you will always be shown the same list of scenario options for the Living Room.&lt;br /&gt;
&lt;br /&gt;
You have the option of preventing some family members from using certain scenarios. From the [[LinuxMCE Admin Website]], certain scenarios and rooms can be [[Users#Restrict_Access|restricted to certain users]].  Maybe little Suzy&#039;s mobile phone Orbiter should be restricted so that she is only able to control her room and the living room, for example. She would only be able to execute the scenarios in those rooms, but not the Master Bedroom. Other possible options include [[Users#Restrict_Access|requiring a pin code]] to access the scenarios for a particular room.&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
&lt;br /&gt;
Devices report events, such as &#039;Playback started&#039; and &#039;Motion Sensor tripped&#039;. If you want something to happen automatically in LinuxMCE, you create Event Handlers that react to these events. For example, you can create an event handler that listens for the &#039;Motion Sensor tripped&#039; event from a motion detector and turns on the lights in response.  An event handler might listen for the &#039;Sunrise&#039; event, which could then prompt the sprinklers to come on. &lt;br /&gt;
&lt;br /&gt;
LinuxMCE creates several default event handlers. In rooms in which you have a TV and lights, an event handler is created that listens for the &#039;Watching Media&#039; event sent by a media player. When the event is detected, the Showtime scenario (which dims the lights) is executed in response.  When you start a movie, therefore, the Showtime activity will be executed and the lights will be dimmed.  There are other default event handlers that monitor for events like &#039;Security Breach&#039; and &#039;Fire Alarm&#039; (from a home security system).&lt;br /&gt;
&lt;br /&gt;
== Controlling an Orbiter ==&lt;br /&gt;
&lt;br /&gt;
To control the system, you use an [[Orbiter]], which is the LinuxMCE term for a remote control.  All [[Orbiters]] have the same basic function: to display the scenarios in the room you&#039;re in and let you select one.  The different Orbiters may [[Selecting_the_Right_UI|display the User Interface slightly differently]], depending on their screen size, but the function and the list of scenarios is always the same. For example, the [[Selecting_the_Right_UI|&amp;quot;UI1&amp;quot; interface]] (which is used on webpads and PDAs) displays the scenarios in horizontal rows. (If there are more than will fit on a row, there will be a &amp;quot;more&amp;quot; button.) A home button is always displayed that takes you to the main menu. On smaller displays, as on mobile phones or desktop phones, there&#039;s not enough room to show the scenarios themselves. The top level menu shows only the categories: Lights, Media, Climate, Security and Telecom. Selecting a category displays the scenarios in that category. &lt;br /&gt;
&lt;br /&gt;
[[Selecting_the_Right_UI|&amp;quot;UI2&amp;quot;]] is the [[Selecting_the_Right_UI|preferred User Interface]] for Media Stations.  Using a traditional IR remote is not much different from using any other Media Center PC remote.  The menu button brings up the main menu, and you use the &#039;&#039;left/right/up/down/enter&#039;&#039; buttons to navigate it. The &#039;&#039;fast forward/rewind/skip +/skip -&#039;&#039; keys are used for media playback.&lt;br /&gt;
&lt;br /&gt;
If you have a pointing device like a mouse or gyro air mouse, the UI2 interface also supports a unique control architecture that lets you do everything with 3 (programmable) buttons (plus ok and cancel). The 3 buttons are &amp;quot;MEDIA&amp;quot;, &amp;quot;MENU&amp;quot;, &amp;quot;AMBIANCE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
On a mouse with 3 programmable buttons (such as the [[Using_the_Gyration_Remote_GYR3101US_%28Non-Fiire_Chief%29|gyration]]), these functions correspond to the buttons from left to right. If you are using a traditional 3 button mouse, you can use the F6, F7 and F8 keys on the keyboard for the three programmable functions instead. In both cases, the left mouse button is &amp;quot;ok&amp;quot;, and the right mouse button is &amp;quot;cancel/go back&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Mouse button behavior is &amp;quot;absolute&amp;quot; when you press and hold the media/menu/ambiance button and &amp;quot;relative&amp;quot; when you tap and release.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;absolute&amp;quot; behavior is generally more efficient. For example, in the case of the middle button (F7), &amp;quot;absolute&amp;quot; behavior means the action is executed without having to additionally click &amp;quot;ok&amp;quot;.  If you press and hold the middle button (F7) while moving your mouse pointer to the option, then let go, that option is executed. If you instead tap and release the menu button (&amp;quot;relative&amp;quot; behavior), you will only highlight the menu option. You must then press ok (the left mouse button) to execute the option.&lt;br /&gt;
&lt;br /&gt;
Categories appear along the bottom of the screen, and the scenarios in each category popup vertically (like a pull-down menu in a PC, except upside down).  If the main menu isn&#039;t already visible, bring it up by pressing the &amp;quot;start&amp;quot; button on a Windows IR remote, or the &amp;quot;menu&amp;quot; button on a 3-button mouse.  To exit a menu, use the back button on the IR remote, the cancel button (right mouse button on a 3-button mouse), or the ESC key on a keyboard.&lt;br /&gt;
&lt;br /&gt;
In UI2, the media is always full screen. If you&#039;re not playing your own media, the background media (i.e. screensaver images) is gallery art from the Internet (using flickr) or [[Use_my_own_pictures_in_the_Screen_Saver|pictures you select]]. If only the screensaver images are displayed on the Media Station, press the menu/middle/F7 button to bring up the menu. Right click/ESC to get rid of it. (This works even if your own media is playing.)&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using UI2&#039;s 3-button navigation model, the normal media control options on a traditional remote are replaced with a single button: &amp;quot;media&amp;quot; (left soft button or F6). Press this and move the pointer up and down for your skip functions (&#039;&#039;ch+, ch-, skip fwd, skip back&#039;&#039;). Move the pointer left and right for speed control (&#039;&#039;rewind, fast forward&#039;&#039;).  The further you move, the faster the media playback changes.  If you hold the button down (the left soft button or F6), your movement will be &amp;quot;absolute&amp;quot;. Instead of the traditional &amp;quot;jog shuttle-type&amp;quot; control, movement to the right skips to the end of your media, and movement to the left skips to the beginning.  Once you get used to it, you will find that navigating media is orders of magnitude faster and easier with this model than with a traditional remote. You can find a spot in a 2 hour movie in only a couple seconds with a click of a single button (compared to a slew of button clicks required using a traditional remote).&lt;br /&gt;
&lt;br /&gt;
Also, in UI2 you can press the &amp;quot;ambiance&amp;quot; button (right soft button or F8). Move up/down to adjust the lights, and left/right to adjust the volume. As with the media playback, if you hold the F8/right soft button down while you move left and right, your volume control is in &amp;quot;absolute&amp;quot; mode (not &amp;quot;relative&amp;quot;). Moving hard right turns up the volume full blast; hard left is mute.  This requires you have a TV or receiver that is serial-controlled, however. LinuxMCE can then directly and instantly set the volume position in sync with your hand movements. (Few TVs and receivers have this feature, unfortunately.)&lt;br /&gt;
&lt;br /&gt;
There are other media control functions besides the most commonly used &#039;&#039;fast fwd/rewind/skip up/skip down&#039;&#039;. You can, for example, choose &#039;subtitles&#039; while watching a DVD, &#039;guide&#039; while watching TV, and &#039;random&#039; while listening to an audio CD. In the UI2 3 button model, these functions appear on the main menu (on the left-most pad, entitled &#039;now playing&#039;) and changes according to the type of media you&#039;re playing. Press the menu button (middle button/F7) to select these options.&lt;br /&gt;
&lt;br /&gt;
This 3 button model is a new concept and very different from traditional navigation. Most people find it much faster once they become accustomed to it.&lt;br /&gt;
&lt;br /&gt;
==Reload Router &amp;amp;amp; Regen Orbiters==&lt;br /&gt;
&lt;br /&gt;
While using LinuxMCE you&#039;ll see sometimes a message asking if you want to [[Quick reload router|reload the router]], or if you want to [[Orbiter Generator|regenerate the Orbiter UIs]] (User Interfaces). In general, these options refresh the LinuxMCE databases so that changes to the system can be recognized.&lt;br /&gt;
&lt;br /&gt;
===Reload Router===&lt;br /&gt;
All devices in LinuxMCE obtain their configuration information from the , which is the central piece of software on the Core. All devices request a list of the other devices in the home from the router, so they can respond to them appropriately. (For example, an IP camera device might turn on the lights in the room whenever you&#039;re viewing the camera. To do &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.thepiggybackrider.com/ &amp;lt;span style=&amp;quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&amp;quot;&amp;gt;child carrier&amp;lt;/span&amp;gt;]&amp;lt;/span&amp;gt; so, the IP camera needs to know what lights are in the room.) Typically a device requests this information only when it&#039;s starting up. When you connect additional plug and play devices to the system, these new devices generally will work immediately, but their functionality may not be fully enabled within the LinuxMCE system until the DCE router is reloaded. When the router reloads, it signals all devices on the system to simultaneously reload and re-request the system data. Each existing device can then work with each new device. This process is known as a &#039;reload&#039;. It generally takes about 10 seconds. Every time you add or remove devices, or change a device&#039;s configuration, you may be asked to do a reload. If you&#039;re going to add more devices or make more device changes, you can do the reload once you&#039;re done. If you&#039;re in the middle of watching a movie or TV, you can postpone the reload, since media players generally stop playing during reloads. Phone calls aren&#039;t affected, though, and TV shows being recorded by MythTV in the background are also unaffected.&lt;br /&gt;
&lt;br /&gt;
===Regen the Orbiter===&lt;br /&gt;
LinuxMCE&#039;s [[Selecting_the_Right_UI|Orbiter User Interfaces]] are all &amp;quot;pre-rendered&amp;quot; in order to be more efficient.  The User Interface source images are all very high resolution, but need to be resized to accommodate the resolution of each Orbiter screen. The Core server has a list of the Orbiters used by your system, and will generate the appropriate User Interface screen for each Orbiter. It will do this each time you request a &amp;quot;regen&amp;quot;. If you have five different types of Orbiters (each with a different type of screen), then five different images will be generated during each regen.&lt;br /&gt;
&lt;br /&gt;
These User Interface screen images are stored in the Core. The appropriate UI image is sent to an Orbiter whenever it is activated. For many low-power devices (like mobile phones or desktop phones) there just isn&#039;t the processing power to do scaling and rendering of a User Interface screen on the fly. They need to be pre-rendered (with text pre-embedded in the images) to be efficient.&lt;br /&gt;
&lt;br /&gt;
Adding new scenarios may result in the creation of new buttons for the User Interface, or changes to the text on existing buttons. Perhaps an entirely new screen will be created.&lt;br /&gt;
&lt;br /&gt;
Until the User Interface images are regenerated, though, you won&#039;t be able to see these new buttons (or screens) on your Orbiter. During the regen, new User Interface images for each type of Orbiter is generated by the Core. This can take about 2-5 minutes, depending on how many Orbiter types you have in your system.&lt;br /&gt;
&lt;br /&gt;
You needn&#039;t do a regen every time you add a scenario. You can wait until you have finished adding all the scenarios. Furthermore, you can also regen only the Orbiter you are currently using by doing a &amp;quot;Quick regen&amp;quot;. This allows you to see the new User Interface (following the addition of new scenarios) without having to do a full regen for all the Orbiters. Once you have finished adding scenarios, then you can do a full regen.&lt;br /&gt;
&lt;br /&gt;
This regen process can be a bit annoying, but is necessary. In future editions of LinuxMCE, it is planned to allow Media Directors, which have a lot more processing power, to render their on-screen Orbiter User Interfaces on the fly (so you don&#039;t have to do a regen each time you add or remove a scenario).&lt;br /&gt;
&lt;br /&gt;
You can do a [[Orbiter Generator#Running OrbiterGen (performing a &amp;quot;regen&amp;quot;)|full Orbiter regen or a Quick regen]] at any time by using buttons on the Core&#039;s LinuxMCE [[Launch Manager]].&lt;br /&gt;
&lt;br /&gt;
==Managing your media==&lt;br /&gt;
LinuxMCE is always scanning for network shares, on Network-Attached Storage (NAS) devices and other Hard Disk Drives (HDDs) of PCs connected to the system (including Windows PCs). Universal Serial Bus (USB) drives are also detected. Every time a LinuxMCE finds a network share, you will be asked if you would like to use it. Whenever you reply &amp;quot;Yes&amp;quot;, the file share can be used by any Media Director on the system. The file share is scanned for media, such as audio, video and photos, and any that are found are then cataloged in the Core&#039;s central database. For example, when you plug in a USB drive on a Media Station in the living room and tell LinuxMCE to use it, the media on the drive will be available to Media Directors in other rooms.&lt;br /&gt;
&lt;br /&gt;
At the moment there is no way to restrict your media for &#039;local use only&#039;; all Media Stations in the LinuxMCE system share the media catalog stored on the Core.  (This is a limitation that will be addressed in the near future. Sometimes it is desirable to attach a USB drive in the master bedroom and not allow it to be shared, for example. &#039;&#039;Note: However, see [[folder lock|this article that describes a method to address this problem]].&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
Storage devices (NAS, USB drives, extra HDDs on the Core or Media Directors) are referred to as &amp;quot;Extra Drives&amp;quot;.  When an extra drive is added, it is listed in the device tree in &#039;&#039;&#039;[[LinuxMCE Admin Website]]--&amp;gt;Advanced--&amp;gt;Configuration--&amp;gt;[[Devices]]&#039;&#039;&#039;.  Under &#039;Core&#039; you&#039;ll see a device listed for each HDD in the Core, as well as for each NAS device. Under each Media Station will be listed the HDDs in that Media Station.  By clicking on the device you can change the device&#039;s properties, such as the mount username/password.  Each NAS device, and each file share on another PC, will show as a device listed under the Core; each is considered a child of the Core.&lt;br /&gt;
&lt;br /&gt;
===Access control for shared media===&lt;br /&gt;
LinuxMCE creates a top level folder for &#039;public&#039; media. This folder can be used by every user in the system.  A &#039;private&#039; media folder is also created for each user.  Within each of those folders are sub-folders, labeled &#039;audio&#039;, &#039;video&#039;, &#039;pictures&#039;, &#039;data&#039; and &#039;other&#039;.  Within each of those will also be sub-folders for the extra storage devices (NAS, USB, extra internal drives, etc).  When you attach an extra storage device, you can specify whether the default directory structure should be used for it. Alternatively, you can specify &#039;just make it public&#039; or &#039;make it private&#039;.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example.  Let&#039;s say you have 2 users: john and mary.  You connect 3 storage devices:&lt;br /&gt;
# a NAS, for which you specify &#039;use default directory structure&#039;. It is named &#039;Generic Network Storage [50]&#039;&lt;br /&gt;
# a USB drive for which you specify &#039;make it all public&#039;. It is named &#039;USB Drive [51]&#039;&lt;br /&gt;
# a SATA drive for which you choose &#039;make it private for john&#039;. It is named &#039;General Internal HDD [52]&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s say you&#039;re running Windows. Go to Network Neighborhood and find the LinuxMCE Core server.  The directory tree ought to look like this:&lt;br /&gt;
&amp;amp;lt;pre&amp;gt;&lt;br /&gt;
public&lt;br /&gt;
  video&lt;br /&gt;
    Generic Network Storage [50]&lt;br /&gt;
  audio&lt;br /&gt;
    Generic Network Storage [50]&lt;br /&gt;
  pictures&lt;br /&gt;
    Generic Network Storage [50]&lt;br /&gt;
  data&lt;br /&gt;
    Generic Network Storage [50]&lt;br /&gt;
  other&lt;br /&gt;
    USB Drive [51]&lt;br /&gt;
john&lt;br /&gt;
  video&lt;br /&gt;
    Generic Network Storage [50]&lt;br /&gt;
  audio&lt;br /&gt;
    Generic Network Storage [50]&lt;br /&gt;
  pictures&lt;br /&gt;
    Generic Network Storage [50]&lt;br /&gt;
  data&lt;br /&gt;
    Generic Network Storage [50]&lt;br /&gt;
  other&lt;br /&gt;
    General Internal HDD [52]&lt;br /&gt;
mary&lt;br /&gt;
  video&lt;br /&gt;
    Generic Network Storage [50]&lt;br /&gt;
  audio&lt;br /&gt;
    Generic Network Storage [50]&lt;br /&gt;
  pictures&lt;br /&gt;
    Generic Network Storage [50]&lt;br /&gt;
  data&lt;br /&gt;
    Generic Network Storage [50]&lt;br /&gt;
  other&lt;br /&gt;
&amp;amp;lt;/pre&amp;gt;&lt;br /&gt;
Whether you put your media under video, audio, pictures, data or other is unimportant.  It will be scanned by LinuxMCE anyway. The contents of &amp;quot;General Internal HDD [52]&amp;quot; will be displayed in the folder john/other/General Internal HDD [52]. The contents of USB Drive [51] will be displayed in the folder public/other/USB Drive [51].  When John browses the contents in Network Neighborhood, he will be asked for his username and password. He can then access the content in both the public folder as well as the &amp;quot;john&amp;quot; folders (including General Internal HDD [52]).  When Mary browses the contents with her username and password, she will see both the public and &amp;quot;mary&amp;quot; folders. She will not be able to see anything on General Internal HDD [52], however, since that drive was specified to be private for John.&lt;br /&gt;
&lt;br /&gt;
In the case of John&#039;s private media, it won&#039;t be displayed in the LinuxMCE media browser unless you click &#039;Sources&#039;--&amp;gt;&#039;John&#039;. However you &#039;&#039;can&#039;&#039; see the contents of General Internal HDD [52] (unless you deselect &#039;Sources&#039;--&amp;gt;&#039;Public&#039; from the media browser).  Generic Network Storage [50] would be different, however, since you specified to use the default directory structure for it.  LinuxMCE will have created public directories on Generic Network Storage [50] for public video and public audio, as well as for john&#039;s video and mary&#039;s audio. The media file browser will show only the media that is in the public directories. (The same is true with the Windows Network Neighborhood browser.) &lt;br /&gt;
&lt;br /&gt;
If Generic Network Storage [50] has existing media in the top (root) folder, you won&#039;t see it listed anywhere.&lt;br /&gt;
&lt;br /&gt;
It is generally recommended, therefore, that when you add a new (blank) &amp;quot;extra&amp;quot; storage device, you choose to use the default directory structure on it.  When you rip media to that device, the media can then be made either public or private, and LinuxMCE will automatically put it in the correct folder (audio, video, etc.).&lt;br /&gt;
&lt;br /&gt;
If you connect an extra storage device that already has media on it, however, and that media isn&#039;t already organized in LinuxMCE&#039;s default directory structure, it&#039;s easiest if you simply &#039;make it all public&#039; or &#039;make it all private&#039;. If you were to &#039;use the default directory structure&#039;, you would need to manually move the files from the existing folders into one of the directory folders that LinuxMCE would then create for you.&lt;br /&gt;
&lt;br /&gt;
When you rip files, you have the option of copying them to the Core.  If you rip a CD and make it public, it will be stored in public/audio.  If you go into Network Neighborhood and add a folder under public/audio, you would essentially be adding a folder on the Core. If you add a folder under public/audio/Generic Network Storage [50], you would be adding it to Generic Network Storage [50].&lt;br /&gt;
&lt;br /&gt;
===Drive and network drive management===&lt;br /&gt;
This concept behind drive/network drive management is not the same as the method to which Linux and Windows users are accustomed. In Windows, for example, each network device shows up separately; they are never grouped together.  There is an advantage to the way LinuxMCE manages drives. It&#039;s much simpler to add devices when you&#039;re a novice and don&#039;t understand networking. Further, if you&#039;re using an infrared remote control, you can manage drives with a single &#039;yes&#039; or &#039;no,&#039; click, which is very convenient. Lastly, all your media content is cataloged and presented in the same structure throughout the system, no matter which Media Director you&#039;re using or what room you&#039;re in.&lt;br /&gt;
&lt;br /&gt;
In Windows, by comparison, if you connect a USB drive to a Windows PC in the bedroom, you won&#039;t see that content in the living room unless you 1) open file explorer, 2) create a new network share for it, 3) go into the living room, and 4) create a new mapped network drive there. (That isn&#039;t so easy to do with an infrared remote and without some knowledge of networking.)  Further, you wouldn&#039;t be able to see the media in any other room in the house unless you were to also create mapped network shares in those rooms as well. &lt;br /&gt;
&lt;br /&gt;
With LinuxMCE, when you connect a USB drive, for example, you can &#039;make it all public&#039;; the media will be available everywhere. No other typing is required. With LinuxMCE, instead of managing multiple network shares and mapped drives, you can choose the Core&#039;s public folders in the Network Neighborhood browser from anywhere in the home, without having to know which storage devices the media is actually on.  When you remove a USB drive from a Media Station, that media instantly disappears from the catalog displayed in every room. If you reattach it, it will re-appear.&lt;br /&gt;
&lt;br /&gt;
You can also backup the media securely on the Core. LinuxMCE has built-in [http://en.wikipedia.org/wiki/RAID RAID] 5 (see &#039;&#039;&#039;[[LinuxMCE Admin Website]]--&amp;gt;Advanced--&amp;gt;[[RAID]]&#039;&#039;&#039;), so its HDD has similar backup capabilities to a [[NAS]] device.&lt;br /&gt;
&lt;br /&gt;
To change the name of an extra device, go to the &#039;&#039;&#039;[[LinuxMCE Admin Website]]--&amp;gt;Advanced--&amp;gt;Configuration--&amp;gt;[[Devices]]&#039;&#039;&#039; and under the Core you will see listed the HDDs in the core and any connected NAS devices. Under each Media Station you will see the HDDs in that Media Station. All are given default names.  You can change the description, which will also change the folder name.  In the above example, changing &amp;quot;USB Drive [51]&amp;quot; to &amp;quot;Tokyo&amp;quot; means the directory public/other/USB Drive [51] would change to public/other/Tokyo.&lt;br /&gt;
&lt;br /&gt;
You can see a list of the files in the system by folder In the &#039;&#039;&#039;[[LinuxMCE Admin Website]]--&amp;gt;Files &amp;amp;amp; Media--&amp;gt;[[Media Files Sync]]&#039;&#039;&#039; menu.  If a file is shown with a check box, the file exists both on the local disk as well as in LinuxMCE&#039;s master catalog.  If it has a different icon, then LinuxMCE hasn&#039;t finished cataloging the media; just be patient. It should appear with a check mark soon (depending on how much new media was added). &lt;br /&gt;
&lt;br /&gt;
Use this interface to manage change cover art and attributes. Under Files &amp;amp;amp; Media there is also a cover art scan utility that will find cover art, as well as other attributes (actor, genre, etc.) obtained from Amazon.&lt;br /&gt;
&lt;br /&gt;
===Linux operational details of network and disk mounts===&lt;br /&gt;
[[UpdateMedia]] is a daemon that constantly scans for media files in the /home/public and the /home/user_xxx folder created for each user. Any added media is cataloged in the pluto_media database File table, and attributes and cover art go into the Attribute and Picture tables.  Under /home/public and /home/users_xxx is a data subfolder which contains the actual video, audio, pictures folders.  (The /home/user_xxx directories themselves contain the system files for each user (like email boxes) as well as the main login for that user (in a &amp;quot;data&amp;quot; subfolder).&lt;br /&gt;
&lt;br /&gt;
Extra devices are mounted as /mnt/device/xxx (where xxx is the device number).  The mount point is the same whether it&#039;s a local drive or not.  For example, USB drive [50] in a Media Station may be mounted as a local device named /mnt/device/50, but is also mounted as a Samba mount on other Media Stations as /mnt/device/50.  The Core and the Media Stations all use the same mount names (/mnt/device/).&lt;br /&gt;
&lt;br /&gt;
Within the /home/public/data and /home/user_xxx/data are symlinks to the physical directories specified by /mnt/device/xxx.  Since the Core and all Media Stations mount the same /home directory (and all have the same /mnt/device mounts), they will all show the same files.  Therefore, if the [[UpdateMedia]] daemon locates the file /home/public/data/audio/Generic Internal Drive [50]/The Beatles/Let it be.mp3, that file will be listed on every Media Station, too.&lt;br /&gt;
&lt;br /&gt;
[[Category: Tutorials]]&lt;/div&gt;</summary>
		<author><name>AHagerty93</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=IP_Cameras&amp;diff=28692</id>
		<title>IP Cameras</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=IP_Cameras&amp;diff=28692"/>
		<updated>2011-09-27T08:14:26Z</updated>

		<summary type="html">&lt;p&gt;AHagerty93: None&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
  | __TOC__&lt;br /&gt;
  |}&lt;br /&gt;
&lt;br /&gt;
[[Category: Tutorials]]&lt;br /&gt;
==Introduction==&lt;br /&gt;
IP cameras, a.k.a. &amp;quot;network cameras&amp;quot;, are digital cameras that have a built-in web server. This &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.thepiggybackrider.com/ &amp;lt;span style=&amp;quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&amp;quot;&amp;gt;child carrier&amp;lt;/span&amp;gt;]&amp;lt;/span&amp;gt; allows the camera to be accessed by any computer on the same network using a web browser. Video is streamed to the web browser from the camera without additional equipment. In a LinuxMCE system, IP cameras are easy to setup, but require some extra manipulation to get them to record.&lt;br /&gt;
&lt;br /&gt;
=IP Cameras and Motion Wrapper=&lt;br /&gt;
&lt;br /&gt;
IP cameras can be used under the Motion Wrapper to enable it to detect motion and alert based on that function.&lt;br /&gt;
&lt;br /&gt;
==To add Motion Wrapper and IP Cameras==&lt;br /&gt;
&lt;br /&gt;
* Open your [[LinuxMCE Admin Website|webadmin]] control panel and on the left pane at the bottom click on &amp;quot;Show Device Tree&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* In the left pane Click on &amp;quot;core/hybrid&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* On the right pane near the top, click on &amp;quot;Create Child Device&amp;quot;, then leave everything blank and click &amp;quot;Pick Device Template&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
* Click the pull down box under &amp;quot;Device Template&amp;quot; and find the template labeled &amp;quot;Motion Wrapper&amp;quot;, select this item and click &amp;quot;Pick Device Template&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Now on the right pane, click &amp;quot;Create Child Device&amp;quot; again.  Enter your IP Cameras IP address and MAC address here, then click &amp;quot;Pick Device Template&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Click the pull down box under &amp;quot;Device Template&amp;quot; and use &amp;quot;Generic Analog Camera&amp;quot;, then click &amp;quot;Pick Device Template&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Now on the right window pane, scroll down to the bottom and find the field named &amp;quot;Configuration&amp;quot;.  This is where you put your cameras URL normally used by your web browser, to view your cameras video feed.  My examples are based on Axis based IP Cameras.&lt;br /&gt;
&amp;amp;lt;pre&amp;gt;&lt;br /&gt;
netcam_url http://&amp;amp;lt;you.cameras.ip.addreess&amp;gt;/mjpg/video.mjpg&lt;br /&gt;
netcam_userpass username:password&lt;br /&gt;
&amp;amp;lt;/pre&amp;gt;&lt;br /&gt;
* Now click save at the bottom, RESTART your router, now on your mce interface go to &amp;quot;Security&amp;quot; -&amp;gt; &amp;quot;Generic Analog Camera&amp;quot; and see if it&#039;s working.&lt;br /&gt;
&lt;br /&gt;
==Adding Axis IP cameras to Motion==&lt;br /&gt;
Axis camera is auto detected and device is generated, but not under Motion as parent. If you run IP Camera under moton you get all features motion has (motion detection,recording,etc...). Quick and not so clean workaround for adding IP camera device under Motion:&lt;br /&gt;
&lt;br /&gt;
#Add Generic Analog Camera #66 Device&amp;amp;lt;br&amp;gt;&lt;br /&gt;
#Change Configuraton field to add data for IP camera&amp;amp;lt;br&amp;gt;&amp;amp;lt;br&amp;gt;&lt;br /&gt;
Example for Axis camera :&lt;br /&gt;
&lt;br /&gt;
 netcam_url  http://192.168.0.90/axis-cgi/jpg/image.cgi?resolution=640x480&lt;br /&gt;
 netcam_userpass username:password    &lt;br /&gt;
&lt;br /&gt;
Omit the last one if you don&#039;t have a access password specified.&lt;br /&gt;
&lt;br /&gt;
==Tips on finding your camera&#039;s URL==&lt;br /&gt;
&lt;br /&gt;
* Try to use ftp to connect to your camera.  The username and pass is usually whatever you set up on the web interface of the camera.  Traverse the folders to find your html documents folder.  Typically, your looking for a .jpg or .mjpg file to point the Motion Wrapper to.  For example, these are the possible links on an Axis 2100 IP Camera.&lt;br /&gt;
&amp;amp;lt;pre&amp;gt;&lt;br /&gt;
/jpg/image.jpg (Works fine using the wrapper)&lt;br /&gt;
/mjpg/video.mjpg (Works fine using the wrapper)&lt;br /&gt;
/cgi-bin/jpg/image.cgi (I could not get this one working under the wrapper)&lt;br /&gt;
/cgi-bin/mjpg/video.cgi (Again, could not get it to work)&lt;br /&gt;
&amp;amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Available IP Cameras==&lt;br /&gt;
&lt;br /&gt;
IP security cameras that have been tested with LinuxMCE:&lt;br /&gt;
&lt;br /&gt;
*[[:Category:Cameras|Camera Category]]&lt;/div&gt;</summary>
		<author><name>AHagerty93</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Telecom_Plugin&amp;diff=28691</id>
		<title>Telecom Plugin</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Telecom_Plugin&amp;diff=28691"/>
		<updated>2011-09-27T08:14:09Z</updated>

		<summary type="html">&lt;p&gt;AHagerty93: None&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Telecom]]&lt;br /&gt;
[[Category:LinuxMCE_Plugins]]&lt;br /&gt;
== Description ==&lt;br /&gt;
This one provides standard command interface for the PBX, theoretically it can be plugged with any PBX, not sure if it can be done.&lt;br /&gt;
&lt;br /&gt;
It has a virtual device id = -107, this way all telecom commands from orbiter are sent to Telecom_Plugin, and then it routes commands to specific devices (like from Orbiter to child Embedded Phone) or to Asterisk.&lt;br /&gt;
&lt;br /&gt;
It depends on command the sender and such parameters as device or channel_ids.&lt;br /&gt;
&lt;br /&gt;
For example PL_Originatecalled with PK_Device==EmbeddedPhone will send CMD_Phone_Initiate &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.thepiggybackrider.com/ &amp;lt;span style=&amp;quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&amp;quot;&amp;gt;kid carrier&amp;lt;/span&amp;gt;]&amp;lt;/span&amp;gt; to the device or CMD_PBX_Originate to asterisk. The transfer when the call is already a conference call will be simple joining into the conference room instead of a blind transfer and so on.&lt;br /&gt;
&lt;br /&gt;
It also provides several DataGrids getting information from internal datastructures in case of ActiveCalls, pluto_main for SpeedDial and asteriskcdr for RecentCalls.&lt;br /&gt;
&lt;br /&gt;
== Communication with Asterisk ==&lt;br /&gt;
In most cases the Telecom_Plugin keeps almost the same list of channels as [[LinuxMCE-asterisk|Asterisk]]. The Asterisk is notifying Telecom_Plugin on all changes and they keep the list in sync.&lt;br /&gt;
&lt;br /&gt;
In most of the commands(and events) exchanged between Asterisk and Telecom_Plugin one of the parameters is CallID or ChannelID string representing channels connected into a call (something like &#039;&#039;SIP/202-9577 IAX2/teliax-out/6&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
Only Asterisk is sending that channels were changed, Telecom_Plugin just acknowledges it and changes his state accordingly.&lt;/div&gt;</summary>
		<author><name>AHagerty93</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Interfaces&amp;diff=28690</id>
		<title>Interfaces</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Interfaces&amp;diff=28690"/>
		<updated>2011-09-27T08:13:52Z</updated>

		<summary type="html">&lt;p&gt;AHagerty93: None&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Interface.jpg|thumb|250px|Interfaces Page Admin Website]]&amp;amp;lt;p&amp;gt;Interfaces are devices that interface with other devices and are responsible for controlling them.  An example is an alarm panel, which is responsible for all the sensors in your home.  Most sensor devices, like motion detectors, glass break sensors, smoke detectors, etc., do not communicate directly with the LinuxMCE system.  Rather they connect to your alarm panel-the interface device-which does communicate with the LinuxMCE system.  The interface device, the alarm panel, is responsible for controlling and monitoring all the sensor devices.&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;amp;lt;p&amp;gt;Other examples are lighting control systems, which control lights, blinds and other devices; and climate control system, which control thermostats and thermometers.&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;amp;lt;p&amp;gt;There are also infrared interface devices that control a/v equipment by sending infrared codes.  And there are general purpose interface devices, like the Global Cache gc100 and the EIB interfaces which control a variety of devices.&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;amp;lt;p&amp;gt;You will need to add all the devices using the [[LinuxMCE Admin Website]] -both the interface devices (alarm panels, [[EIB]] interfaces, lighting control systems, etc.), and the devices they control (motion detectors, light switches, blinds, etc.).  But first you must add the interfaces on this page.  You will not be able to add child devices (like motion sensors, light switches, etc.), until you first add the interface device that it requires on this page.&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;amp;lt;p&amp;gt;If the device plugs directly into the network, or into a LinuxMCE [[Core]] or [[Media Director]], then it probably does not require an interface.  You can add the device directly in the page for [[Lights]] / [[Climate]]/ [[Security]], etc.  But if it needs to hook up to another interface device, please add the interface device here before proceeding to one of the Environment pages to add the other devices.&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;amp;lt;p&amp;gt;&amp;amp;lt;b&amp;gt;Note about the :&amp;amp;lt;/b&amp;gt; The Global Cache is the most popular interface module that is used to control a/v equipment (TV&#039;s/stereo&#039;s) &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.thepiggybackrider.com/ &amp;lt;span style=&amp;quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&amp;quot;&amp;gt;child carrier&amp;lt;/span&amp;gt;]&amp;lt;/span&amp;gt; using infrared, and also a variety of devices using rs232. The plugs in directly to the ethernet. However, it is not completely plug-and-play. You must plug in a , then on any Orbiter, click the &#039;Advanced&#039; button (the LinuxMCE logo in the lower left corner of the screen), and choose the &#039;add gc100 device&#039; button. This will add the gc100 that you just plugged in. After the Orbiter tells you it has finished, then you can plug another into the network and repeat the process for however many &#039;s you have.&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category: Admin Website]]&lt;/div&gt;</summary>
		<author><name>AHagerty93</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Edit_Device_Template&amp;diff=28689</id>
		<title>Edit Device Template</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Edit_Device_Template&amp;diff=28689"/>
		<updated>2011-09-27T08:13:29Z</updated>

		<summary type="html">&lt;p&gt;AHagerty93: None&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
  | __TOC__&lt;br /&gt;
  |}&lt;br /&gt;
[[Category: Admin Website]]&lt;br /&gt;
[[Category: Programmer&#039;s Guide]]&lt;br /&gt;
[[Image:EditDeviceTemplate.jpg|thumb|250px|Select Device Template Admin Page]]&lt;br /&gt;
[[Image:Editdevicetemplatepage.jpg|thumb|250px|Edit Device Template Admin Page]]&lt;br /&gt;
This is how you define a Device Template, and specify what data it needs, and what commands and events it will implement.&lt;br /&gt;
&lt;br /&gt;
The data, commands and event sections pertain to [[LinuxMCE Libraries DCE]].&lt;br /&gt;
&lt;br /&gt;
===Device Template # ....===&lt;br /&gt;
&lt;br /&gt;
====Description====&lt;br /&gt;
This will be used as the name of the device template.&lt;br /&gt;
&lt;br /&gt;
====Implements DCE====&lt;br /&gt;
If &amp;quot;Implements DCE&amp;quot; is checked, that means this Device Template will be able to run as a stand-alone device, connecting directly to the DCE Router to receive and process its own data, commands and events.  [[Does the device Implement DCE?]] for an explanation.&lt;br /&gt;
&lt;br /&gt;
====Command line====&lt;br /&gt;
&lt;br /&gt;
====Device Category====&lt;br /&gt;
The category to which these devices belong.&lt;br /&gt;
&lt;br /&gt;
====Manufacturer====&lt;br /&gt;
The company that makes these devices.&lt;br /&gt;
&lt;br /&gt;
====Manufacturer URL====&lt;br /&gt;
Website of aforementioned manufacturer.&lt;br /&gt;
&lt;br /&gt;
====Internal URL suffix====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Design Objects to use as remotes====&lt;br /&gt;
Design Objects are menus that appear on the Orbiters, and here is where you specify what design objects, or menus, should be used to control this device.  [[Design Objects]]&lt;br /&gt;
&lt;br /&gt;
====This device is controlled via====&lt;br /&gt;
You also specify here what devices this one will be controlled via, also referred to as what devices are eligible parents.  This is an &amp;quot;or&amp;quot; relationship.  Any device that matches any of the categories or any of the device templates you specify will be considered a valid parent, and the user will be allowed to create a child device based on this device template.  [[Understanding Controlled Via (aka Parent)]]&lt;br /&gt;
&lt;br /&gt;
====This device is controlled via category====&lt;br /&gt;
&lt;br /&gt;
====Packages====&lt;br /&gt;
Here you can also specify what package will contain this device&#039;s software.  If you choose an existing package, then this device will be added to that software package the next time LinuxMCE&#039;s &amp;quot;MakeVersion&amp;quot; program is run.  Typically, however, each developer will create his own package to contain his software, and only group multiple Device Templates together into a package if they logically belong together as a whole.  LinuxMCE&#039;s &amp;quot;standard plug-in&amp;quot; package is an example.  It contains all the standard plug-in devices since they are really inseparable and belong in the same package.  [[Packages]]&lt;br /&gt;
&lt;br /&gt;
====Audio/Video Device====&lt;br /&gt;
If the device is an Audio/Video device, whether or not it implements DCE, you should check the box.  This will enable a button allowing you to specify a variety of extra information about this device that is specific to A/V equipment, such as what inputs it uses, if it has different &#039;modes&#039;, settings for controlling it via infrared, etc.&lt;br /&gt;
&lt;br /&gt;
====Is PlugIn====&lt;br /&gt;
====Is Embedded====&lt;br /&gt;
====Inherits MAC From PC====&lt;br /&gt;
====Is IP Based====&lt;br /&gt;
====Comm Method====&lt;br /&gt;
====Configuration script====&lt;br /&gt;
The configuration script is run until it successfully exits. It is run to setup a device initially, like setting up an extension for a new IP phone. It must exist in /usr/pluto/bin.&lt;br /&gt;
&lt;br /&gt;
If the device is detected, the script is being called using the following parameters&lt;br /&gt;
 -d &amp;amp;lt;device-id&amp;gt;   # The device ID for the new device&lt;br /&gt;
 -i &amp;amp;lt;ip-address&amp;gt;  # The IP address for the new device&lt;br /&gt;
 -m &amp;amp;lt;mac-address&amp;gt; # The MAC address for the new device&lt;br /&gt;
&lt;br /&gt;
====Comments====&lt;br /&gt;
&lt;br /&gt;
===Device data===&lt;br /&gt;
When you specify what &#039;&#039;&#039;data parameters&#039;&#039;&#039; this device needs, try to use one of the existing data parameters in the list if there is an appropriate one. Which one you choose is unimportant so long as the type is correct (string, integer, etc.). DCE makes no differentiation between the parameters--they are just names. If this device implements DCE, then DCEGen will create member variables for &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.thepiggybackrider.com/ &amp;lt;span style=&amp;quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&amp;quot;&amp;gt;kid carrier&amp;lt;/span&amp;gt;]&amp;lt;/span&amp;gt; setting/accessing all the data parameters for your device, and the names of the members and functions will be the same as the name on the list. Also, when the user adds an instance of this device to his system, either manually or with the wizard, he will be able to fill in a value for this parameter if you check &amp;quot;Allowed to Modify&amp;quot;. If you check &amp;quot;Required&amp;quot;, then some value will be required and the parameter cannot be empty. If you check &amp;quot;Use Device Template Default&amp;quot;, then whatever value you put in here as the default will be used by every device. Note that if you put in a default value, do not check &amp;quot;Allowed to Modify&amp;quot;, then the device will be created with the default value. However, if you later change the default value, all the devices values will not change unless you check this &amp;quot;Use Device Template Default&amp;quot; box. In that case, the device really has no local value and just uses the current default every time. If &amp;quot;Set by Device&amp;quot; is checked, then when the DCE class is generated a &amp;quot;set&amp;quot; methods will also be created so the device can set the value itself. Otherwise the data parameter is considered &#039;read-only&#039; by the device and can only be changed using the .&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
Because most devices implement lots of &#039;&#039;&#039;commands&#039;&#039;&#039;, and similar devices will always implement similar commands, commands are put into groups and the groups are added to the device template rather than adding the commands manually.  A TV, for example, can have 100 &amp;quot;standard&amp;quot; commands--like Volume Up/Down, Channel Up/Down, On/Off, Brightness Up, etc.  Rather than having to add every basic command to every TV, a group called &amp;quot;Standard TV commands&amp;quot; can be created, and you just add the group to the TV.  Command Groups use the same categories as the device template themselves.  By default, you will only see here the command groups within the same category as the device template to keep the screen clean.  Just check the command groups you want.  However, there is a pull-down listing every single command group so you can add command groups that are not in the same category.  You can also create a new command group and then specify what commands belong to that group.  When you create or edit a command group you will have the option of creating/editing the commands, and there you will be able to specify what parameters that command takes.&lt;br /&gt;
&lt;br /&gt;
If this device can be controlled via infrared, the infrared code for each command will need to be stored or learned.  The number of different models for A/V equipment is staggering.  However most manufacturers always use the same infrared codes across their whole line.  For example, a Sony remote control for 1 TV will control all other Sony TV&#039;s too.  So rather than requiring the user to add infrared codes for every Sony TV, we just create an infrared group &amp;quot;Sony TV Commands&amp;quot;.  Then you can add the DCE Command to Infrared Code commands to the group.  Later when someone else adds a Device Template for another model of Sony TV, they can just specify that it uses the same Infrared Group.  Note that the infrared group should therefore be a superset of all the commands--every command for every Sony TV.  Some high-end models may have commands like &amp;quot;Wide screen&amp;quot; vs &amp;quot;Normal&amp;quot;, which the low-end models do not support.  In this case, the high-end model may have more commands than the low-end model, but all the commands should be in the infrared group.  The low-end model will never use the infrared codes that it doesn&#039;t support, but at least they will be there and different infrared groups will not be required.  When the manufacturer changes the infrared codes their, then a new infrared group will be required.&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
Whatever &#039;&#039;&#039;events&#039;&#039;&#039; this device will fire are also added here.  When you create/edit an event, you can specify what parameters that event takes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Plug &amp;amp;amp; Play===&lt;br /&gt;
====Range of MAC====&lt;br /&gt;
The MAC range is needed to detect Plug and Play devices on the network. The numbers are decimals, calculated using the /usr/pluto/bin/convert_mac. If the mac address is 00:01:02:03:04:05 of a specific hardware, it is quite likely that all devices that start with 00:01:02:03 are part of the same product. &lt;br /&gt;
 /usr/pluto/bin/convert_mac 00:01:02:03:00:00&lt;br /&gt;
 /usr/pluto/bin/convert_mac 00:01:02:03:FF:FF&lt;br /&gt;
will give you the upper and lower limit to be entered.&lt;br /&gt;
====Vendor Model ID====&lt;br /&gt;
The vendor model ID is the PCI ID of the device in question. vendor_id plus product_id. If the PCI card has subvendor and subproduct id, add those too. &lt;br /&gt;
 lspci --nn -v&lt;br /&gt;
That above command will give you a list of all PCI devices in your system. Choose the one you are interested in, and note the details. &lt;br /&gt;
The DVB-S card in this example has these details:&lt;br /&gt;
 05:05.0 Multimedia controller [0480]: Philips Semiconductors SAA7146 [1131:7146] (rev 01)&lt;br /&gt;
         Subsystem: Technotrend Systemtechnik GmbH Device [13c2:1016]&lt;br /&gt;
         Flags: bus master, medium devsel, latency 32, IRQ 16&lt;br /&gt;
         Memory at f6101000 (32-bit, non-prefetchable) [size=512]&lt;br /&gt;
         Kernel driver in use: budget dvb&lt;br /&gt;
         Kernel modules: budget, snd-aw2&lt;br /&gt;
The relevant data in here are the colon seperated information in line 1 and line 2. These informations have to be glued together, while the colon has to be removed, i.e.&lt;br /&gt;
 1131714613c21016&lt;br /&gt;
is the Vendor Model ID, in this example. If you don&#039;t have a subsystem, put the vendor and product id from the first line only.&lt;br /&gt;
====PNP protocol====&lt;br /&gt;
* DHCP if it is IP based&lt;br /&gt;
* Empty for the rest has worked for me.&lt;br /&gt;
====Serial Number====&lt;br /&gt;
====Parms====&lt;br /&gt;
* For PCI based stuff, enter 175|pci&lt;br /&gt;
* For USB based stuff, enter 162|&lt;br /&gt;
====PNP detection script====&lt;br /&gt;
The PNP detection script is defined for RS-232 based devices. It is run, whenever a RS-232 port changes state.&lt;br /&gt;
&lt;br /&gt;
====Comment====&lt;br /&gt;
Put some nice comments about this specific pnp entry in here, so people can see what&#039;s special about it. Especially helpful when adding new MAC ranges to existing templates.&lt;br /&gt;
&lt;br /&gt;
===Device Template Related===&lt;br /&gt;
====Add device template related #ID====&lt;br /&gt;
====Extra====&lt;br /&gt;
===Screens===&lt;br /&gt;
====This device requires the following screens====&lt;/div&gt;</summary>
		<author><name>AHagerty93</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=GSD_Doc&amp;diff=28687</id>
		<title>GSD Doc</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=GSD_Doc&amp;diff=28687"/>
		<updated>2011-09-27T08:12:52Z</updated>

		<summary type="html">&lt;p&gt;AHagerty93: None&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
[[Category:Programmer&#039;s Guide]]&lt;br /&gt;
On the Device Template, add the command group &#039;Internal Ruby Commands&#039;. Choose &#039;Advanced, Devices&#039; from the menu, and select the PC on which you want to run your device--whatever PC the external hardware is connected to. Choose &#039;Create child device&#039;, and add an instance &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.thepiggybackrider.com/ &amp;lt;span style=&amp;quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&amp;quot;&amp;gt;kid carrier&amp;lt;/span&amp;gt;]&amp;lt;/span&amp;gt; of your new device template. Choose &#039;Wizard, Devices, Generic Serial Device&#039; from the menu, select your device, and choose &#039;Edit Ruby Code&#039;. Fill in the blanks for implementing each command, and also for how to handle incoming data, process idle messages and so on.&lt;br /&gt;
&lt;br /&gt;
The documentation for how to do this with GSD is here (todo)&lt;/div&gt;</summary>
		<author><name>AHagerty93</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Main_Page&amp;diff=28686</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Main_Page&amp;diff=28686"/>
		<updated>2011-09-27T08:12:33Z</updated>

		<summary type="html">&lt;p&gt;AHagerty93: None&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Main]]&lt;br /&gt;
__NOTOC__ __NOEDITSECTION__&lt;br /&gt;
&amp;amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
&amp;amp;lt;div style=&amp;quot;font-size:175%; font-weight:bold&amp;quot;&amp;gt;The &#039;&#039;&#039;[http://linuxmce.org LinuxMCE]&#039;&#039;&#039; wiki&amp;amp;lt;/div&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Your guide to a smarter home!&#039;&#039;&#039;&lt;br /&gt;
&amp;amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;clear: both; border: 1px solid #aaa; background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left: 1em; padding: 0.5em; float: right; text-align:center&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;[[Screenshots]]&#039;&#039;&#039;&lt;br /&gt;
[[Image:MainMenu1.jpg|200px]]&amp;amp;lt;br/&amp;gt;&amp;amp;lt;small&amp;gt;Main menu with media in the background&amp;amp;lt;br&amp;gt;(high resolution [[Selecting_the_Right_UI#UI2_with_alpha_blending|UI2B]])&amp;amp;lt;/small&amp;gt;&amp;amp;lt;br/&amp;gt;&amp;amp;lt;br/&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:FileBrowserUI1.jpg|200px]]&amp;amp;lt;br/&amp;gt;&amp;amp;lt;small&amp;gt;Browsing media files&amp;amp;lt;br&amp;gt;(low resolution [[Selecting_the_Right_UI#UI1|UI1]])&amp;amp;lt;/small&amp;gt;&amp;amp;lt;br/&amp;gt;&amp;amp;lt;br/&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:DialNumberUI1.jpg|200px]]&amp;amp;lt;br/&amp;gt;&amp;amp;lt;small&amp;gt;Telephone dial pad&amp;amp;lt;br&amp;gt;(low resolution [[Selecting_the_Right_UI#UI1|UI1]])&amp;amp;lt;/small&amp;gt;&amp;amp;lt;br/&amp;gt;&amp;amp;lt;br/&amp;gt;[[Screenshots|More screenshots and videos]]&lt;br /&gt;
|}&lt;br /&gt;
&#039;&#039;&#039;LinuxMCE is the only all-in-one open source solution that seamlessly combines:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;Media &amp;amp;amp; entertainment&#039;&#039; with a server for music and video, plus a [[PVR]] (like TiVo or Sky+)&lt;br /&gt;
* &#039;&#039;Home automation&#039;&#039; to control everything from lights to heating with a touch-screen tablet or your mobile phone&lt;br /&gt;
* VoIP based &#039;&#039;Phone system&#039;&#039;&lt;br /&gt;
* &#039;&#039;Security system&#039;&#039; that feeds live video to your mobile device during a security breach&lt;br /&gt;
&lt;br /&gt;
LinuxMCE builds on the superior networking capabilities of Linux to create a home automation/multimedia/communication network. No other operating system has this capability.&lt;br /&gt;
&lt;br /&gt;
[[LinuxMCE|Read more]] to see all the possibilities that LinuxMCE offers.&lt;br /&gt;
&lt;br /&gt;
See [[FAQ|the FAQ]] for quick answers to common questions about LinuxMCE.&lt;br /&gt;
&lt;br /&gt;
Watch the [[Video|LinuxMCE Video]] showing a detailed hardware and installation walk-through.&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
Please take a moment to read about &#039;&#039;&#039;[[Known_Issues|known issues]]&#039;&#039;&#039; before downloading our &#039;&#039;Quick Install DVD&#039;&#039; or the &#039;&#039;Two-CD Installer&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=5 cellpadding=5 border=0&lt;br /&gt;
|width=48|{{Click || image=Download_icon.png | link=Download_Instructions | width=60px | height=60px }}&lt;br /&gt;
|&#039;&#039;&#039;[[Download_Instructions|Download LinuxMCE]] or buy [[LinuxMCE Products]]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;After checking known issues please download from an appropriate mirror&amp;amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;amp;lt;small&amp;gt;Latest snapshot DVDs can be found [http://linuxmce.iptp.org/ here]&amp;amp;lt;/small&amp;gt;&amp;amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;lt;small&amp;gt;Check [http://wiki.linuxmce.org/index.php/Snapshot_overview on the wiki] which latest snapshot work without issues.&amp;amp;lt;/small&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You may then want to check out the [[DVD Installation]] guide for a step by step walk through of setting up and configuring LinuxMCE.&lt;br /&gt;
&lt;br /&gt;
=Project News=&lt;br /&gt;
*Wikiworkgroup created: [http://wiki.linuxmce.org/index.php/Wikiworkgroup more info] &#039;&#039;(24-aug-2011)&#039;&#039;&lt;br /&gt;
*[http://linuxmce.iptp.org/release/ LinuxMCE-810 RC1] (for testing) is released &#039;&#039;(21-aug-2011)&#039;&#039;&lt;br /&gt;
*A new tutorial on developing C++ devices is in the wiki: [[Developing a DCE Device]]&lt;br /&gt;
*[[LinuxMCE-0810 beta]] (for testing) is released &#039;&#039;(16-Oct-09)&#039;&#039;&lt;br /&gt;
*[[LinuxMCE-0810 alpha2]] (for testing) is released &#039;&#039;(18-Feb-09)&#039;&#039;&lt;br /&gt;
*[[LinuxMCE-0810 alpha1]] (for testing) is released &#039;&#039;(1-Dec-08)&#039;&#039;&lt;br /&gt;
*[[LinuxTag 2008]] a resounding success &#039;&#039;(28-May-08)&#039;&#039;&lt;br /&gt;
*[[Mirrors_0710|LinuxMCE Version 0710 (RC2)]] is released &#039;&#039;(07-May-08)&#039;&#039;&lt;br /&gt;
*[[Logo|LinuxMCE Logos]] are now available for download &#039;&#039;(09-Apr-08)&#039;&#039;&lt;br /&gt;
*[[Insteon_-_Setting_Up_PLM_Template|RC1 Insteon Support]] &#039;&#039;(20-Feb-08)&#039;&#039;&lt;br /&gt;
*[http://www.osweekly.com/index.php?option=com_content&amp;amp;amp;task=view&amp;amp;amp;id=2664 Linux Media Center PCs Review Roundup] &#039;&#039;(4-Oct-07)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=5 cellpadding=5 border=0 width=100%&lt;br /&gt;
|width=48|{{Click || image=News_icon.png | link=LinuxMCE_media_coverage | width=60px | height=60px }}&lt;br /&gt;
|&#039;&#039;&#039;[[LinuxMCE media coverage|More LinuxMCE media coverage]]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;Third party media and blog coverage&amp;amp;lt;/small&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Wiki Site News=&lt;br /&gt;
* A new tutorial on developing C++ devices is in the wiki: [[Developing a DCE Device]]&lt;br /&gt;
* A new [[LinuxMCE.Org 2.0|scratch-pad area]] is being set up to help document a new front end website.&lt;br /&gt;
* LinuxMCE Wiki was updated to the latest version which includes an RSS feed extension. Instructions about how to use it can be found [http://www.mediawiki.org/wiki/Extension:WikiArticleFeeds here], or take a look at a [[Test RSS]] &#039;&#039;(31-Jan-08)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Documentation Access=&lt;br /&gt;
This Wiki has many hierarchical of articles. There are also developer maillists, repositories (with attached &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.thepiggybackrider.com/ &amp;lt;span style=&amp;quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&amp;quot;&amp;gt;child carrier&amp;lt;/span&amp;gt;]&amp;lt;/span&amp;gt; discussions), and for discussion among users, developers and other members of the LinuxMCE community.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== User Setups and Videos ==&lt;br /&gt;
{| cellspacing=5 cellpadding=5 border=0 &lt;br /&gt;
|width=48|{{Click || image=Icon_setups.gif | link=User Setups | width=82px | height=48px }}&lt;br /&gt;
|&#039;&#039;&#039;[[:Category:User_Setups | User Setups]]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;LinuxMCE User Setups/Configurations&lt;br /&gt;
|width=48|{{Click || image=User-videos icon.png | link=User Videos | width=48px | height=48px }}&lt;br /&gt;
|&#039;&#039;&#039;[[:Category:User_Videos | User Videos]]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;Videos from LinuxMCE User and their Setups&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Support==&lt;br /&gt;
{| cellspacing=5 cellpadding=5 border=0 &lt;br /&gt;
|width=48|{{Click || image=Icon_user_guide.png | link=User Manual | width=54px | height=54px }}&lt;br /&gt;
|&#039;&#039;&#039;[[User Manual]]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;LinuxMCE User Manual&lt;br /&gt;
|width=48|{{Click || image=Howto_icon.gif | link=:Category:Tutorials | width=58px | height=57px }}&lt;br /&gt;
|&#039;&#039;&#039;[[:Category:Tutorials|Tutorials/Guides]]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;HOWTO guides describing common scenarios&lt;br /&gt;
|-&lt;br /&gt;
|width=48|{{Click || image=Faq_icon_blue.png | link=Frequently Asked Questions | width=58px | height=58px }}&lt;br /&gt;
|&#039;&#039;&#039;[[Frequently Asked Questions]]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;Responses to the most common questions&lt;br /&gt;
|width=48|{{Click || image=Pci-icon.png | link=Hardware | width=64px | height=48px }}&lt;br /&gt;
|&#039;&#039;&#039;[[Hardware]]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;Hardware documentation&lt;br /&gt;
|-&lt;br /&gt;
|width=48|{{Click || image=Troubleshooting_icon.png | link=Troubleshooting | width=61px | height=54px }}&lt;br /&gt;
|&#039;&#039;&#039;[[Troubleshooting]]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;Help with common problems&lt;br /&gt;
|width=48|{{UrlClick || image=Contacts icon.png | link=Developers | width=58px | height=58px }}&lt;br /&gt;
|&#039;&#039;&#039;[http://www.charonmedia.org/mailman/listinfo Mailing List]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;Stay up to date with regular emails&lt;br /&gt;
|-&lt;br /&gt;
|width=48|{{UrlClick || image=Forum.gif | link=kjh | width=48px | height=48px }}&lt;br /&gt;
|&#039;&#039;&#039;[http://forum.linuxmce.com Forum]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;Support forum&lt;br /&gt;
|width=48|{{Click || image=Forum.gif | link=Chat | width=48px | height=48px }}&lt;br /&gt;
|&#039;&#039;&#039;[[Chat]]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;Support chat&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
{| cellspacing=5 cellpadding=5 border=0&lt;br /&gt;
|width=48|{{Click || image=Contacts icon.png | link=Contacts | width=58px | height=58px }}&lt;br /&gt;
|&#039;&#039;&#039;[[Contacts|Contact Information]]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;Contact people involved with the project&lt;br /&gt;
|width=48|{{Click || image=Icon_user_guide.png | link=Programmer&#039;s Guide | width=54px | height=54px }}&lt;br /&gt;
|&#039;&#039;&#039;[[Programmer&#039;s Guide]]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;A guide for software developers&lt;br /&gt;
|-&lt;br /&gt;
|width=48|{{Click || image=Components-icon.png | link=Software components | width=58px | height=58px }}&lt;br /&gt;
|&#039;&#039;&#039;[[Software components|Software Components]]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;Open source software used by LinuxMCE&lt;br /&gt;
|width=48|{{Click || image=Bug_icon.png | link=Bug Reports | width=48px | height=48px }}&lt;br /&gt;
|&#039;&#039;&#039;[[Bug Reports]]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;Help improve the software by reporting bugs&lt;br /&gt;
|-&lt;br /&gt;
|width=48|{{Click || image=Code_icon.png | link=Source Code | width=48px | height=48px }}&lt;br /&gt;
|&#039;&#039;&#039;[[Source Code]]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;Access the LinuxMCE source code&lt;br /&gt;
|width=48|{{UrlClick || image=Cd_icon.png | link=Versions | width=48px | height=48px }}&lt;br /&gt;
|&#039;&#039;&#039;[[Versions]]&#039;&#039;&#039;&amp;amp;lt;br&amp;gt;&amp;amp;lt;small&amp;gt;View version histories and changes&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>AHagerty93</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=WxWidgets&amp;diff=28685</id>
		<title>WxWidgets</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=WxWidgets&amp;diff=28685"/>
		<updated>2011-09-27T08:12:13Z</updated>

		<summary type="html">&lt;p&gt;AHagerty93: None&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
  | __TOC__&lt;br /&gt;
  |}&lt;br /&gt;
[[Category: Programmer&#039;s Guide]]&lt;br /&gt;
&lt;br /&gt;
== What is wxWidgets? == &lt;br /&gt;
From their website:&lt;br /&gt;
An open source C++ GUI framework to make cross-platform programming child&#039;s play. Well, almost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== wxWidgets integration with LinuxMCE ==&lt;br /&gt;
&lt;br /&gt;
wxWidgets must be compiled with:&lt;br /&gt;
--with-gtk=2 --enable-monolithic --with-sdl --with-opengl&lt;br /&gt;
&lt;br /&gt;
For debug builds, add&lt;br /&gt;
--enable-debug&lt;br /&gt;
&lt;br /&gt;
sdl: needed by Orbiter&lt;br /&gt;
opengl: needed by Orbiter&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== wxWidgets integration with Orbiter ==&lt;br /&gt;
&lt;br /&gt;
Now, only Linux port of Orbiter uses wxWidgets&lt;br /&gt;
&lt;br /&gt;
A new directory, Orbiter/wxAppMain, was created, which contains only wx-related files&lt;br /&gt;
All *.cpp and *.h files added in this directory are automatically used by the Makefile in Orbiter&lt;br /&gt;
&lt;br /&gt;
Read the following wiki link &amp;quot;[[Integrating custom controls in Orbiter]]&amp;quot;,&lt;br /&gt;
which will explain how to use the wx dialogs, and how to control them.&lt;br /&gt;
&lt;br /&gt;
== Creating a new wxWidgets dialog to be used in Orbiter ==&lt;br /&gt;
&lt;br /&gt;
example: wxSecurityWizard will be the class name&lt;br /&gt;
&lt;br /&gt;
It should be derived from class wxDialog_Base.&lt;br /&gt;
&lt;br /&gt;
    class wxSecurityWizard : public wxDialog_Base&lt;br /&gt;
    {&lt;br /&gt;
    .......&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
wxDialog_Base and other classes already implemented will handle the wx-actions and the Orbiter-tasks.&lt;br /&gt;
&lt;br /&gt;
    In &amp;quot;dialog_types.h&amp;quot;, E_Dialog_SecurityWizard constant should be added&lt;br /&gt;
&lt;br /&gt;
    In &amp;quot;CallBackData.h&amp;quot;, a new class should be created, with the data that will be used by the new dialog&lt;br /&gt;
&lt;br /&gt;
if wxSecurityWizard will be used as a popup:&lt;br /&gt;
    class SecurityWizardCallBackData : public PopupCallBackData&lt;br /&gt;
    {...}&lt;br /&gt;
&lt;br /&gt;
if wxSecurityWizard will be used as a normal dialog:&lt;br /&gt;
    class SecurityWizardCallBackData : public PositionCallBackData&lt;br /&gt;
    {...}&lt;br /&gt;
&lt;br /&gt;
-- Generic methods from wxDialog_Base that can/should be overrided --&lt;br /&gt;
&lt;br /&gt;
    // load data from external object, called after create&lt;br /&gt;
    // by default calls Gui_Refresh&lt;br /&gt;
    virtual bool Gui_DataLoad(CallBackData *pCallBackData);&lt;br /&gt;
    &lt;br /&gt;
    // save data to external object&lt;br /&gt;
    // not called by default&lt;br /&gt;
    virtual bool Gui_DataSave(CallBackData *pCallBackData);&lt;br /&gt;
    // this should be used when the data from the dialog&lt;br /&gt;
    // needs to be transfered to Orbiter&lt;br /&gt;
    &lt;br /&gt;
    // GUI refresh related code should be implemented here&lt;br /&gt;
    // by default set full-screen or update position&lt;br /&gt;
    virtual bool Gui_Refresh(CallBackData *pCallBackData);&lt;br /&gt;
&lt;br /&gt;
-- Other methods from wxDialog_Base --&lt;br /&gt;
&lt;br /&gt;
This function should always be called if the position comes from Orbiter,&lt;br /&gt;
from a PositionCallBackData derived class.&lt;br /&gt;
&lt;br /&gt;
 void Update_Position_FullScreen(const &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.thepiggybackrider.com/ &amp;lt;span style=&amp;quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&amp;quot;&amp;gt;kid carrier&amp;lt;/span&amp;gt;]&amp;lt;/span&amp;gt; int x, const int y, const int width, const int height, bool bShowFullScreen);&lt;br /&gt;
    // if bShowFullScreen is true, the dialog is created full-screen&lt;br /&gt;
    // otherwise, his position is changed&lt;br /&gt;
    // if the dialog is already in the desired state, then wx functions for full-screen, or SetSize will not be called&lt;br /&gt;
&lt;br /&gt;
== Original Document ==&lt;br /&gt;
http://svn.plutohome.com/pluto/trunk/src/Orbiter/wxAppMain/WX_PLUTO.txt&lt;/div&gt;</summary>
		<author><name>AHagerty93</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Firewire_camera&amp;diff=28684</id>
		<title>Firewire camera</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Firewire_camera&amp;diff=28684"/>
		<updated>2011-09-27T08:11:52Z</updated>

		<summary type="html">&lt;p&gt;AHagerty93: None&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Tutorials]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
# Go to the device tree&lt;br /&gt;
# Select the computer that the camera is connected to in the device tree&lt;br /&gt;
# Click &amp;quot;Create Child Device&amp;quot; to create a child device under the computer.&lt;br /&gt;
# &amp;quot;Pick Device Template&amp;quot;&lt;br /&gt;
## Select the Interfaces/Specialized (#97) device category&lt;br /&gt;
## Select the &amp;quot;Firewire Camera to V4L Pipe&amp;quot; device template and click &amp;quot;Add Device&amp;quot;&lt;br /&gt;
# Repeat steps 2 through 4&lt;br /&gt;
## Select the Interfaces/Surveillance Video Interfaces (#111)&lt;br /&gt;
## Select the &amp;quot;Motion Wrapper&amp;quot; and &amp;quot;Add Device&amp;quot;. At this point the &amp;quot;Motion Wrapper&amp;quot; is selected in the device tree. If it&#039;s not, select it.&lt;br /&gt;
# &amp;quot;Create Child Device&amp;quot; under the &amp;quot;Motion Wrapper&amp;quot;&lt;br /&gt;
# Pick Device Template &amp;quot;Generic Analog Camera&amp;quot;&lt;br /&gt;
# Type &amp;quot;31&amp;quot; in the &amp;quot;#1 Device&amp;quot; Device Data field.&lt;br /&gt;
# Reboot the machine with the Firewire camera for it to install the software.&lt;br /&gt;
# Regen the Orbiter so it shows the &amp;quot;Generic Analog Camera&amp;quot;&lt;br /&gt;
# Push the button. I know you want to :) At this point you should see pictures from the camera.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
Where did that 31 come from... and what other fields have to be changed and how when adding a second camera.&lt;br /&gt;
&lt;br /&gt;
Firewire cameras are not V4L-capable so a translation needs to take place. We do it by means of vloopback which &#039;&#039;&#039;prives&#039;&#039;&#039;&#039;&#039;(what is this word supposed to be)&#039;&#039; V4L pipes and a program that reads from the Firewire camera and feeds pictures into one end of a V4L pipe. We started device numbers from 30 in the case of vloopback.&lt;br /&gt;
&lt;br /&gt;
Interesting DeviceData entries for the &amp;quot;Firewire Camera to V4L Pipe&amp;quot;:&lt;br /&gt;
* Device (#1): the number X at the end of /dev/video1394-X where the camera provides its video data. First camera is 0, second camera is 1, and so on.&lt;br /&gt;
* Port/Channel Number (#12): The vloopback pipe associated with this camera. Usually you&#039;d write the same number you wrote in the &amp;quot;Device&amp;quot; field above to reduce the chances of double allocation of the same pipe&lt;br /&gt;
* Width (#148) and Height (#149): If your camera displays weird images, but which seem to have a base in the real picture, the capturing resolution may not match the camera and you have to specify the correct capture resolution here. This resolution is camera-dependent.&lt;br /&gt;
&lt;br /&gt;
Interesting DeviceData entries for the &amp;quot;Generic Analog Camera&amp;quot;:&lt;br /&gt;
* Device (#1): The output end of a vloopback pipe where V4L video data is to be taken from. Since pipes come in pairs (one input/feed end, one output end) and their numbers start with &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.thepiggybackrider.com/ &amp;lt;span style=&amp;quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&amp;quot;&amp;gt;child carrier&amp;lt;/span&amp;gt;]&amp;lt;/span&amp;gt; 30, the first camera reads its pictures from /dev/video31 (pipe 0, /dev/video30 is the pipe feeding end), the second from /dev/video33 (pipe 1), the third from /dev/video35 (pipe 2) and so on. (Formula: 30 + 2 * pipe_number + 1 , where pipe_number is the pipe number you typed in the associated &amp;quot;Firewire Camera to V4L Pipe&amp;quot;&#039;s &amp;quot;Port/Channel Number (#12)&amp;quot; field).&lt;br /&gt;
&lt;br /&gt;
This procedure is not settled yet, and it&#039;s prone to change without notice, but it works like that for now.&lt;/div&gt;</summary>
		<author><name>AHagerty93</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=GlobalCache_GC-100&amp;diff=28683</id>
		<title>GlobalCache GC-100</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=GlobalCache_GC-100&amp;diff=28683"/>
		<updated>2011-09-27T08:11:25Z</updated>

		<summary type="html">&lt;p&gt;AHagerty93: None&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Hardware]]&lt;br /&gt;
{{versioninfo}}&lt;br /&gt;
{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
  | __TOC__&lt;br /&gt;
  |}&lt;br /&gt;
[[Category: Security]]&lt;br /&gt;
[[Category: Infrared]]&lt;br /&gt;
&lt;br /&gt;
[[Image:GC100.jpg|thumb|250px|GC 100]]&lt;br /&gt;
&lt;br /&gt;
GC100 is a network-capable device which allows you to add remote control (and other input device) connectivity. It includes:&lt;br /&gt;
&lt;br /&gt;
* serial ports&lt;br /&gt;
* [[IR|Infrared]] sensors (inputs) and outputs&lt;br /&gt;
* one or more relays&lt;br /&gt;
&lt;br /&gt;
The remote control data is then able to be sent over an Ethernet (TCP/IP) network through the Ethernet port, without the requirement of a connection to a specific PC.&lt;br /&gt;
&lt;br /&gt;
For more details about the product check [http://www.globalcache.com/products/gc-100/ the Global Cache manufacturer web site].&lt;br /&gt;
&lt;br /&gt;
Demo videos:&lt;br /&gt;
* http://www.youtube.com/watch?v=qig0pESNzyY&lt;br /&gt;
* http://www.youtube.com/watch?v=DsSHxn0YS2Y&lt;br /&gt;
* http://www.youtube.com/watch?v=58bQd0szCj8&lt;br /&gt;
&lt;br /&gt;
== Send IR codes ==&lt;br /&gt;
LinuxMCE implementation of GC100 assumes that in device tree we&#039;ll have children and the messages are actually addressed to them instead of GC100 itself. &lt;br /&gt;
&lt;br /&gt;
So when you are sending &amp;quot;ON&amp;quot; to TV controlled by GC100, the message is routed to the GC100, it finds [[infrared]] code for &amp;quot;ON&amp;quot; for that specific TV, sends a command to gc100 to send a specific [[infrared]] sequence, which will blink IR sender connected to specific port, and the TV will turn on.&lt;br /&gt;
&lt;br /&gt;
The only two commands that GC100 implements itself are : &#039;&#039;&#039;CMD_Send_Code&#039;&#039;&#039; used to test which IR is suitable for your equipment and &#039;&#039;&#039;CMD_Learn_IR&#039;&#039;&#039; used to learn new IR codes.&lt;br /&gt;
&lt;br /&gt;
== Learn IR codes ==&lt;br /&gt;
The learning device is actually unrelated to GC100. It may be plugged into one of GC100&#039;s serial ports (don&#039;t forget to set them to 9600 bps), or in regular serial port, just be sure you specified right port in GC100 device data.&lt;br /&gt;
&lt;br /&gt;
There are several other devices that support learning of infrared codes : [[IRTrans]], [[Tira]], [[USB_UIRT]].&lt;br /&gt;
&lt;br /&gt;
Learning is done from [[LinuxMCE-admin|web page]]. When clicking &amp;quot;Learn&amp;quot; gc100 will start a thread that will try to get data from the port. If nothing is received in 30 seconds the thread will die. The page will continue to refresh trying to see if anything was added, but after 30 seconds it&#039;s useless.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The gc100 jacks are by default configured as IR transmitters, but they can be configured to function as sensors. The sensors are, in their most basic form, two wires connected to a jack plug. When you cross them, a &amp;quot;sensor tripped&amp;quot; event is emitted. I am not currently aware of how this is supposed to function, who will intercept the event and how will it react to it. One idea for using a sensor is attaching a doorbell button to it, which, when pressed, will notify you in some way.&lt;br /&gt;
&lt;br /&gt;
You must go into the gc100&#039;s web panel and set the input jack to &#039;sensor w/ auto notify&#039; to use an i/r jack for a sensor.&lt;br /&gt;
&lt;br /&gt;
== How to ==&lt;br /&gt;
=== Install ===&lt;br /&gt;
The device is not quite [[plug&amp;amp;amp;play]]. You have to perform a factory reset and to add it from orbiter (&amp;quot;Add GC100&amp;quot; button). LMCE will temporarily change its internal network and look for the gc100 at its factory default of 192.168.1.70, change the configuration of the GC100, and the core then goes back to its regular network settings. Note that this will almost certainly fail if your &#039;&#039;&#039;exernal&#039;&#039;&#039; IP on the core is in the 192.168.1 network! The script will then install needed software and after that it should say that device is ready to use (don&#039;t forget to [[quickreload]]).&lt;br /&gt;
&lt;br /&gt;
==== Complete Manual Install ====&lt;br /&gt;
NOTE: Perform those steps if automation installation is not working! In 2.0.0.44 Gc-100 can be installed from the Orbiter by pressing the button &#039;Add GC100&#039; but the device should have factory IP!&lt;br /&gt;
&lt;br /&gt;
Factory reset the GC100. Connect it with a crossover cable to your pc. Change the ip address of your pc to the same network. Expl.: 192.168.1.101. Take a webbrowser and go to http://192.168.1.70.&lt;br /&gt;
&lt;br /&gt;
Make two changes:&lt;br /&gt;
&lt;br /&gt;
1. Serial: Change it to 4800/8/1/N (If you would like to connect a CM11 to it),&lt;br /&gt;
2. Network: Change it to your Network, outside of the pluto DHCP range.&lt;br /&gt;
&lt;br /&gt;
Take a note of the MAC address of your GC100&lt;br /&gt;
&lt;br /&gt;
In the pluto admin:&lt;br /&gt;
&lt;br /&gt;
1. Add a new device. Choose the GC100 template&lt;br /&gt;
2. Edit the new device&lt;br /&gt;
3. Enter your IP Adress&lt;br /&gt;
4. Enter the MAC Address of your GC100. Example: 00:0c:11:22:33:44&lt;br /&gt;
&lt;br /&gt;
Now reload everything.&lt;br /&gt;
&lt;br /&gt;
=== Before the first use ===&lt;br /&gt;
* Insert proper wires in relays, devices in serial ports, [[IR]] LEDs and/or sensors.&lt;br /&gt;
* Go to device&#039;s webpage and set proper inputs/outputs, baud rates and so on.&lt;br /&gt;
* Add child devices in [[LinuxMCE-admin]] webpage and set proper device data to match the wiring.&lt;br /&gt;
&lt;br /&gt;
This should do it.&lt;br /&gt;
&lt;br /&gt;
=== Changes in LinuxMCE 0710 beta 4 ===&lt;br /&gt;
The way the gc100 is configured in the database changes in LinuxMCE 0710 beta 4. If you are upgrading from a previous release and have a gc100 set up, you will have to reconfigure it.&lt;br /&gt;
&lt;br /&gt;
The device tree will now have children for each relay, transmitter and sensor port. These are autodetected depending on the settings made to the gc100 itself and updated as the settings change.&lt;br /&gt;
&lt;br /&gt;
If until now you would put a TV directly under the gc100, you will have to put it under a transmitter child from now on. This will tell the gc100 which port to use to send the code, instead of sending it using all available transmitters like it did until now. This will allow you to add more IR devices which use the same codes without stepping on each other&#039;s toes, since the IR codes will be routed just to the target device. The old functionality is still in place and you can still add a TV directly under the gc100, but make sure you mark the checkbox that says &amp;quot;Don&#039;t autoconfigure&amp;quot; if you don&#039;t want the gc100 to manage its children, so your device remains in its place.&lt;br /&gt;
&lt;br /&gt;
This is also true for relays. Add your lights, or other devices that support On and Off commands, under the relay children. The On and Off commands will be routed to the right relay this way.&lt;br /&gt;
&lt;br /&gt;
=== Known Problems ===&lt;br /&gt;
&lt;br /&gt;
==== MAC detection ====&lt;br /&gt;
&lt;br /&gt;
--[[User:Nite man|Nite man]] 06:03, 25 January 2008 (PST) To solve the MAC detection problem replace the function &#039;&#039;get_gc100mac()&#039;&#039; in the script &#039;&#039;/usr/pluto/bin/gc100-conf.pl&#039;&#039; by new one below:&lt;br /&gt;
&lt;br /&gt;
 sub get_gc100mac {&lt;br /&gt;
    my($mac, $page, $ret);&lt;br /&gt;
 &lt;br /&gt;
    `curl http://192.168.1.70/Commands.cgi -o gc100mac1 --silent`;&lt;br /&gt;
    `curl http://192.168.1.101/Commands.cgi -o gc100mac2 --silent`;&lt;br /&gt;
 &lt;br /&gt;
    open FILE, &amp;quot;gc100mac1&amp;quot;;&lt;br /&gt;
    $ret = read FILE, $page, -s &amp;quot;gc100mac1&amp;quot;;&lt;br /&gt;
    close FILE;&lt;br /&gt;
 &lt;br /&gt;
    unless($page) {&lt;br /&gt;
        open FILE, &amp;quot;gc100mac2&amp;quot;;&lt;br /&gt;
        $ret = read FILE, $page, -s &amp;quot;gc100mac2&amp;quot;;&lt;br /&gt;
        close FILE;&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    ($mac) = $page =~ /((?:[\dA-F]{2}-){5}[\dA-F]{2})/i;&lt;br /&gt;
 &lt;br /&gt;
    if($mac) {&lt;br /&gt;
        $mac =~ tr/\-/\:/;&lt;br /&gt;
        loggc(&amp;quot;Mac Found $mac\n&amp;quot;);&lt;br /&gt;
        system &amp;quot;rm -f gc100mac1 gc100mac2&amp;quot;;&lt;br /&gt;
        return $mac;&lt;br /&gt;
    } else { exit 1 }&lt;br /&gt;
 &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
or apply that [[http://smart-home-blog.com/wp-content/plugins/wp-downloadMonitor/download.php?id=18 gc100-conf.pl.patch]]&lt;br /&gt;
&lt;br /&gt;
Currently the support for the gc100 in LinuxMCE is broken, at least for some models or firmware versions.  The &#039;&#039;/usr/pluto/bin/gc100-conf.pl&#039;&#039; script is for some reason unable to determine the gc100&#039;s MAC Adress after it has been reset to factory defaults.  As a result it is only half configured and not added to the system properly.&lt;br /&gt;
&lt;br /&gt;
The only known workaround [http://smart-home-blog.com/archives/688] [http://forum.linuxmce.org/index.php?topic=1990.msg9161#msg9161] at this time is to manually edit the perl script, and hardcode the MAC address of your gc100.  In short, find this line in the script:&lt;br /&gt;
 sub get_gc100mac {&lt;br /&gt;
Then insert this line immediately following it (replace &#039;&#039;00:00:00:00:00:00&#039;&#039; with the adress of your gc100):&lt;br /&gt;
 &#039;&#039;&#039;return &amp;quot;&#039;&#039;00:00:00:00:00:00&#039;&#039;&amp;quot;;&#039;&#039;&#039;&lt;br /&gt;
As a result it should look something like this now:&lt;br /&gt;
         exit(4);&lt;br /&gt;
   }&lt;br /&gt;
 } &lt;br /&gt;
     &lt;br /&gt;
 sub get_gc100mac {&lt;br /&gt;
   &lt;br /&gt;
   &#039;&#039;&#039;return &amp;quot;&#039;&#039;00:00:00:00:00:00&#039;&#039;&amp;quot;&#039;&#039;&#039;;&lt;br /&gt;
   &lt;br /&gt;
   `curl &amp;amp;lt;nowiki&amp;gt;http://192.168.1.70/Commands.cgi&amp;amp;lt;/nowiki&amp;gt; -o gc100mac1 --silent`;&lt;br /&gt;
   `curl &amp;amp;lt;nowiki&amp;gt;http://192.168.1.101/Commands.cgi&amp;amp;lt;/nowiki&amp;gt; -o gc100mac2 --silent`;&lt;br /&gt;
   open(FILE,&amp;quot;gc100mac1&amp;quot;);&lt;br /&gt;
   @data1 = &amp;amp;lt;FILE&amp;gt;;&lt;br /&gt;
   close(FILE);&lt;br /&gt;
&lt;br /&gt;
Reset the gc100 to factory defaults if necessary and you should be able to add it from an orbiter as described above.&lt;br /&gt;
&lt;br /&gt;
Another possible workaround &#039;&#039;might&#039;&#039; be described on the [http://plutohome.com/wiki/index.php/Gc100 Plutohome wiki for the gc100], under &#039;&#039;&#039;Complete Manual Install&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Firmware versions known to be affected:&lt;br /&gt;
* 2.4-06 (GC100-06)&lt;br /&gt;
&lt;br /&gt;
==== Serial Port ====&lt;br /&gt;
&lt;br /&gt;
Previous problems in the gc100-serial-bridge.sh script were fixed in 0710 beta4.&lt;br /&gt;
&lt;br /&gt;
The GC100 serial port needs to be setup for 4800 bauds. &lt;br /&gt;
&lt;br /&gt;
In some cases the gc100 may respond with &amp;quot;configuration is locked&amp;quot;. If that happens, you need to re-configure the gc100 manually from factory defaults. In the /usr/pluto/bin/gc100-conf.pl, modify the wget call in the &amp;quot;sub configure_webgc&amp;quot; function to add parameter &amp;quot;Y=0&amp;quot; which means &amp;quot;do not lock config&amp;quot;:&lt;br /&gt;
 sub configure_webgc {&lt;br /&gt;
    $local_ip = shift;&lt;br /&gt;
    system(&amp;quot;wget -q -T 3 --read-timeout=4 -t 1 \&amp;quot;http://192.168.1.70/commands.cgi?2=$local_ip&amp;amp;amp;3=255.255.255.0&amp;amp;amp;4=$gw&amp;amp;amp;Y=0&amp;amp;amp;7=submit\&amp;quot;&amp;quot;);&lt;br /&gt;
    system(&amp;quot;wget -q -T 3 --read-timeout=4 -t 1 \&amp;quot;http://192.168.1.101/commands.cgi?2=$local_ip&amp;amp;amp;3=255.255.255.0&amp;amp;amp;4=$gw&amp;amp;amp;Y=0&amp;amp;amp;7=submit\&amp;quot;&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
or if you do it all manually from the command line:&lt;br /&gt;
 wget -q -T 3 --read-timeout=4 -t 1 &amp;quot;http://192.168.1.70/commands.cgi?2=192.168.80.23&amp;amp;amp;3=255.255.255.0&amp;amp;amp;4=192.168.80.1&amp;amp;amp;Y=0&amp;amp;amp;7=submit&amp;quot;&lt;br /&gt;
and adapt to the desired IP address.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can now edit the port speed with the browser. If your browser hangs when you submit, you can use this the following wget call instead:&lt;br /&gt;
 wget -q -T 3 --read-timeout=4 -t 1 &amp;quot;http://192.168.80.23/serial.cgi?C=1&amp;amp;amp;B=5&amp;amp;amp;F=0&amp;amp;amp;A=submit&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Firmware version 3.0 and later ====&lt;br /&gt;
&lt;br /&gt;
gc100 with firmware version 3.0 and later is Plug&amp;amp;amp;Play, but not yet supported as such by LinuxMCE. It implements a DHCP client and also has a discovery beacon. Because it is able to get an IP address from the DHCP server, you won&#039;t be able to add it using &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.thepiggybackrider.com/ &amp;lt;span style=&amp;quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&amp;quot;&amp;gt;child carrier&amp;lt;/span&amp;gt;]&amp;lt;/span&amp;gt; the manual method describe here when using a default installation. You either have to use the completely manual installation procedure described on the , if you know what IP address the DHCP server gave it, or temporarily disable the DHCP server on the core (write down the DHCP settings, because they are erased from the database when you disable the DHCP server from Pluto-Admin - you can also /etc/init.d/dhcp3-server stop, add the gc100 and /etc/init.d/dhcp3-server start, without erasing the database).&lt;br /&gt;
&lt;br /&gt;
== Implementation details ==&lt;br /&gt;
In &#039;&#039;gc100.cpp&#039;&#039; there is a lot of code for format conversion and other stuff. Practically it&#039;s not a big deal it receives a command, find a proper IR sequence and sends it to gc100.&lt;br /&gt;
&lt;br /&gt;
==== Operating the relays, IR transmitters, and sensors ====&lt;br /&gt;
The gc100 software architecture uses two threads to communicate with the gc100 regarding relays, IR transmitters and sensors, one for sending messages (SocketThread) and one for receiving (EventThread). The reason for this is that the gc100 protocol isn&#039;t completely a request-reply protocol, even if it seems like that at first. The gc100 can initiate a transmission when a sensor is tripped, enough to break the request-reply paradigm. The program was designed to treat the communication as asynchronous. Messages are sent to the device without expecting a reply, and the replies are treated as independent events and state change reports, without linking a request to a reply in the program logic (except for the initialization phase).&lt;/div&gt;</summary>
		<author><name>AHagerty93</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=AMP_Configuration_Guide&amp;diff=28682</id>
		<title>AMP Configuration Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=AMP_Configuration_Guide&amp;diff=28682"/>
		<updated>2011-09-27T08:11:09Z</updated>

		<summary type="html">&lt;p&gt;AHagerty93: None&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category :Tutorials]]&lt;br /&gt;
[[category :Programmer&#039;s Guide]]&lt;br /&gt;
&amp;amp;lt;h1&amp;gt;How to configure Asterisk with AMP (Asterisk management portal)&amp;amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;amp;lt;p&amp;gt;AMP is a separate web based configuration tool for Asterisk.  Note that as of March 2006, it has been renamed to [http://www.freepbx.org Freepbx]. More information can be found on the [http://www.voip-info.org/wiki/view/freePBX VoIP Wiki], and the [http://www.freepbx.org FreePBX website].&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;amp;lt;p&amp;gt;Here is a quick intro as it relates to LinuxMCE.  Note the AMP integration is not fully complete.  In time this process will become more seamless.&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;amp;lt;p&amp;gt;&amp;amp;lt;b&amp;gt;Step 1: Add your phones&amp;amp;lt;/b&amp;gt;&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;amp;lt;p&amp;gt;The phones in your home will be stored in 2 places: Once in LinuxMCE&#039;s database as LinuxMCE devices.  This is where the orbiters retrieve the list of phones in the house to display on the screens, and also the phones you can position on the floorplan.&amp;amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;p&amp;gt;Secondly, AMP also maintains its own list of phone extensions that it uses to configure Asterisk.  Normally LinuxMCE&#039;s list and AMP&#039;s list will stay in sync automatically.  You can verify this by checking Wizard, Devices, Phones to see LinuxMCE&#039;s list.&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;p&amp;gt;Go to Advanced, Configuration, Phone Setup, and take a look at extension list in the right. The &#039;Extension&#039; in AMP&#039;s list should equal the &#039;PhoneNumber&#039; in LinuxMCE&#039;s list, and in LinuxMCE&#039;s list if you click the &#039;ADV&#039; button, you will see LinuxMCE&#039;s IP address, which should correspond to AMP&#039;s.&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;p&amp;gt;LinuxMCE has its own plug &amp;amp;amp; play back end. If you have IP based phones, just plug them in. If we have that model in our plug &amp;amp;amp; play database &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.thepiggybackrider.com/ &amp;lt;span style=&amp;quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&amp;quot;&amp;gt;child carrier&amp;lt;/span&amp;gt;]&amp;lt;/span&amp;gt; it should appear automatically in AMP&#039;s phone extension table and also in LinuxMCE&#039;s Device list. Otherwise you must add the phones manually to both lists. For each phone specify the IP address of the phone and a give each phone a unique phone extension (the &#039;Phone Number&#039; on LinuxMCE&#039;s list).&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
&amp;amp;lt;p&amp;gt;Check that device is listed as child of &#039;Asterisk&#039; device.by checking devices list on left of web admin&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;amp;lt;p&amp;gt;Goto AMP&#039;s config site from the LinuxMCE Web Admin site: Advanced/Configuration/Phones Setup then extensions on the left list and then click on your phone from the list on the right...&lt;br /&gt;
    &amp;amp;lt;ul&amp;gt;&amp;amp;lt;li&amp;gt;if your phone is plug&amp;amp;amp;play it should be listed&lt;br /&gt;
		on the right, select it and just check if all data are ok.&amp;amp;lt;/li&amp;gt;&lt;br /&gt;
		&amp;amp;lt;li&amp;gt;otherwise (specify &amp;amp;lt;b&amp;gt;phone type&amp;amp;lt;/b&amp;gt;(SIP/IAX2),&lt;br /&gt;
		&amp;amp;lt;b&amp;gt;Extention&amp;amp;lt;/b&amp;gt;, &amp;amp;lt;b&amp;gt;Password&amp;amp;lt;/b&amp;gt; and later &amp;amp;lt;b&amp;gt;IP address&amp;amp;lt;/b&amp;gt;.&lt;br /&gt;
	&amp;amp;lt;/ul&amp;gt; &lt;br /&gt;
	&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;amp;lt;p&amp;gt;Don&#039;t forget to regenerate screens on orbiters and quick reload&lt;br /&gt;
    for dcerouter.&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;amp;lt;p&amp;gt;If you added more than one phone, try to call between them&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;amp;lt;p&amp;gt;It&#039;s a good idea to setup a default phone in section&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;p&amp;gt;&amp;amp;lt;b&amp;gt;Step 2: Add your phone lines and VOIP providers&amp;amp;lt;/b&amp;gt;&amp;amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;amp;lt;p&amp;gt;Next step is to setup external lines...Please follow your VOIP &lt;br /&gt;
    provider&#039;s instructions. &amp;amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>AHagerty93</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Container_properties&amp;diff=28681</id>
		<title>Container properties</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Container_properties&amp;diff=28681"/>
		<updated>2011-09-27T08:10:56Z</updated>

		<summary type="html">&lt;p&gt;AHagerty93: None&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Top&#039;&#039;&#039; : &#039;&#039;&#039;&#039;&#039;Integer&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The top coordinate of the Container control. If not defined, will be zero. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Left&#039;&#039;&#039; : &#039;&#039;&#039;&#039;&#039;Integer&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left coordinate of the Container control. If not defined, will be zero.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Width&#039;&#039;&#039; : &#039;&#039;&#039;&#039;&#039;Integer&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The width (in pixels) of Container control. If width is not specified, the width will be parent&#039;s control width.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Height&#039;&#039;&#039; : &#039;&#039;&#039;&#039;&#039;Integer&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Height (in pixels) of Container &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.thepiggybackrider.com/ &amp;lt;span style=&amp;quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&amp;quot;&amp;gt;kid carrier&amp;lt;/span&amp;gt;]&amp;lt;/span&amp;gt; control. If height is not specified, the height will be parent&#039;s control width.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Visible&#039;&#039;&#039; : &#039;&#039;&#039;&#039;&#039;Boolean&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Say if the current control is visible. If the container is not visible, the child controls aren&#039;t visible too.&lt;br /&gt;
[[Category: Programmer&#039;s Guide]]&lt;/div&gt;</summary>
		<author><name>AHagerty93</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Misterhouse&amp;diff=28679</id>
		<title>Misterhouse</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Misterhouse&amp;diff=28679"/>
		<updated>2011-09-27T08:10:14Z</updated>

		<summary type="html">&lt;p&gt;AHagerty93: None&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{versioninfo}}&lt;br /&gt;
{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
  | __TOC__&lt;br /&gt;
  |}&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Automation]]&lt;br /&gt;
[http://www.misterhouse.com Misterhouse] is a great integrated Home automation program and much more.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
=== Template ===&lt;br /&gt;
It seems that template for Misterhouse is already in LMCE - I only needed to add Computers to &amp;quot;controlled by category&amp;quot;, so it can be added as child of Core or MD...&lt;br /&gt;
&lt;br /&gt;
In template, there is an &amp;quot;/usr/local/misterhouse/start.sh&amp;quot; entry in Command line data- that means that LMCE will start this script and therefore also misterhouse. Installation should be made regarding this fact.&lt;br /&gt;
&lt;br /&gt;
=== HowTo ===&lt;br /&gt;
Currently there are no Ubuntu packages for MH, so &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.thepiggybackrider.com/ &amp;lt;span style=&amp;quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&amp;quot;&amp;gt;kid carrier&amp;lt;/span&amp;gt;]&amp;lt;/span&amp;gt; it has to be installed from scratch. An detailed guide can be found on Misterhouse&#039;s site, I also have found isntructions for ubuntu and MH &lt;br /&gt;
&lt;br /&gt;
== Integration with LMCE ==&lt;br /&gt;
Here&#039;s a dirty code snippet for LinuxMCE&#039;s listener script under Misterhouse. Be careful since it intercepts all messages and that could become quite greedy... &lt;br /&gt;
&lt;br /&gt;
Before using this script you have to add listener as device under LinuxMCE as explained in LinuxMCE&#039;s docs...&lt;br /&gt;
You have to follow first few steps from LinuxMCE&#039;s text message intercepting tutorial (create logic handler device) and then add this script to your Misterhouse setup :&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Category=LinuxMCE&lt;br /&gt;
#&lt;br /&gt;
#@ Connection with LinuxMCE DCE Router via TCP port localhost:3450 (mh.ini -&amp;gt; pluto_DCE_router). &lt;br /&gt;
#&lt;br /&gt;
use strict;&lt;br /&gt;
&lt;br /&gt;
############################################################################## &lt;br /&gt;
$pluto_event_receiver = new  Socket_Item(undef, undef, &#039;193.77.90.224:3450&#039;,&#039;event_receiver&#039;,&#039;tcp&#039;,&#039;record&#039;);&lt;br /&gt;
&lt;br /&gt;
$pluto_command_sender = new  Socket_Item(undef, undef, &#039;193.77.90.224:3450&#039;,&#039;command_sender&#039;,&#039;tcp&#039;,&#039;record&#039;);&lt;br /&gt;
&lt;br /&gt;
if ($Startup) {&lt;br /&gt;
	start $pluto_event_receiver;&lt;br /&gt;
        set $pluto_event_receiver &amp;quot;COMMAND 6778&amp;quot;;&lt;br /&gt;
        	&lt;br /&gt;
	start $pluto_command_sender;&lt;br /&gt;
	set $pluto_command_sender &amp;quot;EVENT 6778&amp;quot;;&lt;br /&gt;
	set $pluto_command_sender &amp;quot;PLAIN_TEXT&amp;quot;;&lt;br /&gt;
# purge other interceptors on same device ID&lt;br /&gt;
#	set $pluto_command_sender &amp;quot;MESSAGET 13&amp;quot;;&lt;br /&gt;
#	set $pluto_command_sender &amp;quot;6778 -1000 13&amp;quot;;&lt;br /&gt;
	send_command_to_pluto(&amp;quot;6778 -1000 13&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
# intercepts all messages, I guess it&#039;s better to be selective here !!!!	&lt;br /&gt;
#	set $pluto_command_sender &amp;quot;MESSAGET 22&amp;quot;;&lt;br /&gt;
#	set $pluto_command_sender &amp;quot;6778 -1000 8 0 0 0 0 0&amp;quot;;&lt;br /&gt;
	send_command_to_pluto(&amp;quot;6778 -1000 8 0 0 0 0 0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
} &lt;br /&gt;
     &lt;br /&gt;
sub send_command_to_pluto {&lt;br /&gt;
 my ($message) = @_;&lt;br /&gt;
	set $pluto_command_sender &amp;quot;MESSAGET &amp;quot; . length ($message);&lt;br /&gt;
	set $pluto_command_sender $message;&lt;br /&gt;
        print_log &amp;quot;Sending Command to Pluto DCE : $message\n&amp;quot;;&lt;br /&gt;
        print     &amp;quot;Sending Command to Pluto DCE : $message\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if (my $msg = said $pluto_event_receiver) {&lt;br /&gt;
        print_log &amp;quot;Pluto Event received: $msg\n&amp;quot;;&lt;br /&gt;
        print      &amp;quot;Pluto Event received: $msg\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some additional work on this matter is described on forum threads here :&lt;br /&gt;
[http://forum.linuxmce.org/index.php?topic=3573.0]&lt;br /&gt;
[http://forum.linuxmce.org/index.php?topic=391.0]&lt;br /&gt;
[http://forum.linuxmce.org/index.php?topic=1884.0]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Adding some useful snippets :&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;pre&amp;gt;&lt;br /&gt;
if (my $msg = said $pluto_device_event_receiver) {&lt;br /&gt;
        print_log &amp;quot;Pluto Device Message received: $msg\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        $msg =~ s/[\&amp;quot;\&#039;]//g;    # remove quotes before splitting on whitespace&lt;br /&gt;
&lt;br /&gt;
        if ($msg =~/(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)/ ) {&lt;br /&gt;
                print_log &amp;quot;DeviceFrom: $1&amp;quot;;&lt;br /&gt;
                print_log &amp;quot;DeviceTo:: $2&amp;quot;;&lt;br /&gt;
                print_log &amp;quot;MsgType: $3 (1=Command, 2=Event)&amp;quot;;&lt;br /&gt;
                print_log &amp;quot;MsgId: $4&amp;quot;;&lt;br /&gt;
                print_log &amp;quot;param1id: $5&amp;quot;;&lt;br /&gt;
                print_log &amp;quot;param2value (X10 Device): $6&amp;quot;;&lt;br /&gt;
                print_log &amp;quot;param2id: $7&amp;quot;;&lt;br /&gt;
                print_log &amp;quot;param2value (X10 Command): $8&amp;quot;;&lt;br /&gt;
                if ($8 == &#039;192&#039;) {&lt;br /&gt;
                  print_log &amp;quot;Turn $6 ON&amp;quot;;&lt;br /&gt;
                  set $6 ON;&lt;br /&gt;
                }&lt;br /&gt;
                if ($8 == &#039;193&#039;) {&lt;br /&gt;
                  print_log &amp;quot;Turn $6 OFF&amp;quot;;&lt;br /&gt;
                  set $6 OFF;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&amp;amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;pre&amp;gt;&lt;br /&gt;
# Category=Pluto&lt;br /&gt;
#&lt;br /&gt;
#@ Connection with Pluto DCE Router via TCP port localhost:3450 (mh.ini -&amp;gt; pluto_DCE_router).&lt;br /&gt;
#&lt;br /&gt;
use strict;&lt;br /&gt;
$restartTimer = new Timer;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##############################################################################&lt;br /&gt;
&lt;br /&gt;
sub connect_lmce {&lt;br /&gt;
        print_log &amp;quot;Configuring sockets&amp;quot;;&lt;br /&gt;
        $pluto_device_event_receiver = new  Socket_Item(undef, undef, &#039;192.168.1.1:3450&#039;,&#039;device_event_receiver&#039;,&#039;tcp&#039;,&#039;record&#039;);&lt;br /&gt;
        $pluto_device_command_sender = new  Socket_Item(undef, undef, &#039;192.168.1.1:3450&#039;,&#039;device_command_sender&#039;,&#039;tcp&#039;,&#039;record&#039;);&lt;br /&gt;
&lt;br /&gt;
        print_log &amp;quot;Closing sockets if any left open&amp;quot;;&lt;br /&gt;
        if (active_now $pluto_device_event_receiver) {stop $pluto_device_event_receiver;}&lt;br /&gt;
        if (active_now $pluto_device_command_sender) {stop $pluto_device_command_sender;}&lt;br /&gt;
&lt;br /&gt;
        print_log &amp;quot;Open and setup new sockets&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        start $pluto_device_event_receiver;&lt;br /&gt;
        set $pluto_device_event_receiver &amp;quot;COMMAND 179&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        start $pluto_device_command_sender;&lt;br /&gt;
        set $pluto_device_command_sender &amp;quot;EVENT 179&amp;quot;;&lt;br /&gt;
        set $pluto_device_command_sender &amp;quot;PLAIN_TEXT&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if ($Startup) {&lt;br /&gt;
        print_log &amp;quot;Starting connection to LMCE&amp;quot;;&lt;br /&gt;
        set $restartTimer 10, sub {connect_lmce;};&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if (inactive_now $pluto_device_event_receiver or inactive_now $pluto_device_command_sender) {&lt;br /&gt;
        print_log &amp;quot;Connection to LMCE terminated, restarting&amp;quot;;&lt;br /&gt;
        set $restartTimer 10, sub {connect_lmce;};&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if (new_minute 1 and !active $pluto_device_event_receiver or new_minute 1 and !active $pluto_device_command_sender) {&lt;br /&gt;
        print_log &amp;quot;Connection to LMCE still terminated, restarting&amp;quot;;&lt;br /&gt;
        connect_lmce;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#my $motion=0;&lt;br /&gt;
&lt;br /&gt;
if (my $msg = said $pluto_device_event_receiver) {&lt;br /&gt;
        print_log &amp;quot;Pluto Device Message received: $msg\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        $msg =~ s/[\&amp;quot;\&#039;]//g;    # remove quotes before splitting on whitespace&lt;br /&gt;
&lt;br /&gt;
        if ($msg =~/(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)/ or $msg =~/(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)/) {&lt;br /&gt;
                print_log &amp;quot;DeviceFrom: $1&amp;quot;;&lt;br /&gt;
                print_log &amp;quot;DeviceTo: $2&amp;quot;;&lt;br /&gt;
                print_log &amp;quot;MsgType: $3 (1=Command, 2=Event)&amp;quot;;&lt;br /&gt;
                print_log &amp;quot;MsgId: $4&amp;quot;;&lt;br /&gt;
                print_log &amp;quot;param1id: $5&amp;quot;;&lt;br /&gt;
                print_log &amp;quot;param2value: $6&amp;quot;;&lt;br /&gt;
                if (defined $7) { print_log &amp;quot;param2id: $7&amp;quot;;}&lt;br /&gt;
                if (defined $8) { print_log &amp;quot;param2value: $8&amp;quot;;}&lt;br /&gt;
&lt;br /&gt;
                #############################################################&lt;br /&gt;
                # $1    $2      $3      $4      $5      $6      $7      $8&lt;br /&gt;
                # from  to      msgtype msgid   p1id    p1val   p2id    p2val&lt;br /&gt;
                # Example command from orbiter&lt;br /&gt;
                # 69    206     1       192     97      &amp;quot;&amp;quot;      98      &amp;quot;&amp;quot;&lt;br /&gt;
                # 69    206     1       193     97      &amp;quot;&amp;quot;&lt;br /&gt;
                # 69    205     1       184     76      &amp;quot;100&amp;quot;&lt;br /&gt;
                # Example command from admin site&lt;br /&gt;
                # 0     204     1       760     10      &amp;quot;C2&amp;quot;    154     &amp;quot;192&amp;quot;&lt;br /&gt;
                # 0     204     1       760     10      &amp;quot;C2&amp;quot;    154     &amp;quot;193&amp;quot;&lt;br /&gt;
                #############################################################&lt;br /&gt;
&lt;br /&gt;
                my $target;&lt;br /&gt;
                my $x10_id;&lt;br /&gt;
&lt;br /&gt;
                if ($2 == &#039;162&#039;) { $x10_id = &#039;A5&#039;; }&lt;br /&gt;
                if ($2 == &#039;186&#039;) { $x10_id = &#039;A3&#039;; }&lt;br /&gt;
                if ($2 == &#039;187&#039;) { $x10_id = &#039;B1&#039;; }&lt;br /&gt;
                if ($2 == &#039;188&#039;) { $x10_id = &#039;A8&#039;; }&lt;br /&gt;
                if ($2 == &#039;189&#039;) { $x10_id = &#039;B3&#039;; }&lt;br /&gt;
                if ($2 == &#039;190&#039;) { $x10_id = &#039;B4&#039;; }&lt;br /&gt;
                if ($2 == &#039;191&#039;) { $x10_id = &#039;A10&#039;; }&lt;br /&gt;
                if ($2 == &#039;192&#039;) { $x10_id = &#039;A9&#039;; }&lt;br /&gt;
                if ($2 == &#039;218&#039;) { $x10_id = &#039;A6&#039;; }&lt;br /&gt;
                if (defined $x10_id) { $target = new X10_Item(&amp;quot;$x10_id&amp;quot;);}&lt;br /&gt;
&lt;br /&gt;
                if ($4 == &#039;760&#039; ) { $target = new X10_Item(&amp;quot;$6&amp;quot;);}&lt;br /&gt;
&lt;br /&gt;
                if ($8 == &#039;192&#039; or $4 == &#039;192&#039;) {&lt;br /&gt;
                  print_log &amp;quot;Turn device $x10_id ON&amp;quot;;&lt;br /&gt;
                  set $target ON;&lt;br /&gt;
                }&lt;br /&gt;
                if ($8 == &#039;193&#039; or $4 == &#039;193&#039;) {&lt;br /&gt;
                  print_log &amp;quot;Turn device $x10_id OFF&amp;quot;;&lt;br /&gt;
                  set $target OFF;&lt;br /&gt;
                }&lt;br /&gt;
                if ($4 == &#039;184&#039;) {&lt;br /&gt;
                  print_log &amp;quot;Setting device $x10_id to $6%&amp;quot;;&lt;br /&gt;
                  set $target &amp;quot;$6%&amp;quot;;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub send_pluto_message {&lt;br /&gt;
        my($message) = @_;&lt;br /&gt;
        set $pluto_device_command_sender &amp;quot;MESSAGET &amp;quot; . length ($message);&lt;br /&gt;
        set $pluto_device_command_sender $message;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub update_temp {&lt;br /&gt;
        # Example message@&lt;br /&gt;
        # 167=temp sensor ID, 2=event, 25=event ID (temp changed), 30=value, temperature (string)&lt;br /&gt;
        # my $message = sprintf(&amp;quot;167 -1000 2 25 30 %d.2&amp;quot;,$random_number);&lt;br /&gt;
&lt;br /&gt;
        my($sensor, $temp) = @_;&lt;br /&gt;
        my $lmce_device;&lt;br /&gt;
&lt;br /&gt;
        ### map iButtons to lmce device numbers - there are better ways of doing this! ###&lt;br /&gt;
        if ($sensor == 0) { $lmce_device = 166; }&lt;br /&gt;
        if ($sensor == 1) { $lmce_device = 167; }&lt;br /&gt;
&lt;br /&gt;
        my $message = sprintf(&amp;quot;$lmce_device -1000 2 25 30 %d.2&amp;quot;,$temp);&lt;br /&gt;
        send_pluto_message($message);&lt;br /&gt;
        print_log &amp;quot;Updating sensor $lmce_device $temp&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub lmce_motion {&lt;br /&gt;
        my($device_id) = @_;&lt;br /&gt;
        # 6780=Detector ID, 2=event, 9=event ID (tripped), 25=tripped value, 0=value (tripped OFF)&lt;br /&gt;
        my $message = &amp;quot;$device_id -1000 2 9 25 0&amp;quot;;&lt;br /&gt;
        send_pluto_message($message);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub lmce_still {&lt;br /&gt;
        my($device_id) = @_;&lt;br /&gt;
        # 6780=Detector ID, 2=event, 9=event ID (tripped), 25=tripped value, 1=value (tripped ON)&lt;br /&gt;
        my $message = &amp;quot;$device_id -1000 2 9 25 1&amp;quot;;&lt;br /&gt;
        send_pluto_message($message);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if ($state = state_now $Kitchen_Motion) {&lt;br /&gt;
  if ($state eq MOTION) {&lt;br /&gt;
        lmce_motion(185);&lt;br /&gt;
  }&lt;br /&gt;
  if ($state eq STILL) {&lt;br /&gt;
        lmce_still(185);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if ($state = state_now $Landing_Motion) {&lt;br /&gt;
  if ($state eq MOTION) {&lt;br /&gt;
        lmce_motion(184);&lt;br /&gt;
  }&lt;br /&gt;
  if ($state eq STILL) {&lt;br /&gt;
        lmce_still(184);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if ($state = state_now $Hall_Motion) {&lt;br /&gt;
  if ($state eq MOTION) {&lt;br /&gt;
        lmce_motion(183);&lt;br /&gt;
  }&lt;br /&gt;
  if ($state eq STILL) {&lt;br /&gt;
        lmce_still(183);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;pre&amp;gt;&lt;br /&gt;
        if ($msg =~/(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)/ or $msg =~/(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)/&lt;br /&gt;
                        or $msg =~/(\w*)\s(\w*)\s(\w*)\s(\w*)/ ) {&lt;br /&gt;
                print_log &amp;quot;DeviceFrom: $1&amp;quot;;&lt;br /&gt;
                print_log &amp;quot;DeviceTo: $2&amp;quot;;&lt;br /&gt;
                print_log &amp;quot;MsgType: $3 (1=Command, 2=Event)&amp;quot;;&lt;br /&gt;
                print_log &amp;quot;MsgId: $4&amp;quot;;&lt;br /&gt;
                if (defined $5) { print_log &amp;quot;param1id: $5&amp;quot;;}&lt;br /&gt;
                if (defined $6) { print_log &amp;quot;param2value: $6&amp;quot;;}&lt;br /&gt;
                if (defined $7) { print_log &amp;quot;param2id: $7&amp;quot;;}&lt;br /&gt;
                if (defined $8) { print_log &amp;quot;param2value: $8&amp;quot;;}&lt;br /&gt;
&lt;br /&gt;
                #############################################################&lt;br /&gt;
                # $1    $2      $3      $4      $5      $6      $7      $8&lt;br /&gt;
                # from  to      msgtype msgid   p1id    p1val   p2id    p2val&lt;br /&gt;
                # Example command from orbiter&lt;br /&gt;
                # 69    206     1       192     97      &amp;quot;&amp;quot;      98      &amp;quot;&amp;quot;&lt;br /&gt;
                # 69    206     1       193     97      &amp;quot;&amp;quot;&lt;br /&gt;
                # 69    205     1       184     76      &amp;quot;100&amp;quot;&lt;br /&gt;
                # 69    218     1       193&lt;br /&gt;
                # Example command from admin site&lt;br /&gt;
                # 0     204     1       760     10      &amp;quot;C2&amp;quot;    154     &amp;quot;192&amp;quot;&lt;br /&gt;
                # 0     204     1       760     10      &amp;quot;C2&amp;quot;    154     &amp;quot;193&amp;quot;&lt;br /&gt;
                #############################################################&lt;br /&gt;
&amp;amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It seems this is the most current version of MH connecting to LMCE:&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;pre&amp;gt;&lt;br /&gt;
# Category=Pluto&lt;br /&gt;
#&lt;br /&gt;
#@ Connection with Pluto DCE Router via TCP port localhost:3450 (mh.ini -&amp;gt; pluto_DCE_router).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# strict Perl syntax&lt;br /&gt;
use strict;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Use timer.&lt;br /&gt;
$restartTimer = new Timer;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if($Startup)&lt;br /&gt;
{&lt;br /&gt;
        print_log &amp;quot;Starting connection to LMCE&amp;quot;;&lt;br /&gt;
        set $restartTimer 10, sub {connect_lmce;};&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if&lt;br /&gt;
(&lt;br /&gt;
        inactive_now($pluto_device_event_receiver) ||&lt;br /&gt;
        inactive_now($pluto_device_command_sender)&lt;br /&gt;
)&lt;br /&gt;
{&lt;br /&gt;
        print_log &amp;quot;Connection to LMCE terminated, restarting&amp;quot;;&lt;br /&gt;
        set $restartTimer 10, sub {connect_lmce;};&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Should parenthesize &amp;amp;amp;&amp;amp;amp;/|| expressions to make precedence explicit&lt;br /&gt;
if(new_minute 1 &amp;amp;amp;&amp;amp;amp; !active $pluto_device_event_receiver || new_minute 1 &amp;amp;amp;&amp;amp;amp; !active $pluto_device_command_sender)&lt;br /&gt;
{&lt;br /&gt;
        print_log &amp;quot;Connection to LMCE still terminated, restarting&amp;quot;;&lt;br /&gt;
        connect_lmce();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#my $motion=0;&lt;br /&gt;
&lt;br /&gt;
if(my($msg) = said($pluto_device_event_receiver))&lt;br /&gt;
{ # Process message.&lt;br /&gt;
        print_log &amp;quot;Pluto Device Message received: $msg\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        # Remove quotes before splitting on whitespace.&lt;br /&gt;
        $msg =~ s/[\&amp;quot;\&#039;]//g;&lt;br /&gt;
&lt;br /&gt;
        #############################################################&lt;br /&gt;
        # message Parameters as ordered fields&lt;br /&gt;
        #############################################################&lt;br /&gt;
        # $1    $2      $3      $4      $5      $6      $7      $8&lt;br /&gt;
        # from  to      msgtype msgid   p1id    p1val   p2id    p2val&lt;br /&gt;
        #############################################################&lt;br /&gt;
        # Example command from orbiter&lt;br /&gt;
        # 69    206     1       192     97      &amp;quot;&amp;quot;      98      &amp;quot;&amp;quot;&lt;br /&gt;
        # 69    206     1       193     97      &amp;quot;&amp;quot;&lt;br /&gt;
        # 69    205     1       184     76      &amp;quot;100&amp;quot;&lt;br /&gt;
        # Example command from admin site&lt;br /&gt;
        # 0     204     1       760     10      &amp;quot;C2&amp;quot;    154     &amp;quot;192&amp;quot;&lt;br /&gt;
        # 0     204     1       760     10      &amp;quot;C2&amp;quot;    154     &amp;quot;193&amp;quot;&lt;br /&gt;
        #############################################################&lt;br /&gt;
&lt;br /&gt;
        # Decode message into required and optional fields as validation.&lt;br /&gt;
        my&lt;br /&gt;
        (&lt;br /&gt;
                $reqFieldsPat = &#039;(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+(\w+)&#039;;&lt;br /&gt;
                $optFieldsPat = &#039;\s*(\w*)\s*(\w*)&#039;;&lt;br /&gt;
        );&lt;br /&gt;
        if&lt;br /&gt;
        (&lt;br /&gt;
                my&lt;br /&gt;
                (&lt;br /&gt;
                        # required fields&lt;br /&gt;
                        $deviceFrom, $deviceTo, $msgType, $msgId,&lt;br /&gt;
                        $param1Id, $param1Value,&lt;br /&gt;
&lt;br /&gt;
                        # optional fields&lt;br /&gt;
                        $param2Id, $param2Value&lt;br /&gt;
                )&lt;br /&gt;
                = ($msg =~ /$reqFieldsPat$optFieldsPat/)&lt;br /&gt;
        )&lt;br /&gt;
        { # Process valid message.&lt;br /&gt;
                %msgTypes =&lt;br /&gt;
                {&lt;br /&gt;
                        &#039;1&#039; =&amp;gt; &#039;Command&#039;,&lt;br /&gt;
                        &#039;2&#039; =&amp;gt; &#039;Event&#039;&lt;br /&gt;
                };&lt;br /&gt;
                $msgType .=&lt;br /&gt;
                        &#039;: &#039; . defined($msgTypes{$msgType})?&lt;br /&gt;
                                        $msgTypes{$msgType} : &#039;unknown type&#039;;&lt;br /&gt;
&lt;br /&gt;
                # Log required fields.&lt;br /&gt;
                print_log &amp;amp;lt;&amp;amp;lt;EOT;&lt;br /&gt;
DeviceFrom: $deviceFrom&lt;br /&gt;
DeviceTo: $deviceTo&lt;br /&gt;
MsgType: $msgType&lt;br /&gt;
MsgId: $msgId&lt;br /&gt;
param1id: $param1Id&lt;br /&gt;
param2value: $param1Val&lt;br /&gt;
EOT&lt;br /&gt;
&lt;br /&gt;
                # Log optional fields.&lt;br /&gt;
                if(defined($param2Id))&lt;br /&gt;
                {&lt;br /&gt;
                        print_log &amp;quot;param2id: $$param2Id&amp;quot;;&lt;br /&gt;
                        print_log &#039;param2value: &#039; .&lt;br /&gt;
                                (defined($param2Val))? $param2Val : &#039;undefined&#039;;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                # Use X10 ID as target.&lt;br /&gt;
                my($target);&lt;br /&gt;
                my $x10_id;&lt;br /&gt;
                %dev2x10 =&lt;br /&gt;
                { # device ID to X10 ID&lt;br /&gt;
                        &#039;162&#039; =&amp;gt; &#039;A5&#039;,&lt;br /&gt;
                        &#039;186&#039; =&amp;gt; &#039;A3&#039;,&lt;br /&gt;
                        &#039;187&#039; =&amp;gt; &#039;B1&#039;,&lt;br /&gt;
                        &#039;188&#039; =&amp;gt; &#039;A8&#039;,&lt;br /&gt;
                        &#039;189&#039; =&amp;gt; &#039;B3&#039;,&lt;br /&gt;
                        &#039;190&#039; =&amp;gt; &#039;B4&#039;,&lt;br /&gt;
                        &#039;191&#039; =&amp;gt; &#039;A10&#039;,&lt;br /&gt;
                        &#039;192&#039; =&amp;gt; &#039;A9&#039;,&lt;br /&gt;
                        &#039;218&#039; =&amp;gt; &#039;A6&#039;&lt;br /&gt;
                }; # dev2x10&lt;br /&gt;
&lt;br /&gt;
                $x10_id = $dev2x10{$deviceTo};&lt;br /&gt;
                if(defined($x10_id))&lt;br /&gt;
                {&lt;br /&gt;
                        $target = new X10_Item($x10_id);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                # Probably can convert arbitrary msgID / setting rules&lt;br /&gt;
                #   to %msg2Setting if they&#039;re exclusive and regular.&lt;br /&gt;
                if($msgId eq &#039;760&#039; )&lt;br /&gt;
                { # new item in param1&lt;br /&gt;
                        $target = new X10_Item($param1Val);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                # Execute message on target.&lt;br /&gt;
                if($msgId eq &#039;192&#039; || $param2Val eq &#039;192&#039;)&lt;br /&gt;
                { # ON&lt;br /&gt;
                  print_log &amp;quot;Turn device $x10_id ON&amp;quot;;&lt;br /&gt;
                  set $target ON;&lt;br /&gt;
                }&lt;br /&gt;
                if($msgId eq &#039;193&#039; || $param2Val eq &#039;193&#039;)&lt;br /&gt;
                { # OFF&lt;br /&gt;
                  print_log &amp;quot;Turn device $x10_id OFF&amp;quot;;&lt;br /&gt;
                  set $target OFF;&lt;br /&gt;
                }&lt;br /&gt;
                if($msgId eq &#039;184&#039;)&lt;br /&gt;
                { # in param1&lt;br /&gt;
                  print_log &amp;quot;Setting device $x10_id to $param1Val%&amp;quot;;&lt;br /&gt;
                  set $target &amp;quot;$param1Val%&amp;quot;;&lt;br /&gt;
                }&lt;br /&gt;
        } # Process message.&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
my(%motionStates) =&lt;br /&gt;
{&lt;br /&gt;
        &#039;MOTION&#039; =&amp;gt; &#039;0&#039;,&lt;br /&gt;
        &#039;STILL&#039; =&amp;gt; &#039;1&#039;&lt;br /&gt;
};&lt;br /&gt;
my(%motionLocation2DeviceId) =&lt;br /&gt;
{&lt;br /&gt;
        $Hall_Motion =&amp;gt; &#039;183&#039;,&lt;br /&gt;
        $Landing_Motion =&amp;gt; &#039;184&#039;,&lt;br /&gt;
        $Kitchen_Motion =&amp;gt; &#039;185&#039;&lt;br /&gt;
};&lt;br /&gt;
my(@motionLocations) = keys(motionLocation2DeviceId);&lt;br /&gt;
foreach my($motionLocation) (@motionLocations)&lt;br /&gt;
{&lt;br /&gt;
        if($state = state_now($motionLocation)&lt;br /&gt;
        {&lt;br /&gt;
                lmce_motion($motionStates{$state}, $motionLocation);&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# subs ########################################################################&lt;br /&gt;
&lt;br /&gt;
sub connect_lmce&lt;br /&gt;
{&lt;br /&gt;
        print_log &amp;quot;Configuring sockets&amp;quot;;&lt;br /&gt;
        $pluto_device_event_receiver =&lt;br /&gt;
                new  Socket_Item(undef, undef, &#039;192.168.1.1:3450&#039;,&#039;device_event_receiver&#039;,&#039;tcp&#039;,&#039;record&#039;);&lt;br /&gt;
        $pluto_device_command_sender =&lt;br /&gt;
                new  Socket_Item(undef, undef, &#039;192.168.1.1:3450&#039;,&#039;device_command_sender&#039;,&#039;tcp&#039;,&#039;record&#039;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        print_log &amp;quot;Closing sockets if any left open&amp;quot;;&lt;br /&gt;
        if(active_now($pluto_device_event_receiver))&lt;br /&gt;
        {&lt;br /&gt;
                stop($pluto_device_event_receiver);&lt;br /&gt;
        }&lt;br /&gt;
        if(active_now($pluto_device_command_sender))&lt;br /&gt;
        {&lt;br /&gt;
                stop($pluto_device_command_sender);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        print_log &amp;quot;Open and setup new sockets&amp;quot;;&lt;br /&gt;
        start($pluto_device_event_receiver);&lt;br /&gt;
        set $pluto_device_event_receiver &amp;quot;COMMAND 179&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        start($pluto_device_command_sender);&lt;br /&gt;
        set $pluto_device_command_sender &amp;quot;EVENT 179&amp;quot;;&lt;br /&gt;
        set $pluto_device_command_sender &amp;quot;PLAIN_TEXT&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sub send_pluto_message&lt;br /&gt;
{&lt;br /&gt;
        my($message) = @_;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        set $pluto_device_command_sender &amp;quot;MESSAGET &amp;quot; . length($message);&lt;br /&gt;
        set $pluto_device_command_sender $message;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sub update_temp&lt;br /&gt;
{&lt;br /&gt;
        my($sensor, $temp) = @_;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        # Example message@&lt;br /&gt;
        # 167=temp sensor ID, 2=event, 25=event ID (temp changed), 30=value, temperature (string)&lt;br /&gt;
        # my($message) = &amp;quot;167 -1000 2 25 30 $random_number.2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        # Map iButtons to lmce device numbers.&lt;br /&gt;
        my(%sensorId2LMCEDeviceId) =&lt;br /&gt;
        {&lt;br /&gt;
                0 =&amp;gt; 166,&lt;br /&gt;
                1 =&amp;gt; 167&lt;br /&gt;
        }&lt;br /&gt;
        my($lmce_device) = $sensorId2LMCEDeviceId{$sensor};&lt;br /&gt;
&lt;br /&gt;
        my($message) = &amp;quot;$lmce_device -1000 2 25 30 $temp.2&amp;quot;;&lt;br /&gt;
        send_pluto_message($message);&lt;br /&gt;
        print_log &amp;quot;Updating sensor $lmce_device $temp&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sub lmce_motion&lt;br /&gt;
{&lt;br /&gt;
        my($motionState, $device_id) = @_;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        # 6780=Detector ID, 2=event, 9=event ID (tripped), 25=tripped value, 1=value (tripped 0=OFF || 1=ON)&lt;br /&gt;
        my($message) = &amp;quot;$device_id -1000 2 9 25 $motionState&amp;quot;;&lt;br /&gt;
        send_pluto_message($message);&lt;br /&gt;
}&lt;br /&gt;
&amp;amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>AHagerty93</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=GSD_Ruby_Interface&amp;diff=28678</id>
		<title>GSD Ruby Interface</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=GSD_Ruby_Interface&amp;diff=28678"/>
		<updated>2011-09-27T08:09:47Z</updated>

		<summary type="html">&lt;p&gt;AHagerty93: None&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
  | __TOC__&lt;br /&gt;
  |}&lt;br /&gt;
[[Category: Programmer&#039;s Guide]]&lt;br /&gt;
[[Category: Serial]]&lt;br /&gt;
[[Category: GSD]]&lt;br /&gt;
&lt;br /&gt;
Short description of available classes and methods. the list is not complete, but covers most of functionality.&lt;br /&gt;
== RubySerialIOConnectionWrapper ==&lt;br /&gt;
The connection object, is the exported (already &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.thepiggybackrider.com/ &amp;lt;span style=&amp;quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&amp;quot;&amp;gt;child carrier&amp;lt;/span&amp;gt;]&amp;lt;/span&amp;gt; opened) connection to the device. It can be either Serial (or USB Serial) connection or a network connection (in this situation you need to specify host IP and port to connect).&lt;br /&gt;
&lt;br /&gt;
It&#039;s usually accessed via &#039;&#039;&#039;conn_&#039;&#039;&#039; variable.&lt;br /&gt;
=== Methods ===&lt;br /&gt;
* &#039;&#039;&#039;Send (&amp;amp;lt;string&amp;gt;)&#039;&#039;&#039; : will send the &#039;&#039;string&#039;&#039; to the device&lt;br /&gt;
* &#039;&#039;&#039;Recv (&amp;amp;lt;count&amp;gt;, &amp;amp;lt;timeout&amp;gt;)&#039;&#039;&#039; : will put return received data (either the count was reached, or the timeout)&lt;br /&gt;
* &#039;&#039;&#039;RecvDelimited(&amp;amp;lt;delimiter&amp;gt;, &amp;amp;lt;timeout&amp;gt;)&#039;&#039;&#039; : will return received data until the delimiter was found&lt;br /&gt;
* &#039;&#039;&#039;Reconnect()&#039;&#039;&#039; : will close and then reopen the connection to the device&lt;br /&gt;
* &#039;&#039;&#039;Close()&#039;&#039;&#039; : will close the connection&lt;br /&gt;
&lt;br /&gt;
== RubySerialWrapper ==&lt;br /&gt;
This class is the equivalent of DCECommandImpl, is the one which implements commands and most of the time your code will run in this context&lt;br /&gt;
=== Methods ===&lt;br /&gt;
* &#039;&#039;&#039;SendCommand (&amp;amp;lt;command&amp;gt;)&#039;&#039;&#039; : send a command (kind of DCEmessage, may be command or event)&lt;br /&gt;
* &#039;&#039;&#039;SendReceiveCommand (&amp;amp;lt;command&amp;gt;)&#039;&#039;&#039; : send a command, like SendCommand, but also receives the response, that is any parameter that returns a value&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* &#039;&#039;&#039;parent_&#039;&#039;&#039; : parent device&lt;br /&gt;
* &#039;&#039;&#039;device_&#039;&#039;&#039; : access to the device itself&lt;br /&gt;
* &#039;&#039;&#039;children_&#039;&#039;&#039; : list of children&lt;br /&gt;
&lt;br /&gt;
== RubyDeviceWrapper ==&lt;br /&gt;
The wrapper for DCEDevice, will have all devicedata and other stuff&lt;br /&gt;
=== Members ===&lt;br /&gt;
* &#039;&#039;&#039;devid_&#039;&#039;&#039; : Device ID&lt;br /&gt;
* &#039;&#039;&#039;devtemplid_&#039;&#039;&#039; : Device Template ID&lt;br /&gt;
* &#039;&#039;&#039;devdata_&#039;&#039;&#039; : a map &amp;amp;lt;int, string&amp;gt; with device data&lt;br /&gt;
* &#039;&#039;&#039;parent_&#039;&#039;&#039; : parent device&lt;br /&gt;
* &#039;&#039;&#039;childdevices_&#039;&#039;&#039; : a map &amp;amp;lt;int, RubyDeviceWrapper&amp;gt; of child devices.&lt;br /&gt;
&lt;br /&gt;
== RubyCommandWrapper ==&lt;br /&gt;
A wrapper over DCEMessage, not quite right called &#039;&#039;Command&#039;&#039;, because we can use it for both commands and events.&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* &#039;&#039;&#039;devidfrom_&#039;&#039;&#039; : device id of sender&lt;br /&gt;
* &#039;&#039;&#039;devidto_&#039;&#039;&#039; : device id of receiver&lt;br /&gt;
* &#039;&#039;&#039;priority_&#039;&#039;&#039; : message priority&lt;br /&gt;
* &#039;&#039;&#039;type_&#039;&#039;&#039; : message type (1 = command, 2 = event)&lt;br /&gt;
* &#039;&#039;&#039;id_&#039;&#039;&#039; : message ID (commandID or eventID)&lt;br /&gt;
* &#039;&#039;&#039;params_&#039;&#039;&#039; : map &amp;amp;lt;int, string&amp;gt; whith parameters&lt;br /&gt;
&lt;br /&gt;
== Usage samples ==&lt;br /&gt;
&lt;br /&gt;
To send a command&lt;br /&gt;
 cmd = Command.new(devidfrom, devidto, priority, type, id);&lt;br /&gt;
 cmd.params_[x] = y;&lt;br /&gt;
 SendCommand(cmd);&lt;br /&gt;
&lt;br /&gt;
To send a command which returns parameters&lt;br /&gt;
 cmd = Command.new(devidfrom, devidto, priority, type, id);&lt;br /&gt;
 cmd.params_[x] = y;&lt;br /&gt;
 SendReceiveCommand(cmd);&lt;br /&gt;
 myVar = cmd.params_[z]&lt;br /&gt;
&lt;br /&gt;
To receive some data of unknown length&lt;br /&gt;
 recv=&amp;quot;&amp;quot;&lt;br /&gt;
 while(true)&lt;br /&gt;
     buff=conn_.Recv(128,100)&lt;br /&gt;
     if(buff.length() == 0)&lt;br /&gt;
         break&lt;br /&gt;
     end&lt;br /&gt;
     recv = recv + buff&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
To process command for child device&lt;br /&gt;
 dev_slot = device_.childdevices_[cmd.devidto_].devdata_[12]&lt;br /&gt;
 case cmd.id_&lt;br /&gt;
     #power on&lt;br /&gt;
     when 192 then&lt;br /&gt;
         conn_.Send(&amp;quot;ON &amp;quot;+dev_slot+&amp;quot;\r&amp;quot;);&lt;br /&gt;
     #power off&lt;br /&gt;
     when 193 then&lt;br /&gt;
         conn_.Send(&amp;quot;OFF &amp;quot;+dev_slot+&amp;quot;\r&amp;quot;);&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>AHagerty93</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Web_Orbiter&amp;diff=28677</id>
		<title>Web Orbiter</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Web_Orbiter&amp;diff=28677"/>
		<updated>2011-09-27T08:09:33Z</updated>

		<summary type="html">&lt;p&gt;AHagerty93: None&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{versioninfo|810Status=Depreciated - Use [[Web_Orbiter_2.0]] |810UpdatedDate=|810UpdatedBy=--[[User:Langstonius|Langstonius]] 20:37, 15 September 2010 (CEST)}}&lt;br /&gt;
{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
  | __TOC__&lt;br /&gt;
  |}&lt;br /&gt;
[[Category: Orbiters]]&lt;br /&gt;
[[Category: Tutorials]]&lt;br /&gt;
&lt;br /&gt;
A Web Orbiter is any device (such as a laptop, PC, etc.) that accesses the Orbiter user interface (UI) through a Web browser.&lt;br /&gt;
&lt;br /&gt;
There is now a new version of WebOrbiter (WebOrbiter 2.0) please click [[Web_Orbiter_2.0|here]] for setup instructions.  &lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
The procedure to setup a Web Orbiter is simple but the order of steps is important.&lt;br /&gt;
#First of all, add a new Generic Web Device as a Child Device for your Core:&lt;br /&gt;
##Goto the LinuxMCE Admin website--&amp;gt;Show devices tree--&amp;gt;CORE. The CORE&#039;s detail page should appear.&lt;br /&gt;
##Click &#039;Create Child Device&#039;.&lt;br /&gt;
##In the Description, enter the name of the specific web orbiter.&lt;br /&gt;
##In the Add child device window, click the button &#039;Pick device template&#039;. The new pop-up window containing device templates will be opened.&lt;br /&gt;
##In the &#039;Device Category&#039; dropdown list, choose &#039;Peripherals&#039;.&lt;br /&gt;
##In the &#039;Device Template&#039; dropdown list, find and select &amp;quot;Generic Web Device&amp;quot; (or just type the template id: 1748 and press go).&lt;br /&gt;
##Click the button &#039;Pick Device Template&#039;. The Add Child Device Window will close, and the Generic Web Device will be added to the Core, as the updated Device Tree will show.&lt;br /&gt;
##A new Generic Proxy Orbiter will also be created automatically. Watch the Orbiter generation process on the Orbiters page: Wizard--&amp;gt;Devices--&amp;gt;Orbiters.&lt;br /&gt;
#Wait till the Orbiter generation procedure finishes. A message on an active Orbiter or on the Orbiter page will indicate when it has completed.&lt;br /&gt;
#Do a &amp;quot;[[Quick reload router]]&amp;quot;. Otherwise, the Orbiter won&#039;t work properly.&lt;br /&gt;
&lt;br /&gt;
==Access to the Web Orbiter==&lt;br /&gt;
&lt;br /&gt;
===From within your home===&lt;br /&gt;
You can access the Web Orbiter from any web browser (Mozilla Firefox, IE, Safari):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If you are currently using the 810 alpha releases the correct URL is:&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&amp;amp;lt;nowiki&amp;gt;http://&amp;amp;amp;lt;core_ip&amp;amp;amp;gt;/lmce-admin/weborbiter.php&amp;amp;lt;/nowiki&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The current release 710 uses the information below.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*In the browser address bar, type the URL &#039;&#039;&amp;amp;lt;nowiki&amp;gt;http://&amp;amp;amp;lt;core_ip&amp;amp;amp;gt;/pluto-admin/weborbiter.php&amp;amp;lt;/nowiki&amp;gt;&#039;&#039;.&lt;br /&gt;
:* From within the &amp;quot;internal&amp;quot; LinuxMCE LAN, for example: &lt;br /&gt;
::::&#039;&#039;http://192.168.80.1/pluto-admin/weborbiter.php&#039;&#039; (0710)&lt;br /&gt;
::::&#039;&#039;http://192.168.80.1/lmce-admin/weborbiter.php&#039;&#039; (0810)&lt;br /&gt;
:::::(This assumes the IP address range set by default at installation.)&lt;br /&gt;
:*You can also use the network name of the Core in place of the IP address. For example, if the Core was named &amp;quot;dcerouter&amp;quot; during the default installation, you could use:&lt;br /&gt;
::::&#039;&#039;&amp;amp;lt;nowiki&amp;gt;http://dcerouter/pluto-admin/weborbiter.php&amp;amp;lt;/nowiki&amp;gt;&#039;&#039;&lt;br /&gt;
:*From the &amp;quot;external&amp;quot; home LAN, the core_ip would be the LAN IP address of the core. If, for example, the core is at 192.168.0.50 on the home LAN, use:&lt;br /&gt;
:::: &#039;&#039;&amp;amp;lt;nowiki&amp;gt;http://192.168.0.50/pluto-admin/weborbiter.php&amp;amp;lt;/nowiki&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:::::(Note: To use this method, [[Outside Access]] must be enabled.)&lt;br /&gt;
&lt;br /&gt;
===From the Internet===&lt;br /&gt;
You could use the IP address:port for your home LAN, with port forwarding to the Core&#039;s LAN IP address (enabled by your home LAN router). &lt;br /&gt;
*&#039;&#039;This is an advanced topic and may not be secure in the current version.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By default, LinuxMCE is not accessible outside your home. This makes the system secure, but it prevents &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.thepiggybackrider.com/ &amp;lt;span style=&amp;quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&amp;quot;&amp;gt;kid carrier&amp;lt;/span&amp;gt;]&amp;lt;/span&amp;gt; you from accessing the web site via the Internet while away from home. You can , allowing access to the admin website anywhere. For your own security, however, we recommend you first read about .&lt;br /&gt;
&lt;br /&gt;
===Login page===&lt;br /&gt;
*A simple login page should be displayed. Input an existing user name and password, then click &amp;quot;Login&amp;quot;.&lt;br /&gt;
*From the dropdown list of devices, choose Generic Web Device.&lt;br /&gt;
*A page that looks similar to this should appear: [[Image:Web Orbiter.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
===Connect failed===&lt;br /&gt;
If you try to connect to the Web Orbiter and see this message:&lt;br /&gt;
&amp;amp;lt;code&amp;gt;&amp;quot;Connect to proxy orbiter failed, please try again&amp;quot;&amp;amp;lt;/code&amp;gt;, &lt;br /&gt;
this means that Orbiter generation hasn&#039;t finished yet, or that you forgot to do a [[Quick_reload_router|quick restart of the router]].&lt;br /&gt;
&lt;br /&gt;
=== Size ===&lt;br /&gt;
I was able to change the size of the rendered image in the Wizard--&amp;gt;Orbiters page. Find the Web Orbiter device in the list and resize it. After another orbiter regen, it was the right size for me. (&#039;&#039;Source http://forum.linuxmce.org/index.php?topic=3833.0&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
=== Problems with rapid refresh rate ===&lt;br /&gt;
&lt;br /&gt;
Problem:&lt;br /&gt;
When using the Web Orbiter over the Internet (instead of from within my home LAN), it refreshed every 5 seconds, making it difficult to use. The images were repeatedly downloaded each time.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
*Go to [[LinuxMCE Admin Website]]--&amp;gt;Device tree--&amp;gt;CORE--&amp;gt;Generic Web Device--&amp;gt;Device Data &lt;br /&gt;
*Set the Refresh Interval to a higher value (I used 60 seconds for mine).&lt;br /&gt;
&lt;br /&gt;
=== Changing default room ===&lt;br /&gt;
Changing the default room in the Wizard--&amp;gt;Devices--&amp;gt;Orbiters page has no effect.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
*Go to [[LinuxMCE Admin Website]]--&amp;gt;Device tree--&amp;gt;CORE--&amp;gt;Generic Web Device&lt;br /&gt;
*Check the box for the room to control&lt;br /&gt;
&lt;br /&gt;
===Screen Deadlock===&lt;br /&gt;
If the screen of your orbiter becomes &amp;quot;frozen&amp;quot; or stuck and orbiter regens and router reloads do not resolve the issue, run this from the core:&lt;br /&gt;
 sudo killall -9 Proxy_Orbiter&lt;br /&gt;
(Source: http://forum.linuxmce.org/index.php?topic=6844.0)&lt;br /&gt;
= See also =&lt;br /&gt;
Another example of a web orbiter is the [[IOrbiter]]&lt;br /&gt;
&lt;br /&gt;
WebOrbiter has also been rebuilt from the ground up as [[Web_Orbiter_2.0]]&lt;/div&gt;</summary>
		<author><name>AHagerty93</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Orbiters&amp;diff=28676</id>
		<title>Orbiters</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Orbiters&amp;diff=28676"/>
		<updated>2011-09-27T08:09:11Z</updated>

		<summary type="html">&lt;p&gt;AHagerty93: None&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{versioninfo}}&lt;br /&gt;
{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
  | __TOC__&lt;br /&gt;
  |}&lt;br /&gt;
[[Category: Orbiters]]&lt;br /&gt;
[[Category: Admin Website]]&lt;br /&gt;
[[Image:Orbiters.jpg|thumb|250px|Orbiters Page Admin Website]]&amp;amp;lt;p&amp;gt;The &#039;&#039;&#039;Orbiters&#039;&#039;&#039; are the devices used to communicate/interface with LinuxMCE at the user level. The Orbiter devices display the standardized Orbiter User Interface (UI) from which users control all user-aspects and functionality of LinuxMCE. Media Directors have their own on-screen Orbiter UI. &amp;amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An Orbiter can be a laptop, a Blackberry, or even a Bluetooth mobile phone.&lt;br /&gt;
&lt;br /&gt;
The Orbiter UI can be controlled via a touch-screen interface, a handheld remote control (such as a Windows MCE remote control), or even a universal infrared remote control (connected by [[USB UIRT|USB-UIRT]]).&lt;br /&gt;
&lt;br /&gt;
For an Orbiter device to connect, it must either have a connection to a Media Director through an input port, or it must wirelessly connect to the home automation/multimedia LAN through a wireless access point (or wireless router with the DHCP turned off). The Wireless Access Point/Router must obviously be connected to the Core server.&lt;br /&gt;
&lt;br /&gt;
While you can administer the LinuxMCE system through a Media Director (through its own on-screen Orbiter User Interface), you can also control the system from many other Orbiter devices as well.&lt;br /&gt;
&lt;br /&gt;
==Types of Orbiters==&lt;br /&gt;
See [[:Category:Orbiters|the orbiter hardware list]] for a list of devices that have been used as Orbiters.&lt;br /&gt;
&lt;br /&gt;
Many Orbiters have relatively slow processors (like PDA&#039;s and mobile phones) and may be running on slow Wi-Fi connections. Therefore, Orbiters do not retrieve the large, full-size graphics that are available directly to Media Directors. This would require scaling them, redrawing the text, and re-rendering the graphics on the fly for each Orbiter, a processor-intensive operation.&lt;br /&gt;
&lt;br /&gt;
Instead, all the graphics on the Orbiters are pre-scaled and pre-rendered by a software module on the Core called &amp;quot;[[Orbiter Generator|OrbiterGen]]&amp;quot;. If you add new scenarios or devices or change floorplans or skins, you won&#039;t see them immediately on the Orbiter. The [[LinuxMCE Admin Website]]--&amp;gt;Advanced--&amp;gt;[[Orbiter Generator|Regenerate this Orbiter]] option is run and a wait of about 60 seconds is required while OrbiterGen renders new graphics, following which the Orbiter will be reloaded.&lt;br /&gt;
&lt;br /&gt;
===Web Orbiter===&lt;br /&gt;
&lt;br /&gt;
A [[Web Orbiter]] refers to any laptop (or other PC) on the LinuxMCE system which uses a standard web browser interface to display the Orbiter User Interface. The laptop or PC becomes a virtual remote control when used in this way.&lt;br /&gt;
&lt;br /&gt;
====Media Director Orbiter====&lt;br /&gt;
[[Image:Main-menu.jpg|200px|thumb|Web Orbiter / Main Orbiter Screen (UI1)]]&lt;br /&gt;
All Media Directors run an on-screen Orbiter, like the one to the right. The on-screen Orbiter is controlled by the keyboard/mouse attached to the Media Director, or by a connected infrared, USB, or Bluetooth remote control. The Orbiter software runs on Linux, Windows and Windows CE; also on webpads and PDAs.&lt;br /&gt;
 &lt;br /&gt;
In the lower right corner of the main Orbiter screen are the [[Who Am I, Where Am I|&#039;who&#039;]] and [[Who Am I, Where Am I|&#039;where&#039;]] buttons. This indicates the current user of the Orbiter and which room he or she currently is in (or wishes to control).&lt;br /&gt;
&lt;br /&gt;
You can manually select your desired user and location. Your &amp;quot;location&amp;quot; need not be your actual physical location. For example, even if you were using the on-screen Orbiter for the Media Director in the Living Room, you could change your &amp;quot;location&amp;quot; to the Bedroom. You could then control devices as if you were in the Bedroom. Normally you wouldn&#039;t change the location for a Media Director&#039;s on-screen Orbiter (since that device stays in a fixed location), but you might change locations frequently if you were to use a wireless web pad or PDA.&lt;br /&gt;
[[Image:Litscen.jpg|200px|thumb|Lighting Scenario Page LinuxMCE Admin Website]]&lt;br /&gt;
The icons on the left all lead to [[maps]], or floorplans, of your house. They show the lighting, media, climate, telecom and security [[scenario]] categories for each room. Next to each floorplan icon is listed the scenarios for that category and room. (You create the scenarios for each room in the scenarios section of the [[LinuxMCE Admin Website]].) For example, in the Living Room you could create a lighting scenario called &#039;entertaining guests&#039; that would set the light levels, play some background music, unlock the door, etc.&lt;br /&gt;
&lt;br /&gt;
===Mobile Orbiters===&lt;br /&gt;
&lt;br /&gt;
The mobile orbiter works pretty much like a regular orbiter. The difference is that you don&#039;t usually need to worry about the &amp;quot;who&amp;quot; and &amp;quot;where&amp;quot; buttons. The &amp;quot;who&amp;quot; is determined when you chose to install the software. The family member who installs it is assumed to always be the user. The &amp;quot;where&amp;quot; is automatic - whenever you come within range of a Media Director that can recognize the mobile orbiter, it will automatically select itself as the correct location. (Nevertheless, you are still able to manually select a different location, if you want to control a location other than the one you are in).&lt;br /&gt;
&lt;br /&gt;
Since a mobile phone&#039;s display is smaller, only selected scenarios can be shown. You must choose the scenario category from the main menu, such as &amp;quot;lighting&amp;quot;, and then choose the specific scenario from the sub menu that appears. You can toggle the option for &#039;follow-me&#039; mode, indicated with a red F. If you hold down the 2 button, a red F will appear for media. As you move around the house, your media will follow you. All 5 categories have follow-me.&lt;br /&gt;
&lt;br /&gt;
Unless you have turned off the &amp;quot;Auto Detect new Bluetooth Phones&amp;quot; option on the Media Director, compatible Bluetooth Mobile phones will automatically be detected whenever they are within range of a Media Director. Be sure you have added the family member to whom the phone belongs on the [[LinuxMCE Admin Website]] first.&lt;br /&gt;
&lt;br /&gt;
A message will appear on all Orbiters (you may need to turn on the TV to see the Media Director&#039;s on-screen Orbiter) asking if there is a new mobile phone and, if so, to whom it belongs. If you choose to install the software, the phone will beep. Just hit &#039;yes&#039; to accept the software and accept the default prompts.&lt;br /&gt;
&lt;br /&gt;
=====Telephone-based Orbiter devices=====&lt;br /&gt;
Several mobile phones can be made to work as mobile orbiters.&lt;br /&gt;
&lt;br /&gt;
*[[Cisco 7970]]&lt;br /&gt;
*Symbian Bluetooth phone&lt;br /&gt;
**On the phone go to Menu--&amp;gt;Tools--&amp;gt;Manager.&lt;br /&gt;
**Hit the left button, choose settings, and set &amp;quot;Software installation&amp;quot; to &#039;on&#039;.&lt;br /&gt;
**Set the &amp;quot;online certificate check&amp;quot; to &#039;off&#039;.&lt;br /&gt;
**On the phone: Menu--&amp;gt;Connect--&amp;gt;Bluetooth--&amp;gt;turn Bluetooth on--&amp;gt;make your phone visible (public).&lt;br /&gt;
**Go near a Media Director with a Bluetooth dongle. Within 30 seconds or so you will see a message on any nearby Orbiter that a new phone is detected.  Select the phone&#039;s owner. The software will be sent automatically to the phone as a message in the phone&#039;s inbox.  Accept the default installation options.  The phone will update its own software.&lt;br /&gt;
** If the software gets deleted and you want the Media Director to resend it:&lt;br /&gt;
*** Turn the phone off.&lt;br /&gt;
*** Go to &#039;&#039;&#039;[[LinuxMCE Admin Website]]--&amp;gt;Advanced--&amp;gt;[[Devices]]&#039;&#039;&#039;&lt;br /&gt;
**** Select the Orbiter off the device list on the left hand of screen&lt;br /&gt;
**** Once the device information is loaded in the main section of the device information page, check the box for &amp;quot;Reconfigure Device&amp;quot;.&lt;br /&gt;
*** Turn the phone back on.  The software should be resent.&lt;br /&gt;
* [[Java Mobile Orbiter]]&lt;br /&gt;
&lt;br /&gt;
===Windows Laptops or Windows CE Webpads and PDAs===&lt;br /&gt;
[[Image:Downloadfiles.JPG|frame|right|100px|Download Page for Admin Site]]&lt;br /&gt;
&lt;br /&gt;
*A laptop or a device with a web browser can function as a [[Web Orbiter|Web Orbiter]].&lt;br /&gt;
*Other devices can also be set up to work as an Orbiter on a Windows system by following the setup instructions [[Control LinuxMCE using a Windows device as an Orbiter|here]].&lt;br /&gt;
&lt;br /&gt;
==Orbiter Setup==&lt;br /&gt;
&lt;br /&gt;
===Setting up an Orbiter from the [[LinuxMCE_Admin_Website|LinuxMCE administration screen]]===&lt;br /&gt;
Here you add all the Orbiters you want to use in your house, no matter what type.  This includes the Mobile Orbiters (e.g. mobile phones), the regular Orbiters (e.g. wireless webpads and tablet PCs), Orbiters you want to run on a normal PC, as well as the on-screen Orbiter displays (every Media Director displays an Orbiter on screen).  All Orbiters connected to the system will appear on this page.&lt;br /&gt;
&lt;br /&gt;
*&amp;amp;lt;b&amp;gt;Room&amp;amp;lt;/b&amp;gt;: this is the room where the orbiter is normally kept.  For mobile orbiters this selection isn&#039;t important since you carry them everywhere.  For regular orbiters, the room is choosen by manual selection.&lt;br /&gt;
&lt;br /&gt;
*&amp;amp;lt;b&amp;gt;Leave Monitor on for OSD&amp;amp;lt;/b&amp;gt;:  OSD (On-screen display) refers to an Orbiter that runs on a Media Director and is controlled by the keyboard/mouse, or by an infrared, USB, or Bluetooth remote control connected to the Media Director. When this option is checked, the TV will not shut off when media is finished playing, so that the Orbiter can then be displayed. The TV turns off only when the screen saver starts, or when you select Power--&amp;gt;Turn off display. &lt;br /&gt;
&lt;br /&gt;
::If you always control the Media Director using an Orbiter such as a web pad or mobile phone, leave this option unchecked. In this configuration, the TV will come on only when you&#039;re playing media or watching TV, and will turn off when you&#039;re done.&lt;br /&gt;
&lt;br /&gt;
*&amp;amp;lt;b&amp;gt;This device uses a Wi-Fi connection&amp;amp;lt;/b&amp;gt;: This option is useful for webpads and PDAs with a Wi-Fi signal.  Since Wi-Fi is somewhat unreliable, the Core and Orbiter will constantly &#039;ping&#039; each other to make sure the connection is strong enough. The Orbiter software will exit whenever the Orbiter goes out of range.&lt;br /&gt;
&lt;br /&gt;
*&amp;amp;lt;b&amp;gt;No Effects&amp;amp;lt;/b&amp;gt;: Many screens have special effects, such as animated buttons, fades, and so on.  If the Orbiter has a slow processor, this may slow down response time.  This option will disable any special effects on the Orbiter so it will run as fast as possible.&lt;br /&gt;
&lt;br /&gt;
*&amp;amp;lt;b&amp;gt;Language:&amp;amp;lt;/b&amp;gt; All the text on the screen will appear in the selected language (as much as possible).&lt;br /&gt;
&lt;br /&gt;
::NOTE: You can create your own menus and translate screens into other languages using [[Designer]].&lt;br /&gt;
&lt;br /&gt;
*&amp;amp;lt;b&amp;gt;Size&amp;amp;lt;/b&amp;gt;: Choose the screen size you want.  If this is an on-screen Orbiter on a Media Director, this will also set the Media Director&#039;s screen resolution.&lt;br /&gt;
&lt;br /&gt;
*&amp;amp;lt;b&amp;gt;Skin&amp;amp;lt;/b&amp;gt;: There are several skins (motifs) from which to choose: &#039;Wood&#039;, &#039;Marble&#039;, etc.&lt;br /&gt;
&lt;br /&gt;
*&amp;amp;lt;b&amp;gt;User&amp;amp;lt;/b&amp;gt;: This is the person who normally uses this Orbiter.&lt;br /&gt;
&lt;br /&gt;
*&amp;amp;lt;b&amp;gt;Quick Regen&amp;amp;lt;/b&amp;gt;: To make the orbiters respond quickly, all images are pre-rendered.  The User interface is &amp;quot;built&amp;quot; by the [[Orbiter Generator]] program.  This option triggers the Orbiter Generator to re-generate the user interface for this Orbiter. It will only regenerate screens that appear to have changed.&lt;br /&gt;
&lt;br /&gt;
*&amp;amp;lt;b&amp;gt;Full Regen&amp;amp;lt;/b&amp;gt;: This will cause Orbiter Generator to re-generate every screen on the Orbiter.&lt;br /&gt;
&lt;br /&gt;
*&amp;amp;lt;b&amp;gt;Reduce image size by %&amp;amp;lt;/b&amp;gt;: This will cause Orbiter Generator to add some padding to the screens. This is useful if the screen margins are being displayed outside of the TV screen. &lt;br /&gt;
::&amp;amp;lt;b&amp;gt;Developer info&amp;amp;lt;/b&amp;gt;: although it may sound intuitive that the corresponding DeviceData is also called &amp;quot;Reduce image size by %&amp;quot;, it is in fact called &amp;quot;Spacing&amp;quot;. The PK_DeviceData for it is 150. The text &amp;quot;Reduce image size by %&amp;quot; comes from the DeviceTemplate_DeviceData table and it&#039;s the meaning of the device data in that specific device context&lt;br /&gt;
*&amp;amp;lt;b&amp;gt;Offset&amp;amp;lt;/b&amp;gt;: This causes the Orbiter to do backflips while reciting a poem backwards. (Just kidding. If you know what it does, please edit this section.)&lt;br /&gt;
&lt;br /&gt;
==Change the look and feel of the Orbiter==&lt;br /&gt;
&lt;br /&gt;
On the &#039;&#039;&#039;[[LinuxMCE Admin Website]]--&amp;gt;Wizard--&amp;gt;Devices--&amp;gt;[[Orbiters]]&#039;&#039;&#039; page you can change the look and feel of the Orbiters in several ways.  &lt;br /&gt;
&lt;br /&gt;
*[[Create my own skins or GUI for LinuxMCE|Create your own skin or user interface]]&lt;br /&gt;
&lt;br /&gt;
==Using the Mobile Orbiter==&lt;br /&gt;
===Every Orbiter has a &#039;Rooms&#039; button on the main menu===&lt;br /&gt;
Using LinuxMCE basically consists of selecting scenarios that you have previously created in the LinuxMCE Admin Website.  For example, you may select the &#039;Good Morning&#039; Lighting Scenario.  If you want to watch TV, you will select the &#039;TV&#039; scenario for that room.  Since the scenarios are grouped by room, the Orbiter needs to know what room you are in. The on-screen Orbiter that runs on a Media Director will always default to the room in which it is located.  You can manually specify the default room for other Orbiters, like webpads, on the Orbiters page in the LinuxMCE Admin Website.  By default, mobile phone Orbiters &#039;follow you&#039;: whenever you enter a room with a Media Director that has a Bluetooth dongle, your phone will detect it and will switch to that room, showing you that room&#039;s scenarios.  However, no matter what type of Orbiter you use, there will always be a &#039;rooms&#039; button on the main menu showing the room, which can always be changed.&lt;br /&gt;
&lt;br /&gt;
===Every Orbiter has a &#039;User&#039; button on the main menu, except mobile phones===&lt;br /&gt;
With a mobile phone Orbiter, you don&#039;t need to tell LinuxMCE who is using the Orbiter.  The owner of the mobile phone is initially specified on the LinuxMCE Admin Website&#039;s Orbiter page and does not change. But with other Orbiters, which may be shared by the whole family, there will be a &#039;user&#039; button that lets you select who is currently using the Orbiter.  This won&#039;t affect the [[scenarios]] -- those are the same for everyone.  But it does affect some other things.  For example, when browsing media, only the current user&#039;s private media is shown.  Also, other things like speed dials, phone books, and so on, can be affected.&lt;br /&gt;
&lt;br /&gt;
===Selecting a scenario from the phone&#039;s main menu===&lt;br /&gt;
On the mobile phones, the screen is quite small, so rather than showing you all the scenarios for a room, the phone normally just shows the categories of scenarios: &#039;Lighting&#039;, &#039;Media&#039;, &#039;Climate&#039;, &#039;Security&#039;, &#039;Telecom&#039;, &#039;Other&#039;. Select a category, then select the scenario underneath it. The &#039;c&#039; button always takes you back to the main menu. The red &#039;off&#039; button stops whatever media is playing. And the &#039;menu&#039; button hides Orbiter so you can use the phone as a normal phone again. To show the Orbiter again, hold the menu button until a strip of currently &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.thepiggybackrider.com/ &amp;lt;span style=&amp;quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&amp;quot;&amp;gt;kid carrier&amp;lt;/span&amp;gt;]&amp;lt;/span&amp;gt; running programs appears, and chose &#039;LinuxMCE MO&#039;. If the Orbiter isn&#039;t running, press the menu button and choose &#039;LinuxMCE MO&#039; from the menu. When you do, the Orbiter won&#039;t appear instantly --- it will only appear when a Media Director is in proximity and is able to connect to the phone and talk to the LinuxMCE MO software. This can take around 15 seconds. While using the Orbiter, all the other keys have different functions, depending on what you&#039;re doing. A brief legend is usually shown on the screen and you can hold down the &#039;c&#039; button for help.&lt;br /&gt;
&lt;br /&gt;
===Selecting a scenario from another Orbiter&#039;s main menu with touch or mouse===&lt;br /&gt;
From the &#039;&#039;&#039;[[LinuxMCE Admin Website]]--&amp;gt;Wizard--&amp;gt;Devices--&amp;gt;[[Orbiters]]&#039;&#039;&#039; page, you can select a &#039;Skin&#039;. This is the aesthetics (or motif): Wood, Marble, Modern, Classic, etc. You can also select the &#039;Main Menu&#039;, which determines how the user interface behaves.&lt;br /&gt;
&lt;br /&gt;
If you change the &#039;Main Menu&#039; interface, your Orbiter may look different from other Orbiters, and it may not display all the scenarios on the screen at the same time.  In this case you may first have to choose a category, like you do with the mobile phones.&lt;br /&gt;
&lt;br /&gt;
===Selecting a scenario with a keyboard&#039;s arrow keys, or an infrared remote===&lt;br /&gt;
When you use an on-screen Orbiter on a Media Director, you can either use the number keys or the up/down/left/right/enter keys on the keyboard (or an infrared remote control) to select a scenario.&lt;br /&gt;
&lt;br /&gt;
===Quick tip===&lt;br /&gt;
No matter what the user interface looks like, and no matter whether you use the phone, keyboard, or infrared remote, the categories are always numbered as follows:&lt;br /&gt;
*1=Lighting&lt;br /&gt;
*2=Media&lt;br /&gt;
*3=Climate&lt;br /&gt;
*4=Telecom&lt;br /&gt;
*5=Security&lt;br /&gt;
*6=Misc&lt;br /&gt;
 &lt;br /&gt;
Within each category, the scenarios are numbered the same, and in the same order, for all Orbiters. For example, the 2nd media scenario is nearly always TV.  Whether from a mobile phone, or using an infrared remote or keyboard for an on-screen Orbiter, 22 turns on the TV (2 for Media, 2 for TV).  Also, when creating lighting scenarios, LinuxMCE encourages you to make the first lighting scenario the &#039;default on&#039; and the second the &#039;default off&#039;.  In any room you can normally can hit 11 on any remote to turn the lights on, and 12 to turn them off. If you are consistent in setting up all rooms like this, you will find that you remember the number shortcuts quickly.&lt;br /&gt;
&lt;br /&gt;
==System concepts for Orbiter Implementation==&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a simplified [[UML]] for Orbiter (pocketfrog implementation).&lt;br /&gt;
&lt;br /&gt;
[[Integrating custom controls in Orbiter]]&lt;br /&gt;
&lt;br /&gt;
[[Orbiter refactoring - the new design]]&lt;br /&gt;
&lt;br /&gt;
Devel notes:&lt;br /&gt;
&lt;br /&gt;
* [[SDL&#039;s TextWrapper and TextSplitter]]&lt;br /&gt;
* [[OpenGL implementation]]&lt;br /&gt;
* [[Building Orbiter for the Nokia 770]]&lt;br /&gt;
* [[Building Orbiter for the Nokia 800]]&lt;br /&gt;
* [[Computing screen]]&lt;br /&gt;
* [[FileSave screen]]&lt;br /&gt;
* [[Child devices]]&lt;/div&gt;</summary>
		<author><name>AHagerty93</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Generic_Serial_Device&amp;diff=28675</id>
		<title>Generic Serial Device</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Generic_Serial_Device&amp;diff=28675"/>
		<updated>2011-09-27T08:08:53Z</updated>

		<summary type="html">&lt;p&gt;AHagerty93: None&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
  | __TOC__&lt;br /&gt;
  |}&lt;br /&gt;
Generic_Serial_Device (also known as &#039;&#039;&#039;GSD&#039;&#039;&#039;) is a LinuxMCE device that allows end-user to do simple programming for RS232, serial USB (See [[Serial Hack]] for details on getting USB to serial adapters identified properly in the admin panel!) or network connected devices.&lt;br /&gt;
:Note : The information is not quite complete because I&#039;m not the original author.&lt;br /&gt;
&lt;br /&gt;
== Short description ==&lt;br /&gt;
It&#039;s a standard DCE device, it only can execute commands and send events .&lt;br /&gt;
The main idea is instead of programming a device in C++, compile, link with proper libraries you can edit (in a webpage) few lines of code in ruby which will be executed when device receives that command. It exports several objects into ruby so you&#039;ll have access to devicedata, device hierarchy, established connection and so on.&lt;br /&gt;
&lt;br /&gt;
The ruby code for each device template is stored somewhere in &#039;&#039;InfraredGroup_Command&#039;&#039; table. To edit the code go to Wizard&amp;gt; Devices &amp;gt; Generic_Serial_Devices on [[LinuxMCE-admin]] website. You have to add a device from a device template in order to see anything in that page.&lt;br /&gt;
&lt;br /&gt;
Select the device, and click &amp;quot;RubyCodes&amp;quot; button to be able to edit code that will be executed. &lt;br /&gt;
You should be able to see commands that are specified in device template (like ON/OFF/WhateverElse) and a group of &#039;&#039;Internal Commands&#039;&#039; which are used to perform certain actions are to add helper functions.&lt;br /&gt;
&lt;br /&gt;
If the command you are trying to add doesn&#039;t show on first page, go to &#039;&#039;Add/Remove commands&#039;&#039; and add more commands for your device.&lt;br /&gt;
&lt;br /&gt;
=== Ruby source code ===&lt;br /&gt;
&lt;br /&gt;
There are 2 forms of ruby code you can write :&lt;br /&gt;
* standard ruby code (check [http://www.ruby-lang.org/en/] and [http://poignantguide.net/ruby/] for syntax, references and programming guides)&lt;br /&gt;
* short form for &#039;&#039;&#039;conn_.Send&#039;&#039;&#039;&lt;br /&gt;
 &amp;amp;lt;$&amp;quot;PWON\r&amp;quot;$&amp;gt;&lt;br /&gt;
:which simply will send the string &#039;&#039;&amp;quot;PWON\r&amp;quot;&#039;&#039; to device.&lt;br /&gt;
&lt;br /&gt;
You&#039;ll have to quick reload router to get new code. Restarting GSD only will keep old code because the code is supplied by [[Infrared_Plugin]] which caches pluto_main and won&#039;t update it&#039;s cache without full restart of [[DCERouter]]. With this code it creates a ruby source which will be interpreted by embedded ruby.&lt;br /&gt;
&lt;br /&gt;
It will create methods called &amp;quot;cmd_CmdIDx&amp;quot; for each command(x) defined in web interface except &#039;&#039;Private_Method_Listing&#039;&#039; which will be inserted in the body of the class directly without wrapping.&lt;br /&gt;
&lt;br /&gt;
The source usually looks like (&#039;&#039;DevID&#039;&#039; is iPK_Device of specific device, &#039;&#039;CmdIDx&#039;&#039; is iPK_Command ) :&lt;br /&gt;
&lt;br /&gt;
 require &#039;Ruby_Generic_Serial_Device&#039;&lt;br /&gt;
 class Command &amp;amp;lt; Ruby_Generic_Serial_Device::RubyCommandWrapper&lt;br /&gt;
 end&lt;br /&gt;
 class Device_DevID &amp;amp;lt; Ruby_Generic_Serial_Device::RubySerialWrapper&lt;br /&gt;
 def cmd_CmdID1(paramlist)&lt;br /&gt;
     @returnParamArray.clear&lt;br /&gt;
     ### WEB CODE for CmdID1 GOES HERE ###&lt;br /&gt;
     return @returnParamArray&lt;br /&gt;
 end&lt;br /&gt;
 def cmd_CmdID2(paramlist)&lt;br /&gt;
     @returnParamArray.clear&lt;br /&gt;
     ### WEB CODE for CmdID2 GOES HERE ###&lt;br /&gt;
     return @returnParamArray&lt;br /&gt;
 end&lt;br /&gt;
 ...&lt;br /&gt;
 def cmd_ReceiveCommandForChild(cmd)&lt;br /&gt;
     ### Process_Receive Command_For_Child GOES HERE ###&lt;br /&gt;
 end&lt;br /&gt;
 ...&lt;br /&gt;
 ### Private_Method_Listing GOES HERE ###&lt;br /&gt;
 ...&lt;br /&gt;
 def initialize()&lt;br /&gt;
     super&lt;br /&gt;
     @returnParamArray=Array.new&lt;br /&gt;
 end&lt;br /&gt;
 ### Generated Setters/Getters goes here (may be empty, but usually looks like below) ###&lt;br /&gt;
 def data_set(value)&lt;br /&gt;
     @returnParamArray[19]=value&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
There might be more then one class definition in that source. This may happen when child device is itself a GSD device.&lt;br /&gt;
&lt;br /&gt;
=== Command details ===&lt;br /&gt;
When the command from DCE arrives it is routed to specific device and &#039;&#039;cmd_XXX&#039;&#039; is run. The commands are run one by one, meaning that you cannot run 2 commands simultaneously. This limitation is implied by embedded ruby interpretor which fails if run from multiple threads.&lt;br /&gt;
DCE commands may have return parameters (well known GetVideoFrame), as ruby can return only 1 parameter the &#039;&#039;@returnParamArray&#039;&#039; &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.thepiggybackrider.com/ &amp;lt;span style=&amp;quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&amp;quot;&amp;gt;child carrier&amp;lt;/span&amp;gt;]&amp;lt;/span&amp;gt; was added. You can see that in each method we insert &#039;&#039;&#039;@returnParamArray.clear&#039;&#039;&#039; then the real code and then &#039;&#039;&#039;return @returnParamArray&#039;&#039;&#039;. Also some setters are generated (like the one from above) for code readability.&lt;br /&gt;
&lt;br /&gt;
Beside usual DCE command you&#039;ll see some &#039;&#039;Internal Commands&#039;&#039;. Here goes a small list and what they do:&lt;br /&gt;
* &#039;&#039;&#039;Private Method Listing&#039;&#039;&#039; - used to insert all kind of helpers&lt;br /&gt;
* &#039;&#039;&#039;Process IDLE&#039;&#039;&#039; - method executed once in a while (may be used to keep connection alive, scan for new devices on serial bus)&lt;br /&gt;
* &#039;&#039;&#039;Process Incoming Data&#039;&#039;&#039; - called when some data is available &lt;br /&gt;
* &#039;&#039;&#039;Process Receive Command For Child&#039;&#039;&#039; - called if the device has children and those are pretty dummy (like Lights under CM11), so practically the parent will do the job. As a parameter you have &#039;&#039;cmd&#039;&#039; which is a wrapper for DCEMessage, so you&#039;ll have access to deviceId, senderId, commandID and so on.&lt;br /&gt;
* &#039;&#039;&#039;Process Initialize&#039;&#039;&#039; - called when device is starting (to perform handshake with device or some other initialisation required by protocol)&lt;br /&gt;
* &#039;&#039;&#039;Process Release&#039;&#039;&#039; - to close gracefully connection with device (say &amp;quot;good bye&amp;quot; or something)&lt;br /&gt;
&lt;br /&gt;
== Implementation notes ==&lt;br /&gt;
There are several classes that actually need to be touched. Most of the other classes are just for wrapping DCE objects (like Device, Message, Connection and so on) and exporting them into ruby.&lt;br /&gt;
&lt;br /&gt;
Most important classes :&lt;br /&gt;
* &#039;&#039;&#039;RubyDCEDeviceNode&#039;&#039;&#039; is actually the Device, responsable with initialisation and partially a message handler.&lt;br /&gt;
* &#039;&#039;&#039;RubyDCEEmbededClass&#039;&#039;&#039; is bridge between DeviceNode and ruby, it has &#039;&#039;CallCmdHandler&#039;&#039; which does the real call to ruby and sends back result.&lt;br /&gt;
* &#039;&#039;&#039;RubyIOManager&#039;&#039;&#039; is the one responsible for instantiating RubyDCEDeviceNodes, code retrieval, command handler and serializing ruby calls.&lt;br /&gt;
* &#039;&#039;&#039;RubyDCECodeSupplier&#039;&#039;&#039; gives you the ruby code&lt;br /&gt;
* &#039;&#039;&#039;RubyCommandWrapper&#039;&#039;&#039; a wrapper for Message&lt;br /&gt;
* &#039;&#039;&#039;GSDMessageProcessing&#039;&#039;&#039; is [[Message_Translation|message translator]] which will try to run command if it&#039;s implemented without translation.&lt;br /&gt;
* &#039;&#039;&#039;RubySerialIOConnectionWrapper&#039;&#039;&#039; helps to wrap Serial and TCP/IP based connection under same interface, see down the hierarchy the connection you need.&lt;br /&gt;
&lt;br /&gt;
There are also some files needed for building a library for ruby with SWIG, let them alone, it should work.&lt;br /&gt;
&lt;br /&gt;
The compilation will give you &#039;&#039;&#039;Generic_Serial_Device&#039;&#039;&#039; and &#039;&#039;&#039;Ruby_Generic_Serial_Device.so&#039;&#039;&#039;, first file is the binary itself, second file is the bridge library and it will be included by ruby (the request for it is in the first line of the generated source)&lt;br /&gt;
&lt;br /&gt;
== Known issues ==&lt;br /&gt;
&lt;br /&gt;
* Only &#039;&#039;&#039;ONE&#039;&#039;&#039; command can be executed at a time. This is a limitation of embedded ruby, which should be run from one thread only.&lt;br /&gt;
* If command expected an answer, it would wait about 20 seconds for the ruby command to complete, and if the command haven&#039;t completed yet, it would send an empty response.&lt;br /&gt;
* Most of the data are pretty cryptic (like &#039;&#039;device_.devdata_[114]&#039;&#039;), you have to look that that number represents (device data id, command id, command parameter id, event id, event parameter id, some other id)&lt;br /&gt;
&lt;br /&gt;
== Short example ==&lt;br /&gt;
For more details about exported classes and available methods check [[GSD_Ruby_Interface]]&lt;br /&gt;
&lt;br /&gt;
Here is a short example from &#039;&#039;Panasonic IP Camera&#039;&#039;:&lt;br /&gt;
   0:require &#039;Ruby_Generic_Serial_Device&#039;&lt;br /&gt;
   1:class Command &amp;amp;lt; Ruby_Generic_Serial_Device::RubyCommandWrapper&lt;br /&gt;
   2:end&lt;br /&gt;
   3:class Device_47 &amp;amp;lt; Ruby_Generic_Serial_Device::RubySerialWrapper&lt;br /&gt;
   4:#### 84 ####################################################################&lt;br /&gt;
   5:def cmd_84(data, format, disable_aspect_lock, streamid, width, height)&lt;br /&gt;
   6:@returnParamArray.clear&lt;br /&gt;
   7:conn_.Reconnect()&lt;br /&gt;
   8:auth_s=device_.devdata_[114]+&amp;quot;:&amp;quot;+device_.devdata_[115]&lt;br /&gt;
   9:auth_a=Array.new;&lt;br /&gt;
  10:auth_s.each{|c| auth_a.push(c)}&lt;br /&gt;
  11:&lt;br /&gt;
  12:fix_path=device_.devdata_[2];&lt;br /&gt;
  13:fix_path=&#039;/&#039;+fix_path if fix_path[0]!=&#039;/&#039;[0];&lt;br /&gt;
  14:&lt;br /&gt;
  15:s = &amp;quot;GET &amp;quot;+fix_path+&amp;quot; HTTP/1.0\r\n&amp;quot;&lt;br /&gt;
  16:s+= &amp;quot;Accept: */*\r\n&amp;quot;&lt;br /&gt;
  17:s+= &amp;quot;Authorization: Basic &amp;quot;+auth_a.pack(&amp;quot;m&amp;quot;).chop+&amp;quot;\r\n&amp;quot;&lt;br /&gt;
  18:s+= &amp;quot;\r\n&amp;quot;&lt;br /&gt;
  19:&lt;br /&gt;
  20:conn_.Send(s)&lt;br /&gt;
  21:recv=&amp;quot;&amp;quot;&lt;br /&gt;
  22:loop {&lt;br /&gt;
  23:  buff=conn_.Recv(16384, 5000)&lt;br /&gt;
  24:  if buff.empty?&lt;br /&gt;
  25:    break&lt;br /&gt;
  26:  end&lt;br /&gt;
  27:  recv += buff&lt;br /&gt;
  28:}&lt;br /&gt;
  29:if recv=~ /^HTTP[^\r\n]+200\sOK.+?\r\n\r\n(.+)$/m&lt;br /&gt;
  30:  data_set($1)&lt;br /&gt;
  31:  format_set(&#039;jpg&#039;)&lt;br /&gt;
  32:end&lt;br /&gt;
  33:return @returnParamArray&lt;br /&gt;
  34:end&lt;br /&gt;
 ...&lt;br /&gt;
 194:#### START SETTERS ####################################################################&lt;br /&gt;
 195:def initialize()&lt;br /&gt;
 196:super&lt;br /&gt;
 197:@returnParamArray=Array.new&lt;br /&gt;
 198:end&lt;br /&gt;
 199:def data_set(value)&lt;br /&gt;
 200:@returnParamArray[19]=value&lt;br /&gt;
 201:end&lt;br /&gt;
 202:def format_set(value)&lt;br /&gt;
 203:@returnParamArray[20]=value&lt;br /&gt;
 204:end&lt;br /&gt;
 205:####  END  SETTERS ####################################################################&lt;br /&gt;
 206:end&lt;br /&gt;
You can see how command 84 (GetVideoFrame) is implemented:&lt;br /&gt;
* it has 6 parameters &#039;&#039;cmd_84(data, format, disable_aspect_lock, streamid, width, height)&#039;&#039;, parameters &#039;&#039;data&#039;&#039; and &#039;&#039;format&#039;&#039; are also output parameters&lt;br /&gt;
* to set output parameters methods like &#039;&#039;data_set&#039;&#039; and &#039;&#039;format_set&#039;&#039; are automatically generated&lt;br /&gt;
* &#039;&#039;device_.devdata_[114]&#039;&#039;, &#039;&#039;device_.devdata_[115]&#039;&#039; are the username and password to login into camera &lt;br /&gt;
* then it creates HTTP header with basic authorization&lt;br /&gt;
* &#039;&#039;device_.devdata_[2]&#039;&#039; is the path to the snapshot (it is configurable because it can change between models)&lt;br /&gt;
* it sends the request and waits for the answer&lt;br /&gt;
* reads the answer, regexp parse it and gets JPEG content&lt;br /&gt;
* sets output parameters&lt;br /&gt;
* returns @returnParamArray (the return statement is added automatically)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example - Adding Clipsal Interface ==&lt;br /&gt;
&lt;br /&gt;
We can control lights, curtains and climate controls using Clipsal Interface that connects through Serial Port.&lt;br /&gt;
&lt;br /&gt;
[[Here is a detailed example of how to add Clipsal Interface using Generic Serial Device.|Adding Clipsal Interface using Generic Serial Device]]&lt;br /&gt;
&lt;br /&gt;
== Useful Pages ==&lt;br /&gt;
* [[Serial Hack]] - A quick and dirty hack to fix the USB to Serial adapter problem! (Device not showing the correct block device on the admin panel)&lt;br /&gt;
* [[How to add your own GSD device]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Programmer&#039;s Guide]]&lt;/div&gt;</summary>
		<author><name>AHagerty93</name></author>
	</entry>
</feed>