<?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=AVJohn</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=AVJohn"/>
	<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php/Special:Contributions/AVJohn"/>
	<updated>2026-07-21T23:33:12Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=DCERouter_Programmer%27s_Guide&amp;diff=9915</id>
		<title>DCERouter Programmer&#039;s Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=DCERouter_Programmer%27s_Guide&amp;diff=9915"/>
		<updated>2008-04-12T10:08:29Z</updated>

		<summary type="html">&lt;p&gt;AVJohn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Programmer&#039;s Guide]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Developers Guide]] is the most recent information regarding architecure and getting started with development.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;DCE Router is actually a very simple program, and consists of only 1 class: DCERouter.  This class reads in the configuration for the installation from the [[pluto_main database]] to open a socket for incoming connections.  When devices connect to it, DCE Router gives them a copy of their own configuration data, as well as a list of all the other devices in the installation.  Before accepting incoming connections, it first loads all the plug-ins into it&#039;s own name space.  If your device is loaded as a Plug-in, rather than the main() function being called, the Register() function will be called, and you will be passed a pointer to the DCERouter class.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You use the pointer to the DCERouter class to do primarily 2 things:  First, you can [[Message Interceptors]].  This means that you want your plug-in to get any messages that meet a certain criteria before they are forwarded to the actual destination.  You also can get a list of the other loaded plug-ins, and pointers to their primary class, derived from Command_Impl (for command implementation).  In this way plug-ins can call each other&#039;s member functions directly and implement their own plug-in architecture.  For example, the **Datagrid plug-in** receives any messages related to generating data-grids.  Orbiters generate data-grid requests when they want to display data-grids with dynamic information, such as a list of devices, or what TV shows are playing.  The Datagrid Plug-in exposes its own plug-in architecture allowing other plug-ins to **register with it** to handle certain types of data-grids.  The Datagrid plug-in is, therefore, a general purpose &amp;quot;router&amp;quot; like DCERouter is, and it hands off all data-grid processing to another plug-in that actually generates the data-grids.  This way the building of the data-grids is logically handled in the appropriate plug-in.  The Plug-in that is responsible for TV viewing will be the one that registers with the Datagrid Plug-in to build tv-related data grids.  The Media Plug-in also implements its own plug-in architecture for media devices.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To run DCERouter, you only need to be sure it has the database connection parameters so it has access to the [[pluto_main database]] or in the **pluto.conf** file.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>AVJohn</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Talk:Serial_Hack&amp;diff=6738</id>
		<title>Talk:Serial Hack</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Talk:Serial_Hack&amp;diff=6738"/>
		<updated>2007-10-19T21:41:19Z</updated>

		<summary type="html">&lt;p&gt;AVJohn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When you figure out a better way, edit the article.  Until then this is just discussion.  [[User:Trout|Trout]] 08:06, 21 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
:When you have something usefull to add for a change, edit the article. Otherwise, quit pestering the people that do --[[User:Zaerc|Zaerc]] 12:59, 21 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
I am at a loss to understand this battle. The original commit was another way to accomplish the same thing.  There are a lot pages on this site that have very similar issues.  What is the harm in giving people more than one option even if that option is one in the same.  If nothing else it offers all of us an opportunity to learn something different.  The second option (perl) is another example.  Personally I feel both should be left on the page and just remove the editorial commitments as these are truly the things that belong in discussions.  &lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Wikipedia:Talk_page_guidelines#Good_practice  Good Wiki Practices]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Wikipedia:Talk_page_guidelines#Behavior_that_is_unacceptable  Behavior that is unacceptable]&lt;br /&gt;
--[[User:Rwilson131|Rwilson131]] 09:27, 23 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure AVJohn is very happy with you pissing all over his page just to prove a point Trout.  And how nice of you to make it personal.  So thanks for the lessons on properly maintaining a wiki, you&#039;re a real champ.  --[[User:Zaerc|Zaerc]] 02:50, 24 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
:Keep the articles clean and use the discussion-pages for...ahh, discussions! And when you reply, please indent, it&#039;s so much easier to follow a discussion that way. --[[User:Samme|Samme]] 02:58, 24 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
:Zaerc, you keep making it more clear that you don&#039;t understand how a wiki works.  First of all, I tried to be nice by just moving the discussion piece of the page to the discussion area.  This was not acceptable to you, and you moved it back with a nasty comment.  I tried again with the same result, and a worse comment from you.  So, IMO you are the one who made it personal.  Second, when you sait &amp;quot;... all over &amp;lt;strong&amp;gt;his&amp;lt;/strong&amp;gt; page&amp;quot;, you are completely wrong about page ownership.  The page belongs to the wiki and it&#039;s not personally AVJohns, this misunderstanding of yours is exactly what caused you to be upset to see &amp;quot;your text&amp;quot; moved to the discussion page.  Having the discussion moved to it&#039;s correct place is not something to take personally.  BTW: you&#039;re welcome for the wiki lessons.  [[User:Trout|Trout]] 04:50, 24 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
::So I&#039;m the one putting a personal rant aimed at you on that page?  Have some respect for the people who actually contribute, because it seems more like all the pages here belong to you. --[[User:Zaerc|Zaerc]] 07:40, 24 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
:::Yes, this is an insult to me &amp;quot;please don&#039;t edit pages unless you actually have something to add&amp;quot;.  I feel that I am adding clarity when I move your comments to the discussion page.  You are personally attacking me when you imply I am not adding anything.  &amp;quot;go find something usefull to do, instead of pestering people that actually add information&amp;quot;  Again another insult, implying that I have nothing better to do than mess with your addition for no purpose.  Also discounting my contributions as though they are somehow less important than yours.  I don&#039;t think that all the pages belong to me and I have stated so.  I am sorry if you perceived that, it was not my intent.  &lt;br /&gt;
:::I really think that the page is better served without different options of editing a file.  The page is about detecting serial ports, not how to create a text file.  It should be enough to say &amp;quot;create a file like this ...&amp;quot;  IMO this would serve the users best.  [[User:Trout|Trout]] 09:07, 24 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;&#039;Hey hey hey!&#039;&#039;&#039; No you have to stop, both of you, we&#039;re in this together, work with each other, not against each other, now we end this discussion and continue the work with the wiki - &#039;&#039;&#039;and&#039;&#039;&#039; from now on discussions goes on to the pages that are designated for discussions so we can stick to the facts in the articles. Do we have a agreement? --[[User:Samme|Samme]] 09:49, 24 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
:::Samme, Of course I&#039;m in agreement, this was my point from the beginning. [[User:Trout|Trout]] 10:57, 24 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
::::You guys make me sick with all your hypocritical bullshit.  And then that pathetic excuse that this is to &amp;quot;serve&amp;quot; the users, seems pretty obvious this is &#039;&#039;&#039;not&#039;&#039;&#039; done in &#039;&#039;their&#039;&#039; best interest.  But I guess coming forward to say what it is really about would actually take a pair. --[[User:Zaerc|Zaerc]] 11:56, 25 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
Hi, i took the liberty to add a new page to the wiki [[Editing_Text]] where I put the tricks the two of you offered.&lt;br /&gt;
&lt;br /&gt;
And I linked to the new page from the appropriate passage within the article...&lt;br /&gt;
&lt;br /&gt;
I hope, this will end the fight... And I hope I will read a lot from both of you on this wiki in the future.&lt;br /&gt;
&lt;br /&gt;
Best Regards, [[User:Chewi|Chewi]]&lt;br /&gt;
&lt;br /&gt;
== Comment about better solutions by AVJohn ==&lt;br /&gt;
&lt;br /&gt;
I would suggest, that we leave the comment about finding better versions in there.&lt;br /&gt;
The reason is that the article describes a hack and AVJohn says in his article that the new script is inferior to the original script.&lt;br /&gt;
So the request for other/better solutions is an important notice to&lt;br /&gt;
&lt;br /&gt;
A) let people know it is only a hack&lt;br /&gt;
&lt;br /&gt;
B) remind others that have acomplished it a different way to add their version&lt;br /&gt;
&lt;br /&gt;
C) make other Developers make a &amp;quot;more undirty&amp;quot; workaround&lt;br /&gt;
&lt;br /&gt;
D) remind actual LMCE-Developers (no offence to AVJohn) to provide an improvement/update that makes the hack unnessasary.&lt;br /&gt;
&lt;br /&gt;
So I endorse to go back to the previous version for those reasons. Feel free to add your oppinions.&lt;br /&gt;
&lt;br /&gt;
Best regards, --[[User:Chewi|Chewi]] 07:00, 27 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The discussion belongs here IMO.  Otherwise it grows out of control into a forum.  Not that there&#039;s anything wrong with the discussion, but it just doesn&#039;t belong on the main page.  Think about it from the point of view of someone who just wants to know the best way right now.  They don&#039;t want to wade through a lot of discussion text to get the answer.&lt;br /&gt;
&lt;br /&gt;
A) they should know it&#039;s a hack by the title&lt;br /&gt;
B) someone who&#039;s already accomplished it probably either 1) wants to edit the wiki with their knowledge 2) is just checking out how wiki recommends it.  The mere fact that it&#039;s a wiki is enough encouragement IMO.&lt;br /&gt;
C) okay, but they don&#039;t want to wade through a pile of blogs to see the best result.  They only would want to see the best result (the wiki page) and compare it to what they have in mind.&lt;br /&gt;
D) same as C)&lt;br /&gt;
[[User:Trout|Trout]] 07:43, 27 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;(Never said anything on the main-page ???)&#039;&#039; Basically, you&#039;re right with all of your points. But I still think that the extra-encouragement here would be a good thing, as a wiki-page without a comments-section feels like a final statement and feels like allowing editing only by &amp;quot;the inner circle&amp;quot;, which is not the case here. This needs the extra-input. This is at least how I feel about wikis. Therefore, I stay with my recommendation. Regards--[[User:Chewi|Chewi]] 08:06, 27 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
::&#039;&#039;(I never said anything about main-page either.)&#039;&#039;  I said &amp;quot;main page&amp;quot; e.g.  There is a main page for every article (the link is labeled &#039;article&#039;) and there is a discussion for every article.  That&#039;s what I was referring to.  I will try to use &#039;article&#039; now.  You can have your opinion about &amp;quot;the inner circle&amp;quot; concept, but I don&#039;t feel that way.  Also I believe that others know how to use a wiki and that the expectation is user participation.  Also, you havn&#039;t said anything about the mess it&#039;ll make or how to prevent a flame war on the article instead of where it belongs (the discussion) [[User:Trout|Trout]] 08:23, 27 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
:::Ok, that must have been a missunderstanding. Of course I think that discussions about the article itself belong here, just as we are having it now. And I don&#039;t want to move that part to the main page. Just for short annotations an area on the mail-article-page ;) is what I prefer. And an area for comments and annotations that does not serve as a forum or discussion-replacement, does not support flame wars. Those can happen everywhere, but I don&#039;t see why they should happen here in particular.&lt;br /&gt;
&lt;br /&gt;
:::I&#039;m still not convinced, but it is not up to me. Let&#039;s see, if there are additional oppinions on this. Until then, lets leave it as it is right now, without comments. Best regards --[[User:Chewi|Chewi]] 09:48, 27 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
== does this fix the &amp;quot;serial hack&amp;quot; ? ==&lt;br /&gt;
&lt;br /&gt;
does this fix the &amp;quot;serial hack&amp;quot; ? [[Blocking Access To Serial Port]] [[User:Trout|Trout]] 12:21, 28 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
== Trout: Please stop vandalizing this page ==&lt;br /&gt;
&lt;br /&gt;
Somebody cleaned up the mess you made and now you have to spit in his face by continuing to vandalize the page.  Your arguments of percieved problems are insignificant and irrelevant.  I don&#039;t think this is apropriate behavior for a &amp;quot;wiki admin&amp;quot;. Please join in on the forum discussion if you feel this is so important. [http://forum.linuxmce.org/index.php?topic=2593.15]. --[[User:Zaerc|Zaerc]] 04:42, 30 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
What specifically are you talking about? I think you are sadly confused.  [[User:Trout|Trout]] 10:03, 30 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
:I think that becomes pretty clear in the discussion we are having on the forum.  You can also check the page history if you have such a short memory.  Meanwhile, please don&#039;t edit my comments either. --[[User:Zaerc|Zaerc]] 12:11, 30 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
And yet you continue to chose vandalism over debate by even removing comments here.  Please stop it. --[[User:Zaerc|Zaerc]] 16:31, 30 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
You want debate?  I have not &#039;&#039;&#039;vandalized&#039;&#039;&#039; anything.  Yet you try to put false comments on the page to make yourself feel superior.  The only thing that is clear is that you have a lot of growing up to do.  There is no reason for this section on the discussion page or anywhere else,  This is more of a discussion between you and me, that doesn&#039;t concern anyone else here.  If you have a problem with me, I don&#039;t really care.  I tried numerous times to be kind to you, to no avail.  This is a wiki and the content will change whether you like it or not.  When you contribute, it becomes the Wiki&#039;s text, and doesn&#039;t belong to you anymore.  The same is true for me and everybody else... and yet you cannot grasp that simple concept.  So I recommend that you either contribute in a wiki-community way or not at all.  I have nothing against you and I wish you&#039;d accept that your text will change and continue to contribute in spite of it.  I&#039;m done having a flame war with you, and I will remove this section of the discussion page soon.  [[User:Trout|Trout]] 18:30, 30 September 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
:Announcing your vandalism is not going to help either, so why don&#039;t you &#039;&#039;grow up&#039;&#039; and join the rest of the community in discussing this. That you don&#039;t care for anyone&#039;s opinion but your own needs no further pointing out. --[[User:Zaerc|Zaerc]] 04:10, 1 October 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
::Come on guys, I think we all need to turn the intensity down a notch or two on this one. This has obviously become quite personal. Perhaps the agrieved parties should take a breather from this article for a few days? [[User:Lozzo|Lozzo]] 07:33, 1 October 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
:::I think we already had a breather, with continued vandalism as the result.  Please join the rest of the community in discussing these new policies on the forum or stop &amp;quot;enforcing&amp;quot; them.  This wiki belongs to the community and not to a few (new) &amp;quot;wiki admins&amp;quot; to do as they please and then make up new policy as they go to justify that.  --[[User:Zaerc|Zaerc]] 08:57, 1 October 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
:Somehow you seem to think that there is kindness in your vandalism, and now you would like me to spell it out for you.  Okay here we go, this is an [http://wiki.linuxmce.org/index.php?title=Serial_Hack&amp;amp;oldid=5536#Comments addition],  now this is vandalism [http://wiki.linuxmce.org/index.php?title=Serial_Hack&amp;amp;oldid=5539#Comments count 1],  [http://wiki.linuxmce.org/index.php?title=Serial_Hack&amp;amp;oldid=5566#Comments count 2] and [http://wiki.linuxmce.org/index.php?title=Serial_Hack&amp;amp;oldid=5592#Comments count 3] leading up to the defacement of the page which seems also to be considered vandalism, so that&#039;s [http://wiki.linuxmce.org/index.php?title=Serial_Hack&amp;amp;oldid=5606 count 4] (I just wish you would stop being so &amp;quot;nice&amp;quot; to me).  Then [[User:Chewi|Chewi]] steps in to intermediate and [http://wiki.linuxmce.org/index.php?title=Serial_Hack&amp;amp;oldid=5833 restores] the page and there you go again, vandalism [http://wiki.linuxmce.org/index.php?title=Serial_Hack&amp;amp;oldid=5838 count 5].  Sparking another debate on the talk page &#039;&#039;afterwards&#039;&#039; in which [[User:Chewi|Chewi]], another contributor, somehow has to convince you again not to take things of the page for no good reason.  And now you can&#039;t even stop vandalizing my comments on the talk page, or do I need to spell that out too?&lt;br /&gt;
&lt;br /&gt;
:Just to be clear, is this the kind of behavior that you mean by &amp;quot;contribute in a wiki-community way&amp;quot;?  And why exactly can&#039;t we discuss this on the community forum? --[[User:Zaerc|Zaerc]] 16:09, 1 October 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
Zearc, could you please [http://en.wikipedia.org/wiki/Wikipedia:Assume_good_faith assume good faith] and stop throwing around terms like vandalism? [[User:Lozzo|Lozzo]] 11:03, 3 October 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
:And Trout, goading people [http://wiki.linuxmce.org/index.php?title=Serial_Hack&amp;amp;diff=5606&amp;amp;oldid=5605 like this] should be beneath you. [[User:Lozzo|Lozzo]] 11:06, 3 October 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:Sure no problem, as soon as the unreasonable vandalism of contributions and comments (&amp;quot;in good faith&amp;quot; or otherwise) stops.  And just to point out the obvious, that rant adressed at me was never &amp;quot;in good faith&amp;quot;, not even by the widest stretch of imagination. And allow me to quote from the link you gave: &#039;&#039;Bad faith editing can include deliberate disruption just to prove a point, playing games with policies, and vandalism.&#039;&#039; I think we&#039;ve seen all of those symptoms right here.  &lt;br /&gt;
&lt;br /&gt;
:Furthermore I feel that we can really do without this kind of misguided righteousness regardless of the intentions.  Even with assuming good faith it seems pretty obvious that this kind of behavior is not appropriate, let alone a basis to lecture other people on how to edit the wiki.  --[[User:Zaerc|Zaerc]] 16:38, 3 October 2007 (MST)&lt;br /&gt;
&lt;br /&gt;
== Better Solutions ==&lt;br /&gt;
&lt;br /&gt;
I merely put this page here as an aid to people who were having problems with USB-&amp;gt;Serial devices listing incorrectly, and wanted someone better equipped in the ways of bash to come up with an autodetect script for them, or an alternative to using &#039;tree&#039; as it is an additional dependency that I would like to see removed again.&lt;br /&gt;
&lt;br /&gt;
Also, no offence taken Chewi, I know this is a dirty hack, I needed to get this working for a client of mine, so it had to be done on the quick :P&lt;br /&gt;
&lt;br /&gt;
Anyway, does anyone have any ideas regarding this? --[[User:AVJohn|AVJohn]]&lt;/div&gt;</summary>
		<author><name>AVJohn</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=DCE_from_commandline&amp;diff=5690</id>
		<title>DCE from commandline</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=DCE_from_commandline&amp;diff=5690"/>
		<updated>2007-09-25T15:35:31Z</updated>

		<summary type="html">&lt;p&gt;AVJohn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Sending DCE events from command line==&lt;br /&gt;
There is a utility in pluto (/usr/pluto/bin) that allows sending proper DCE message from command line. If you want for instance to trip motion sensors on/off you can achieve this in simple way (ID means ID of particular device that you send event for) :&lt;br /&gt;
&lt;br /&gt;
Event &amp;quot;tripped on&amp;quot;&lt;br /&gt;
 ID -1000 2 9 25 1&lt;br /&gt;
&lt;br /&gt;
Event &amp;quot;tripped off&amp;quot;&lt;br /&gt;
 ID -1000 2 9 25 0&lt;br /&gt;
&lt;br /&gt;
Event &amp;quot;temperature changed&amp;quot;&lt;br /&gt;
 ID  -1000 2 25 30 temperature_value&lt;br /&gt;
&lt;br /&gt;
Event &amp;quot;output on&amp;quot;&lt;br /&gt;
 ID  -1000 2 28&lt;br /&gt;
&lt;br /&gt;
Event &amp;quot;output off&amp;quot;&lt;br /&gt;
 ID  -1000 2 29&lt;br /&gt;
&lt;br /&gt;
Event &amp;quot;light on&amp;quot;&lt;br /&gt;
 ID  -1000 2 48 10 1&lt;br /&gt;
&lt;br /&gt;
Event &amp;quot;light off&amp;quot;&lt;br /&gt;
  ID  -1000 2 48 10 0&lt;br /&gt;
&lt;br /&gt;
For instance - &lt;br /&gt;
&lt;br /&gt;
 A. tripping security sensor with ID of 195 to ON :&lt;br /&gt;
 /usr/pluto/bin/MessageSend dcerouter 195 -1000 2 9 25 1&lt;br /&gt;
&lt;br /&gt;
 B. play media (/home/public/data/tts/0.wav) on Xine player with ID of 44 :&lt;br /&gt;
 /usr/pluto/bin/MessageSend localhost 0 44 1 37 29 &amp;quot;&amp;quot; 41 &amp;quot;&amp;quot; 42 &amp;quot;&amp;quot; 59 &amp;quot;/home/public/data/tts/0.wav&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 C. report that light with ID of 210 is ON :&lt;br /&gt;
 /usr/pluto/bin/MessageSend dcerouter 210 -1000 2 48 10 1&lt;br /&gt;
&lt;br /&gt;
==Sending DCE commands from command line==&lt;br /&gt;
&lt;br /&gt;
Change HouseMode command :&lt;br /&gt;
I&#039;ve sniffed DCERouter logs and this is what happens when you change security state from Orbiter :&lt;br /&gt;
 06      09/11/07 16:06:53.512           Evaluated Event Handler: 1 to: 0 once per: 0 last fired 1189519147 (time is 1189519613)&lt;br /&gt;
 07      09/11/07 16:06:53.512           Received Message from 13 (Security Plug-in / Utility) to -1001 (unknown / ), type 2 id 43 Event:House Mode  Changed, parameters:&lt;br /&gt;
 07      09/11/07 16:06:53.512             Parameter 38(PK_DeviceGroup): 0&lt;br /&gt;
 07      09/11/07 16:06:53.512             Parameter 39(PK_HouseMode): 1&lt;br /&gt;
 08      09/11/07 16:06:53.512           Received Message from 13 (Security Plug-in / Utility) to Apex Destiny 6100(217), type 1 id 19 Command:Set  House Mode, parameters:&lt;br /&gt;
 08      09/11/07 16:06:53.512             Parameter 5(Value To Assign): 1&lt;br /&gt;
 08      09/11/07 16:06:53.512             Parameter 17(PK_Users): 7&lt;br /&gt;
 08      09/11/07 16:06:53.512             Parameter 99(Password): 5678&lt;br /&gt;
 08      09/11/07 16:06:53.512             Parameter 100(PK_DeviceGroup): 0&lt;br /&gt;
 08      09/11/07 16:06:53.512             Parameter 101(Handling Instructions): R&lt;br /&gt;
 08      09/11/07 16:06:53.513           Received Message from 13 (Security Plug-in / Utility) to OnScreen Orbiter(20),tinia Symbian Series 60 mobile(31),Lapitopi(38),OnScreen Orbiter(40),OnScreen Orbiter(88),Windows XP PC/tablet (Horiz)(102),Generic Proxy Orbiter(164),Windows XP PC/tablet (Horiz)(170),HC Center(174),Ati Symbian Series 60 mobile(247), type 1 id 8 Command:Remove Screen From History, parameters:&lt;br /&gt;
 08      09/11/07 16:06:53.513             Parameter 10(ID):&lt;br /&gt;
 08      09/11/07 16:06:53.513             Parameter 159(PK_Screen): 13&lt;br /&gt;
 05      09/11/07 16:06:53.513           The target device 217 (routed to 217) has not registered.&lt;br /&gt;
 13      09/11/07 16:06:53.513           No response expected.  returning&lt;br /&gt;
&lt;br /&gt;
But sending this command from command line doesn&#039;t work :&lt;br /&gt;
&lt;br /&gt;
 /usr/pluto/bin/MessageSend localhost 0 -1000 1 19 5 2 17 7 99 5678 100 0 101 R&lt;br /&gt;
&lt;br /&gt;
Also sending event House Mode Changed doesn&#039;t actually change house mode (that&#039;s ok, cause events are meant for notifying):&lt;br /&gt;
&lt;br /&gt;
 /usr/pluto/bin/MessageSend localhost 0 -1000 2 43 38 0 39 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have found out the reason. -1000 is DCERouter address, but this kind of message should be addressed directly to Security plugin - in my case this is ID of 13. I&#039;m following this, although don&#039;t understand distinction of -1000 and 13 - if DCERouter is addressed it should relay message to security plugin anyway - so I don&#039;t understand why this is necessary - any opinion ?&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;div style=&amp;quot;padding-left: 30px; background: #DDDDDD;&amp;quot;&amp;gt;As far as I can tell, the reason for &#039;-1000&#039; is to allow devices to broadcast events to the system as a whole rather than to a specific device, presumably for event-based devices that do not do a specific function. I shall look more into this... -AVJohn.&amp;lt;/div&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 /usr/pluto/bin/MessageSend localhost 0 13 1 19 5 6 17 7 99 5678 100 0 101 R&lt;br /&gt;
&lt;br /&gt;
Now it changes security mode properly... Parameters in this command line are :&lt;br /&gt;
0 from, 13 to Security plugin, 1-Type: Command, 19-Command &amp;quot;Set house mode&amp;quot;, and the rest:&lt;br /&gt;
 08      09/11/07 16:06:53.512             Parameter 5(Value To Assign): 1&lt;br /&gt;
 08      09/11/07 16:06:53.512             Parameter 17(PK_Users): 7&lt;br /&gt;
 08      09/11/07 16:06:53.512             Parameter 99(Password): 5678&lt;br /&gt;
 08      09/11/07 16:06:53.512             Parameter 100(PK_DeviceGroup): 0&lt;br /&gt;
 08      09/11/07 16:06:53.512             Parameter 101(Handling Instructions): R&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other interesting DCE messages==&lt;br /&gt;
&lt;br /&gt;
Will parse the meaning of DCE messages below  in future. Just wrote it here to remember....&lt;br /&gt;
&lt;br /&gt;
It seems like &amp;quot;Goto Screen&amp;quot; command&lt;br /&gt;
 /usr/pluto/bin/MessageSend localhost 0 64 1 741 10 &amp;quot;Whatever&amp;quot; 159 53 9 &#039;A message|Ok|Remind me later&#039; 137 &#039;-targetType device &amp;lt;%=!%&amp;gt; 15 1 67 13 &amp;quot;/root/Something.sh&amp;quot; 51 &amp;quot;--answer yes&amp;quot;|-targetType device &amp;lt;%=!%&amp;gt; 15 1 67 13 &amp;quot;/root/Something.sh&amp;quot; 51 &amp;quot;--answer no&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
To display Text Alert on Orbiter :&lt;br /&gt;
 /usr/pluto/bin/MessageSend localhost 0 20 1 809 9 &amp;quot;Text to Display&amp;quot; 70 &amp;quot;alert&amp;quot; 182 &amp;quot;30&amp;quot; 251 &amp;quot;??&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Also interesting command is #397 &amp;quot;Show popup&amp;quot;, but I have yet to discover how to use it...&lt;br /&gt;
&lt;br /&gt;
Does anyone know how to display popup with question and few answer buttons (yes/no for example) ? Can this be done without Designer to create screen - just to specify question, texts on buttons and actions on click ?&lt;/div&gt;</summary>
		<author><name>AVJohn</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Serial_Hack&amp;diff=5524</id>
		<title>Serial Hack</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Serial_Hack&amp;diff=5524"/>
		<updated>2007-09-19T00:15:43Z</updated>

		<summary type="html">&lt;p&gt;AVJohn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Serial List Hack ==&lt;br /&gt;
In some situations, (which, I might add are becoming more and more common now) a core or core/hybrid may not have enough, or indeed, any serial ports for automation kit such as the X10 modules to jack into.&lt;br /&gt;
&lt;br /&gt;
In these cases a USB-to-Serial converter may be used, but the pluto system does not list these correctly in its admin pages. This is due to the script &amp;quot;/usr/pluto/bin/ListSerialPorts.sh&amp;quot; which creates the list of serial ports, not giving the correct path (usually /dev/ttyUSB#, where # is a number).&lt;br /&gt;
&lt;br /&gt;
A simple replacement, which, while inferior to the current script in that it does not detect the ports in use, does correctly list all serial ports, both USB and normal serial. However, it requires the &#039;tree&#039; command, so:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo apt-get install tree&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once that has completed, tree will have been installed, and we can use its &#039;-fi&#039; mode to produce full paths, then it is just a simple matter of removing the origional ListSerialPorts.sh file and writing our own, I use vim for this, but any other terminal or graphical text editor will do the job:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo rm /usr/pluto/bin/ListSerialPorts.sh&lt;br /&gt;
sudo vim /usr/pluto/bin/ListSerialPorts.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that vim is open, enter the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
tree -fi /dev | grep ttyS&lt;br /&gt;
tree -fi /dev | grep ttyUSB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
&lt;br /&gt;
If someone out there has a better way of doing this, please post it here! -AVJohn&lt;br /&gt;
&lt;br /&gt;
[[Category: GSD]]&lt;br /&gt;
[[Category: LinuxMCE_Devices]]&lt;br /&gt;
[[Category: Programmer&#039;s Guide]]&lt;/div&gt;</summary>
		<author><name>AVJohn</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Generic_Serial_Device&amp;diff=5523</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=5523"/>
		<updated>2007-09-19T00:15:40Z</updated>

		<summary type="html">&lt;p&gt;AVJohn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;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;lt; Ruby_Generic_Serial_Device::RubyCommandWrapper&lt;br /&gt;
 end&lt;br /&gt;
 class Device_DevID &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; 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;lt; Ruby_Generic_Serial_Device::RubyCommandWrapper&lt;br /&gt;
   2:end&lt;br /&gt;
   3:class Device_47 &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:while(true)&lt;br /&gt;
  23:  buff=conn_.Recv(16384, 5000)&lt;br /&gt;
  24:  if(buff.length() == 0)&lt;br /&gt;
  25:     break&lt;br /&gt;
  26:   end&lt;br /&gt;
  27:   recv = recv +  buff&lt;br /&gt;
  28:end&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;
&lt;br /&gt;
[[Category: GSD]]&lt;br /&gt;
[[Category: LinuxMCE_Devices]]&lt;br /&gt;
[[Category: Programmer&#039;s Guide]]&lt;/div&gt;</summary>
		<author><name>AVJohn</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Serial_Hack&amp;diff=5522</id>
		<title>Serial Hack</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Serial_Hack&amp;diff=5522"/>
		<updated>2007-09-19T00:03:43Z</updated>

		<summary type="html">&lt;p&gt;AVJohn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Serial List Hack ==&lt;br /&gt;
In some situations, (which, I might add are becoming more and more common now) a core or core/hybrid may not have enough, or indeed, any serial ports for automation kit such as the X10 modules to jack into.&lt;br /&gt;
&lt;br /&gt;
In these cases a USB-to-Serial converter may be used, but the pluto system does not list these correctly in its admin pages. This is due to the script &amp;quot;/usr/pluto/bin/ListSerialPorts.sh&amp;quot; which creates the list of serial ports, not giving the correct path (usually /dev/ttyUSB#, where # is a number).&lt;br /&gt;
&lt;br /&gt;
A simple replacement, which, while inferior to the current script in that it does not detect the ports in use, does correctly list all serial ports, both USB and normal serial. However, it requires the &#039;tree&#039; command, so:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo apt-get install tree&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once that has completed, tree will have been installed, and we can use its &#039;-fi&#039; mode to produce full paths, then it is just a simple matter of removing the origional ListSerialPorts.sh file and writing our own, I use vim for this, but any other terminal or graphical text editor will do the job:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo rm /usr/pluto/bin/ListSerialPorts.sh&lt;br /&gt;
sudo vim /usr/pluto/bin/ListSerialPorts.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that vim is open, enter the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
tree -fi /dev | grep ttyS&lt;br /&gt;
tree -fi /dev | grep ttyUSB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
&lt;br /&gt;
If someone out there has a better way of doing this, please post it here! -AVJohn&lt;/div&gt;</summary>
		<author><name>AVJohn</name></author>
	</entry>
</feed>