LinuxMCE Forums

General => Users => Topic started by: DeadPenguin on July 08, 2007, 06:17:15 pm

Title: LinuxMCE and Misterhouse
Post by: DeadPenguin on July 08, 2007, 06:17:15 pm
I have been wanting to put together a media/x10/security cam solution for the last year. I had planned on using Misterhouse until I stumbled over LinuxMCE on youtube.

Here is a list of the stuff I have put together over the last year:
4 - installed and wired 30 LED cctv cams.
1- kodicom capture card. (works with linux - I have used it with zoneminder)
1- CM11 and a handfull of x10 contollers/recievers/remotes.
1- NAS with most of my media on it.
1- Dell server w/ dual 1ghz 1gb ram and for now 140gb 10k scsi drives (if not enough power I will upgrade.)
1- small form factor pc in my bedroom. (P4 2.4 1gb ram 250gb HD.) Hoping to use this as a MD.
1- Oregon Scientific WMR968 Weather Station.
I had and old wintv tv capture card. (thinking to upgrade to the pvr-500 if everything works)


I am having a hard time deciding between MH and LinuxMCE.  Misterhouse can do everything I need except streaming video and the learning curve is very steep.. LinuxMCE can do most of what I want (Media streaming) but does not have voice recognition and a module for weather station and some of the plugin functionality provided by MH with Perl add ons.(ie. the comic strip viewer, http://w3.misterhouse.net:8090/bin/code_select.pl )

Is there any way to get LinuxMCE to handle logging my weather info? Is there any voice recognition module?
Neither of these are deal stoppers I can run a seperate machine to log the weather info, and voice rec would be nice but not necessary. A nice gyro mouse will do.

I am not sure my old server will handle LinuxMCE. For now I just wanted to run the one md in my bedroom going to 3 or 4 mds if everything goes OK. I have seen some real nice dual 3.0 xeons on Ebay for a decent price.

Regards,
Blair

Title: Re: LinuxMCE and Misterhouse
Post by: k84 on July 08, 2007, 06:21:57 pm
I would've gone for misterhouse (mainly because there is a very nice set of developers actively working on the project) and the mail lists are just so helpfull for everyone having a problem.

I've been using linuxmce since the day it first got launched, and i need to say that i'm very happy with the way it presents media, but it has to many bugs and to few updates.

What would be nice is to have misterhouse & linuxmce working together (shouldnt be to hard)
Misterhouse has the advantage of easy programming what YOU want, instead of playing around with the event system in lmce.
Title: Re: LinuxMCE and Misterhouse
Post by: DeadPenguin on July 08, 2007, 08:05:38 pm
I like MH.  The learning curve is on the steep side. I don't know if I am going to have the time to learn Perl to make things happen.
I am using gentoo 2007.0 now and to get get MH up and running is as easy as "emerge misterhouse" "perl mh".
BUT, the lack of MYTHTV integration in MH is a dealstopper.
Plus there is no MH forum.(AFIK) I could only find mailing lists.

I REALLY like how easy LINUXMCE makes media.
X-10 and media would be my major uses of this type a system. 

There are a bunch of ways to approach this.  I just want the easiest.  There are a bunch of linux apps that would handle my needs. (Mythtv, zoneminder, bottlerocket, wxlog.) I just would rather have everything in one place.

LinuxMCE/Plutohome look like they come the closest to what I want with the least amount of effort. Misterhouse has everything I need except video with a lot of learning to set up the way I want.


Title: Re: LinuxMCE and Misterhouse
Post by: bulek on July 09, 2007, 02:11:52 am
Hi,

I think that you don't have to choose - you can use both of them - I also plan to do the same. Misterhouse is really nice backend, quite easy to learn and customize... LMCE is great GUI, with probably crippled backend functionality, so I guess using both of them would make a nice combination...

See http://wiki.linuxmce.com/index.php/Misterhouse (http://wiki.linuxmce.com/index.php/Misterhouse)

I can help, if you decide to go that route...

Regards,

Bulek....
Title: Re: LinuxMCE and Misterhouse
Post by: DeadPenguin on July 09, 2007, 06:00:22 am
I agree I wish I could find something with the functionality of both wrapped into one.

I could run both. Using LinuxMCE soley for the media content/ cams / pbx  and Misterhouse mainly for x-10 / weather / etc.

Blair
Title: Re: LinuxMCE and Misterhouse
Post by: bulek on July 09, 2007, 11:08:21 pm
I agree I wish I could find something with the functionality of both wrapped into one.

I could run both. Using LinuxMCE soley for the media content/ cams / pbx  and Misterhouse mainly for x-10 / weather / etc.

Blair


I think it would not be too hard, but I guess it would be much easier if few guys familiar with MH and Perl and some with LMCE get together... On LMCE side we just need clean way of showing things on Orbiters (weather, temperatures, support for devices that MH controls,etc...). On MH side we need simple listener and few modules to connect to LMCE or Pluto....

Any guys around willing to tackle this ? I can help (I'm pretty familiar with both system), but currently just don't have anough time to do it by myself... I'm also lousy programmer, so experienced Perl guy would be of tremendous help...

HTH,

regards,

Bulek.
Title: Re: LinuxMCE and Misterhouse
Post by: chrisbirkinshaw on November 29, 2007, 02:41:25 pm
Hi,

I think that you don't have to choose - you can use both of them - I also plan to do the same. Misterhouse is really nice backend, quite easy to learn and customize... LMCE is great GUI, with probably crippled backend functionality, so I guess using both of them would make a nice combination...

See http://wiki.linuxmce.com/index.php/Misterhouse (http://wiki.linuxmce.com/index.php/Misterhouse)

I can help, if you decide to go that route...

Regards,

Bulek....


Can you flesh out the wiki page a bit more if you have some experience? It would be good to see how to:

1. Add misterhouse to LMCE as a parent (this already seems to be covered)
2. Add a light to a room, controlled by MH parent
3. Configure MH to listen for the right commands and control light
4. Finally be able to turn light on/off and dim from the floorplan on LMCE

I can add my MH configuration which shows how to do motion detection firing lights in MH, as this is currently not something I can do in LME (which is why I am still running MH).

Chris
Title: Re: LinuxMCE and Misterhouse
Post by: bulek on November 29, 2007, 05:17:26 pm
Hi,

I think that you don't have to choose - you can use both of them - I also plan to do the same.  Misterhouse is really nice backend, quite easy to learn and customize... LMCE is great GUI, with probably crippled backend functionality, so I guess using both of them would make a nice combination...

See http://wiki.linuxmce.com/index.php/Misterhouse (http://wiki.linuxmce.com/index.php/Misterhouse)

I can help, if you decide to go that route...

Regards,

Bulek....


Can you flesh out the wiki page a bit more if you have some experience? It would be good to see how to:

1. Add misterhouse to LMCE as a parent (this already seems to be covered)
2. Add a light to a room, controlled by MH parent
3. Configure MH to listen for the right commands and control light
4. Finally be able to turn light on/off and dim from the floorplan on LMCE

I can add my MH configuration which shows how to do motion detection firing lights in MH, as this is currently not something I can do in LME (which is why I am still running MH).

Chris

Sorry really busy at the moment, but you do a lot by yourself. I'd recomend follwing way :
 1. get more familiar with DCE messages :

http://wiki.linuxmce.org/index.php/Sensors (http://wiki.linuxmce.org/index.php/Sensors)
http://wiki.linuxmce.org/index.php/MessageSend (http://wiki.linuxmce.org/index.php/MessageSend)

There you can see how to send messages to control various devices or to report change in state via events... Start Orbiter, send events, commands and see how it reacts... You can also send message to each device over web-admin (and it even prints what is command line syntax for sending that message - it's nice to see and learn)...

 2. How to connect to LMCE :

http://wiki.linuxmce.org/index.php/Plain_Text_DCE_Messages (http://wiki.linuxmce.org/index.php/Plain_Text_DCE_Messages)

I guess text interface would be easy for a start... Try that basic code, register with LMCE and see what messages you'll get. You add Misterhouse as device, and add some child devices (thermostat,thermometer, light, etc...) - be sure they don't have "Implements DCE" ticked. In  this case all messages for those devices will be routed to their parent  -so your code will receive them...

 3. Description of DCE commands, events...

Go into Web-Admin -> Advanced -> DCE and you can get more info on commands, events, etc...


So basically LMCE-MH integration should do this :
- MH registers as parent device for all devices it controls
- MH registers as message interceptor for other LMCE not being children devices...
- then do endless loop :
      1.  child devices:
      1a. receive commands from LMCE and control them accordingly
      1.b if anything under MH changes state of some device, send proper event to  LMCE, so it will change its state in its own data and on Floorplan

      2.  other LMCE devices :
      2a. intercept events for those devices and update MH data accordingly (if LMCE changed their state)
      2b. send proper commands to them if something under MH wants to change their state.

      ?? not sure, maybe something else is also needed here... 

In this way we could have wrapper code to integrate beside automation devices even mp3player under MH as media player to LMCE and vice versa. But as previously said, I'd like to have an helping hand on MH side - it would be nice if MH could automatically expose all its devices to LMCE and also take all other LMCE devices for it self - so integration could be done in fully transparent way...

MH is really nice as backend machine, generating all sorts of reminders, speech announcements etc.. LMCE is particularly strong in giving nice GUI and convenient control of devices into user's hand... Using both of them would enhance system dramatically...I've tried several times posting to MH's mailing lists, but it seems that LMCE is not so popular in this community to give a hand on integration..

HTH,

regards,

Bulek.



Title: Re: LinuxMCE and Misterhouse
Post by: mmiller on November 29, 2007, 09:58:41 pm
Newbee to Linuxmce tried Pluto once, didnt work out. Have been running Misterhouse for a number of years, switched to Kubuntu from winwoes about a year ago waiting on LMCE710 to do a rebuild and try them both together. Will keep you posted....I'm not much of a programer either.
Mark
Title: Re: LinuxMCE and Misterhouse
Post by: chrisbirkinshaw on November 30, 2007, 04:11:34 pm


Found this:

http://forum.linuxmce.org/index.php?topic=391.0

So I leant some perl today and wrote this bit of code you can add to the above piece:

Code: [Select]
if (my $msg = said $pluto_device_event_receiver) {
        print_log "Pluto Device Message received: $msg\n";

        $msg =~ s/[\"\']//g;    # remove quotes before splitting on whitespace

        if ($msg =~/(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)\s(\w*)/ ) {
                print_log "DeviceFrom: $1";
                print_log "DeviceTo:: $2";
                print_log "MsgType: $3 (1=Command, 2=Event)";
                print_log "MsgId: $4";
                print_log "param1id: $5";
                print_log "param2value (X10 Device): $6";
                print_log "param2id: $7";
                print_log "param2value (X10 Command): $8";
                if ($8 == '192') {
                  print_log "Turn $6 ON";
                  set $6 ON;
                }
                if ($8 == '193') {
                  print_log "Turn $6 OFF";
                  set $6 OFF;
                }
        }
}

It works! You can add lights and control from LMCE. Working on getting motion detectors to feed into LMCE now, it is finished and just needs testing.

Chris
Title: Re: LinuxMCE and Misterhouse
Post by: dnadeau on December 08, 2007, 05:30:12 am
Are you all running misterhouse on the core? If so, did you just use apt to install it?
Title: Re: LinuxMCE and Misterhouse
Post by: tschak909 on December 08, 2007, 05:46:09 am
why the hell are you guys doing this? especially when pluto does what misterhouse does, better?

"Waaah, I don't wanna write GSD drivers!"

it's not hard, guys, let's put some effort up front to make it easier for all of us later.

-Thom

Title: Re: LinuxMCE and Misterhouse
Post by: blackoper on December 08, 2007, 07:04:13 am
umm because misterhouse has more hardware support and it's easier to script?
Title: Re: LinuxMCE and Misterhouse
Post by: tschak909 on December 08, 2007, 08:01:27 am
(a) the whole scripting infrastructure is much more robust than misterhouse, you wind up writing less code to support a new device. MH's code is a clusterfucked mess.

(b) we would HAVE more device support if more people would look at the existing device templates and base new devices on them.

come on guys, use your brains.

-Thom
Title: Re: LinuxMCE and Misterhouse
Post by: bulek on December 08, 2007, 12:48:52 pm
why the hell are you guys doing this? especially when pluto does what misterhouse does, better?
I disagree. Try to write some custom event handler in your favourite prog. language to add some behaviour to system... For instance "event handler plugin module" that would interact with LMCE and send speech announcements etc... LMCE support for adding custom event handling is currently crippled. You can write GSD, but only as device drivers in Ruby. But only if you have such application that is happy to be called every 2 secs (time varies a lot)... This is way to loog interval to write some decent plugin for handling events etc...

What is really missing is to have plugin system, so plugins could be written in several popular languages... But also plugins must be called more frequently than somewhere in between 1 and 2 secs...

Also we need mechanism to make those modules as contributions and reusable for other users... AFAIK, we're miles from that point, except of limited functionality of Ruby and GSD..

"Waaah, I don't wanna write GSD drivers!"

it's not hard, guys, let's put some effort up front to make it easier for all of us later.

-Thom
I fully agree, but... as lousy programmer wrote few mockups code (also to connect Misterhouse and Pluto), but you can guess how many people tried to contribute further on it.... I also got no response in Misterhouse community.

But still if I have to choose between MH and LMCE, I'd still clearly pick up MH, cause it has clear contribution path, is rather well organised and you can implement and contribute things quite easily - and a lot of people is already doing this... This is still level, where LMCE should come to one day... Hopefully very soon.... LMCE's support for adding event or device plugins in popular languages like Perl, Python, etc.. would tremendously enhance contributions from community...

I've tried to contribute many things to Pluto at earlier time, but couldn't do anything without approval and help of main developers, so my contributions are lost somewhere in the dust of my disk and I'm not sure if I'm willing to recode them again (it was either like "now we're feature freezed", or "wait for new release" that came months after that and then it got freezed, etc...)... And then of course, I go and do it under Misterhouse and that's it...
No special efforts needed...

HTH,

regards,

Bulek.
Title: Re: LinuxMCE and Misterhouse
Post by: Matthew on December 08, 2007, 05:17:37 pm
Also we need mechanism to make those modules as contributions and reusable for other users... AFAIK, we're miles from that point, except of limited functionality of Ruby and GSD..

That's what sqlCVS is supposed to be. Getting that online as we work to scale the community in so many other ways (like opening the project and getting it upgradeable with new Ubuntu releases) could become the biggest community contribution.

What could boost this entire effort would be a program that imports MisterHouse HW handlers into LMCE, if that's posible. Though just more accessible tools than the GSD form would also help.
Title: Re: LinuxMCE and Misterhouse
Post by: chrisbirkinshaw on December 10, 2007, 02:36:04 pm
why the hell are you guys doing this? especially when pluto does what misterhouse does, better?

1. Can I do this level of scripting in LMCE?

X10 motion detector triggered --> is it between dusk and dawn? --> is the light already on? --> switch the light on
Switch A5 pressed --> dim lamp A3 to 50% and switch lamp A4 off

2. Misterhouse is the only stable part of my system. It sits on a separate low-end PC which is never touched. If the lights were as reliable as the TV my girlfriend would leave me!

3. When I tried controlling X10 lights using LMCE directly there was such a huge lag that the system was useless.

4. There is no support for receiving X10 commands in LMCE (I actually receive RF commands via an MR26 and powerline commands via a CM11 in Misterhouse)

5. LMCE cannot talk to my iButton temp sensors using the simple homebrew passive serial adapter


I am aware that these things could be solved with some development, but I don't have the skills and modifying a little bit of perl to bridge MH and LMCE was very simple and very convenient.

Chris
Title: Re: LinuxMCE and Misterhouse
Post by: tschak909 on December 10, 2007, 03:38:21 pm
why the hell are you guys doing this? especially when pluto does what misterhouse does, better?

1. Can I do this level of scripting in LMCE?

X10 motion detector triggered --> is it between dusk and dawn? --> is the light already on? --> switch the light on
Switch A5 pressed --> dim lamp A3 to 50% and switch lamp A4 off

2. Misterhouse is the only stable part of my system. It sits on a separate low-end PC which is never touched. If the lights were as reliable as the TV my girlfriend would leave me!

3. When I tried controlling X10 lights using LMCE directly there was such a huge lag that the system was useless.

4. There is no support for receiving X10 commands in LMCE (I actually receive RF commands via an MR26 and powerline commands via a CM11 in Misterhouse)

5. LMCE cannot talk to my iButton temp sensors using the simple homebrew passive serial adapter


I am aware that these things could be solved with some development, but I don't have the skills and modifying a little bit of perl to bridge MH and LMCE was very simple and very convenient.

Chris


1. Yes, dig into the criteria section of the Events on the Web Admin

2. the appliance control is the oldest and most reliable part of LMCE.

3. X10 is by its very nature, very slow, so yes, inherent lags in the messaging system will exacabate this. I can tell you that there is a lot of debugging code being executed right now that if disabled would vastly speed up this part of the system by orders of magnitude, with that said, even on my Z-Wave installation, selecting and triggering a single light only takes about 40ms, with other lights happening roughly half a second after the message is sent to each in a queue, this can be improved.

4. we need to implement this, again, not hard if you actually dig in a little. The system already can deal with it, the commands and events just need to be implemented.

5. write a driver. I use a DS9490R and it works just fine.


You're telling me you can deal with the mess that is Perl, and you don't want to even look at Ruby? I would suggest looking at a GSD template before making such a determination.. which leads me back to my original point, actually look at the system before slapping on duct tape to other things.

-Thom
Title: Re: LinuxMCE and Misterhouse
Post by: Matthew on December 10, 2007, 04:50:15 pm
You're telling me you can deal with the mess that is Perl, and you don't want to even look at Ruby? I would suggest looking at a GSD template before making such a determination.. which leads me back to my original point, actually look at the system before slapping on duct tape to other things.

I am expert in the "mess" (powerful complexity) that is Perl. Which is one reason why I haven't learned Ruby: I've already invested enough in Perl, I'm good at it, it's powerful, there's a huge amount of existing Perl, there's a huge community of Perl experts and just average programmers. The only reason to learn Ruby is that some idiosyncratic systems use it instead of Perl (or C or shell script or Java).

Is there a reason that LMCE has to use Ruby? Why can't it expose an API with language bindings (starting with Ruby), and run any executable that has  a language binding? Perl is very embeddable, has lots of support and prior art for doing so. And lots of existing Perl code that does real stuff right away, whether integrating other SW systems or gluing HW.
Title: Re: LinuxMCE and Misterhouse
Post by: tschak909 on December 10, 2007, 04:53:18 pm
Matthew: We could use additional bindings for other languages, are you volunteering?

-Thom
Title: Re: LinuxMCE and Misterhouse
Post by: Matthew on December 11, 2007, 10:11:40 pm
Matthew: We could use additional bindings for other languages, are you volunteering?

OK, I'm volunteering to help in that effort. Though I usually don't take constructive criticism on a users list as an offer to help, just to help focus the developers. Posting on a developers list is different... So now I guess you've got me to post something starting the subject over on the developers' list, in "Language Bindings" (http://forum.linuxmce.org/index.php?topic=3454.msg17955#msg17955).

I've never produced a language binding before, so I'd prefer to work with someone who has. If no one else offers, I can try to work on a Perl binding sometime in January.
Title: Re: LinuxMCE and Misterhouse
Post by: tschak909 on December 11, 2007, 10:18:43 pm
the GSD is the device that embeds ruby, you may want to look at this to produce a work-alike device for the language you wish to interpret.

-Thom
Title: Re: LinuxMCE and Misterhouse
Post by: Matthew on December 11, 2007, 11:13:11 pm
the GSD is the device that embeds ruby, you may want to look at this to produce a work-alike device for the language you wish to interpret.

We should move more detailed discussion to the "Language Bindings" (http://forum.linuxmce.org/index.php?topic=3454.msg17955#msg17955) thread I split from this one. Specifically about which source files incorporate the GSD. I'd rather add a language bindings layer (if it doesn't exist) to GSD itself, or just add Perl, rather than make another device largely redundant to GSD.
Title: Re: LinuxMCE and Misterhouse
Post by: chrisbirkinshaw on December 13, 2007, 03:39:34 pm

You're telling me you can deal with the mess that is Perl, and you don't want to even look at Ruby? I would suggest looking at a GSD template before making such a determination.. which leads me back to my original point, actually look at the system before slapping on duct tape to other things.


I understand what you are saying, but until the messaging system in LMCE is vastly speeded up I cannot think about using it for my motion triggered lights and to repond to my X10 wall switches. They need to be as quick as possible. The other major problem is that the beta nature of LMCE means, that while the HA code may be mature, immature code elsewhere means the system is frequently rebooted or runs into problems. As I said, if the lights stopped working as often as the TV does then I would be in trouble. I can also relax now and mess around with LMCE without worrying about the basic services in my home.

When I tried connecting my X10 interface to LMCE the lights would turn on several secs after I clicked them on the floorplan. Running MH this process takes less than a second - not ideal I know, but acceptable. By the time this is fixed I imagine LMCE will be able to recieve X10 commands and the whole thing will be more mature. In this case my "duct tape" is appropriate, as once the system is fixed MH will not be necessary. Duct tape is ok for a temporary fix.

;-)

Chris
Title: Re: LinuxMCE and Misterhouse
Post by: Matthew on December 13, 2007, 04:24:40 pm

You're telling me you can deal with the mess that is Perl, and you don't want to even look at Ruby? I would suggest looking at a GSD template before making such a determination.. which leads me back to my original point, actually look at the system before slapping on duct tape to other things.


I understand what you are saying, but until the messaging system in LMCE is vastly speeded up I cannot think about using it for my motion triggered lights and to repond to my X10 wall switches. They need to be as quick as possible. The other major problem is that the beta nature of LMCE means, that while the HA code may be mature, immature code elsewhere means the system is frequently rebooted or runs into problems. As I said, if the lights stopped working as often as the TV does then I would be in trouble. I can also relax now and mess around with LMCE without worrying about the basic services in my home.

When I tried connecting my X10 interface to LMCE the lights would turn on several secs after I clicked them on the floorplan. Running MH this process takes less than a second - not ideal I know, but acceptable. By the time this is fixed I imagine LMCE will be able to recieve X10 commands and the whole thing will be more mature. In this case my "duct tape" is appropriate, as once the system is fixed MH will not be necessary. Duct tape is ok for a temporary fix.

There are so many bugs fixed (http://mantis.linuxmce.org/view_all_bug_page.php) in the 0710 release, not to mention all the Linux bugs fixed in the underlying Kubuntu, that I'll be interested to hear whether its messaging performance is adequate. The developers team has also said they'll be opening development on a self-hosting build env with that release, so we'll be able to take a crack at any of a number of ways to improve it to suit our own requirements. While the release date has been moved from "the end of November" to "Real Soon Now (TM)", I hope to see it in January.
Title: Re: LinuxMCE and Misterhouse
Post by: hari on December 13, 2007, 06:05:02 pm
I understand what you are saying, but until the messaging system in LMCE is vastly speeded up I cannot think about using it for my motion triggered lights and to repond to my X10 wall switches. They need to be as quick as possible.
the dcerouter is fast enough for that. It's not the messaging system. I think the X10 implementation should be improved. Look at what ddamron has done for insteon simply using GSD (http://forum.linuxmce.org/index.php?topic=3309.0).

best regards,
Hari
Title: Re: LinuxMCE and Misterhouse
Post by: tschak909 on December 13, 2007, 08:50:23 pm
yeah, no kidding, even ZWave happens in about half a second for me.

-Thom
Title: Re: LinuxMCE and Misterhouse
Post by: bulek on December 13, 2007, 11:20:25 pm
I understand what you are saying, but until the messaging system in LMCE is vastly speeded up I cannot think about using it for my motion triggered lights and to repond to my X10 wall switches. They need to be as quick as possible.
the dcerouter is fast enough for that. It's not the messaging system. I think the X10 implementation should be improved. Look at what ddamron has done for insteon simply using GSD (http://forum.linuxmce.org/index.php?topic=3309.0).

best regards,
Hari
Hi,

if I'm not mistaken, I remember reading something about intentional timeouts built into X10 interface of LMCE, because something was not working reliably.. But could be wrong...

Regards,

Bulek.
Title: Re: LinuxMCE and Misterhouse
Post by: Zaerc on December 13, 2007, 11:33:51 pm
I think the whole X10 implementation could desperately need some work, or maybe even needs to be rewritten completely.
Title: Re: LinuxMCE and Misterhouse
Post by: PeteK on December 13, 2007, 11:40:05 pm
Dan's got it working with his Ruby Insteon code and I'll have it for the PLC Insteon interface soon after the 0710 release.
Title: Re: LinuxMCE and Misterhouse
Post by: chrisbirkinshaw on December 14, 2007, 12:55:05 pm
The CM11? Or is the insteon device able to send x10 codes?

Sadly we don't have insteon in the UK...

Title: Re: LinuxMCE and Misterhouse
Post by: chrisbirkinshaw on December 15, 2007, 06:48:58 pm

Here is the latest version of the MH code which addresses the problem detailed in this post:

http://forum.linuxmce.org/index.php?topic=3474.0

As you can see the code is a total hack in many places and I've been lazy becuase I don't know perl (no case statements, no arrays to map pluto device numbers to x10 codes etc etc). It's ugly but it works!

As I said, it's just to tide me over until the LMCE X10 code is mature, or Z-Wave stuff has become more widely available in the UK, so please don't get mad!

Thanks,

Chris



Code: [Select]
# Category=Pluto
#
#@ Connection with Pluto DCE Router via TCP port localhost:3450 (mh.ini -> pluto_DCE_router).
#
use strict;
$restartTimer = new Timer;



##############################################################################

sub connect_lmce {
        print_log "Configuring sockets";
        $pluto_device_event_receiver = new  Socket_Item(undef, undef, '192.168.1.1:3450','device_event_receiver','tcp','record');
        $pluto_device_command_sender = new  Socket_Item(undef, undef, '192.168.1.1:3450','device_command_sender','tcp','record');

        print_log "Closing sockets if any left open";
        if (active_now $pluto_device_event_receiver) {stop $pluto_device_event_receiver;}
        if (active_now $pluto_device_command_sender) {stop $pluto_device_command_sender;}

        print_log "Open and setup new sockets";

        start $pluto_device_event_receiver;
        set $pluto_device_event_receiver "COMMAND 179";

        start $pluto_device_command_sender;
        set $pluto_device_command_sender "EVENT 179";
        set $pluto_device_command_sender "PLAIN_TEXT";
}

if ($Startup) {
        print_log "Starting connection to LMCE";
        set $restartTimer 10, sub {connect_lmce;};
}

if (inactive_now $pluto_device_event_receiver or inactive_now $pluto_device_command_sender) {
        print_log "Connection to LMCE terminated, restarting";
        set $restartTimer 10, sub {connect_lmce;};
}

if (new_minute 1 and !active $pluto_device_event_receiver or new_minute 1 and !active $pluto_device_command_sender) {
        print_log "Connection to LMCE still terminated, restarting";
        connect_lmce;
}



#my $motion=0;

if (my $msg = said $pluto_device_event_receiver) {
        print_log "Pluto Device Message received: $msg\n";

        $msg =~ s/[\"\']//g;    # remove quotes before splitting on whitespace

        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*)/) {
                print_log "DeviceFrom: $1";
                print_log "DeviceTo: $2";
                print_log "MsgType: $3 (1=Command, 2=Event)";
                print_log "MsgId: $4";
                print_log "param1id: $5";
                print_log "param2value: $6";
                if (defined $7) { print_log "param2id: $7";}
                if (defined $8) { print_log "param2value: $8";}

                #############################################################
                # $1    $2      $3      $4      $5      $6      $7      $8
                # from  to      msgtype msgid   p1id    p1val   p2id    p2val
                # Example command from orbiter
                # 69    206     1       192     97      ""      98      ""
                # 69    206     1       193     97      ""
                # 69    205     1       184     76      "100"
                # Example command from admin site
                # 0     204     1       760     10      "C2"    154     "192"
                # 0     204     1       760     10      "C2"    154     "193"
                #############################################################

                my $target;
                my $x10_id;

                if ($2 == '162') { $x10_id = 'A5'; }
                if ($2 == '186') { $x10_id = 'A3'; }
                if ($2 == '187') { $x10_id = 'B1'; }
                if ($2 == '188') { $x10_id = 'A8'; }
                if ($2 == '189') { $x10_id = 'B3'; }
                if ($2 == '190') { $x10_id = 'B4'; }
                if ($2 == '191') { $x10_id = 'A10'; }
                if ($2 == '192') { $x10_id = 'A9'; }
                if ($2 == '218') { $x10_id = 'A6'; }
                if (defined $x10_id) { $target = new X10_Item("$x10_id");}

                if ($4 == '760' ) { $target = new X10_Item("$6");}

                if ($8 == '192' or $4 == '192') {
                  print_log "Turn device $x10_id ON";
                  set $target ON;
                }
                if ($8 == '193' or $4 == '193') {
                  print_log "Turn device $x10_id OFF";
                  set $target OFF;
                }
                if ($4 == '184') {
                  print_log "Setting device $x10_id to $6%";
                  set $target "$6%";
                }
        }
}

sub send_pluto_message {
        my($message) = @_;
        set $pluto_device_command_sender "MESSAGET " . length ($message);
        set $pluto_device_command_sender $message;
}

sub update_temp {
        # Example message@
        # 167=temp sensor ID, 2=event, 25=event ID (temp changed), 30=value, temperature (string)
        # my $message = sprintf("167 -1000 2 25 30 %d.2",$random_number);

        my($sensor, $temp) = @_;
        my $lmce_device;

        ### map iButtons to lmce device numbers - there are better ways of doing this! ###
        if ($sensor == 0) { $lmce_device = 166; }
        if ($sensor == 1) { $lmce_device = 167; }

        my $message = sprintf("$lmce_device -1000 2 25 30 %d.2",$temp);
        send_pluto_message($message);
        print_log "Updating sensor $lmce_device $temp";
}

sub lmce_motion {
        my($device_id) = @_;
        # 6780=Detector ID, 2=event, 9=event ID (tripped), 25=tripped value, 0=value (tripped OFF)
        my $message = "$device_id -1000 2 9 25 0";
        send_pluto_message($message);
}

sub lmce_still {
        my($device_id) = @_;
        # 6780=Detector ID, 2=event, 9=event ID (tripped), 25=tripped value, 1=value (tripped ON)
        my $message = "$device_id -1000 2 9 25 1";
        send_pluto_message($message);
}

if ($state = state_now $Kitchen_Motion) {
  if ($state eq MOTION) {
        lmce_motion(185);
  }
  if ($state eq STILL) {
        lmce_still(185);
  }
}

if ($state = state_now $Landing_Motion) {
  if ($state eq MOTION) {
        lmce_motion(184);
  }
  if ($state eq STILL) {
        lmce_still(184);
  }
}

if ($state = state_now $Hall_Motion) {
  if ($state eq MOTION) {
        lmce_motion(183);
  }
  if ($state eq STILL) {
        lmce_still(183);
  }
}
Title: Re: LinuxMCE and Misterhouse
Post by: Matthew on December 15, 2007, 07:43:40 pm

Here is the latest version of the MH code which addresses the problem detailed in this post:

http://forum.linuxmce.org/index.php?topic=3474.0

As you can see the code is a total hack in many places and I've been lazy becuase I don't know perl (no case statements, no arrays to map pluto device numbers to x10 codes etc etc). It's ugly but it works!

As I said, it's just to tide me over until the LMCE X10 code is mature, or Z-Wave stuff has become more widely available in the UK, so please don't get mad!

I'm cleaning up your Perl code a little, so it's more maintainable by Perl programmers. But I don't have the MH or other systems set up to debug it, so you'll have to test it and let me know if there's problems.

Also, the code says in a comment
Code: [Select]
#@ Connection with Pluto DCE Router via TCP port localhost:3450 (mh.ini -> pluto_DCE_router).but the code itself says
Code: [Select]
        $pluto_device_event_receiver = new  Socket_Item(undef, undef, '192.168.1.1:3450','device_event_receiver','tcp','record');
        $pluto_device_command_sender = new  Socket_Item(undef, undef, '192.168.1.1:3450','device_command_sender','tcp','record');

Is that a hardwired 192.168.1.1 IP# of your core, that should be localhost? Can I just replace that with 127.0.0.1 or something portable?

And what's the context calling that code, so I can look at the functions/vars that the scope you posted inherits?
Title: Re: LinuxMCE and Misterhouse
Post by: chrisbirkinshaw on December 15, 2007, 08:48:06 pm
Cool, thanks!

Yes, I hacked it to 192.168.1.1 because my MH box is separate.

The connect_lmce sub configures the 2 sockets, closes if any are left running (sometimes LMCE only closes one connection), then initialises them. This sub is run by the following set of if statements.

1. If MH has just be started up ($Startup)

2. If the socket connections have just been closed (inactive_now is only true the first time MH goes through the code loop and sees the is no connection, hence the need for point 3)

3. Every minute, if the socket connections are still closed


I think parse any received messages. Sometimes they are made of 6 values, sometimes 8 if both param1 and param2 are used. The table in the comments shows the possible messages from LMCE.

The part which starts "if ($state = state_now $Kitchen_Motion) {" should really have been put elsewhere in the MH code, not in this plugin, and the lmce_motion or lmce_still called from there. Again, I was being lazy...

Thanks,

Chris
Title: Re: LinuxMCE and Misterhouse
Post by: Matthew on December 15, 2007, 10:06:43 pm
The part which starts "if ($state = state_now $Kitchen_Motion) {" should really have been put elsewhere in the MH code, not in this plugin, and the lmce_motion or lmce_still called from there.

In
Code: [Select]
if ($state eq MOTION)is MOTION a scalar variable name that's set to a value before entering that line, or is it a filehandle, or some other kind of variable? Or is it a string literal? In other words, should that line really read something like
Code: [Select]
if($state eq 'MOTION')or even
Code: [Select]
$inMotion = 'MOTION';
$motionless = 'STILL';
$locationCode = '184';
if($state eq $inMotion)
{
  lmce_motion($locationCode);
}
elsif($state eq $motionless)
{
  lmce_still(locationCode);
}

Can state_now return any value other than MOTION or STILL? If so, is there a message for "other", or just silently ignore it?

And are those identifiers like state_now , active_now , inactive_now , new_minute , active , print_log all function names that should end with () when called on an argument list rather shell-script-style on a single argument, separated with a space (eg. "inactive_now $pluto_device_event_receiver" is equivalent to "inactive_now($pluto_device_event_receiver)"?

Can you parenthesize the logic below to make its operator precedence properly explicit, rather than relying on Perl to sort it out?

Code: [Select]
if(new_minute 1 && !active $pluto_device_event_receiver || new_minute 1 && !active $pluto_device_command_sender)
And finally, does that script not need an initial "#!/usr/local/bin/perl" invocation, because it's imported by some other perl script as a string and eval()'d or something?
Title: Re: LinuxMCE and Misterhouse
Post by: chrisbirkinshaw on December 15, 2007, 10:19:29 pm
Hmmm. Not sure. I just created that code after looking at some example misterhouse perl files. They don't seem to use quotes .

This may help:

http://misterhouse.wikispaces.com/MotionDetection


By the way, I've now seen an even shorter message from the DCERouter to switch a light off:

69    218     1       193

This means we now have 3 ways the DCERouter may ask us to switch off a light:

69 218 1 193
69 218 1 193 97 ""
0 204 1 760 10 "C2" 154 "193"

God knows why!

Changes to code:

Code: [Select]
        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*)/
                        or $msg =~/(\w*)\s(\w*)\s(\w*)\s(\w*)/ ) {
                print_log "DeviceFrom: $1";
                print_log "DeviceTo: $2";
                print_log "MsgType: $3 (1=Command, 2=Event)";
                print_log "MsgId: $4";
                if (defined $5) { print_log "param1id: $5";}
                if (defined $6) { print_log "param2value: $6";}
                if (defined $7) { print_log "param2id: $7";}
                if (defined $8) { print_log "param2value: $8";}

                #############################################################
                # $1    $2      $3      $4      $5      $6      $7      $8
                # from  to      msgtype msgid   p1id    p1val   p2id    p2val
                # Example command from orbiter
                # 69    206     1       192     97      ""      98      ""
                # 69    206     1       193     97      ""
                # 69    205     1       184     76      "100"
                # 69    218     1       193
                # Example command from admin site
                # 0     204     1       760     10      "C2"    154     "192"
                # 0     204     1       760     10      "C2"    154     "193"
                #############################################################


Thanks,

Chris
Title: Re: LinuxMCE and Misterhouse
Post by: Matthew on December 15, 2007, 10:56:25 pm
It occurs to me that we're collaborating on development not only outside SVN, but in a Users forum thread. Will you reply to this post just once more, and I'll reply to that with a link to continuing this thread to a new one in the Developers forum? Thanks (and sorry).


Hmmm. Not sure. I just created that code after looking at some example misterhouse perl files. They don't seem to use quotes .

This may help:

http://misterhouse.wikispaces.com/MotionDetection

Here's the cleaned up code. I'm suspicious that the %motionStates values are reversed from correct (though that's in your original code), which is sent when calling my factored lmce_motion() with the "tripped" value. Note that I reorganized the main scope with executable commands first, then sub() defs appended. As I said, I can't test (though it does seem to compile with (perl -de mh.prl) ), so please test it and let me know.

Code: [Select]
# Category=Pluto
#
#@ Connection with Pluto DCE Router via TCP port localhost:3450 (mh.ini -> pluto_DCE_router).


# strict Perl syntax
use strict;


# Use timer.
$restartTimer = new Timer;


if($Startup)
{
        print_log "Starting connection to LMCE";
        set $restartTimer 10, sub {connect_lmce;};
}


if
(
        inactive_now($pluto_device_event_receiver) ||
        inactive_now($pluto_device_command_sender)
)
{
        print_log "Connection to LMCE terminated, restarting";
        set $restartTimer 10, sub {connect_lmce;};
}


# Should parenthesize &&/|| expressions to make precedence explicit
if(new_minute 1 && !active $pluto_device_event_receiver || new_minute 1 && !active $pluto_device_command_sender)
{
        print_log "Connection to LMCE still terminated, restarting";
        connect_lmce();
}


#my $motion=0;

if(my($msg) = said($pluto_device_event_receiver))
{ # Process message.
        print_log "Pluto Device Message received: $msg\n";

        # Remove quotes before splitting on whitespace.
        $msg =~ s/[\"\']//g;

        #############################################################
        # message Parameters as ordered fields
        #############################################################
        # $1    $2      $3      $4      $5      $6      $7      $8
        # from  to      msgtype msgid   p1id    p1val   p2id    p2val
        #############################################################
        # Example command from orbiter
        # 69    206     1       192     97      ""      98      ""
        # 69    206     1       193     97      ""
        # 69    205     1       184     76      "100"
        # Example command from admin site
        # 0     204     1       760     10      "C2"    154     "192"
        # 0     204     1       760     10      "C2"    154     "193"
        #############################################################

        # Decode message into required and optional fields as validation.
        my
        (
                $reqFieldsPat = '(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+(\w+)';
                $optFieldsPat = '\s*(\w*)\s*(\w*)';
        );
        if
        (
                my
                (
                        # required fields
                        $deviceFrom, $deviceTo, $msgType, $msgId,
                        $param1Id, $param1Value,

                        # optional fields
                        $param2Id, $param2Value
                )
                = ($msg =~ /$reqFieldsPat$optFieldsPat/)
        )
        { # Process valid message.
                %msgTypes =
                {
                        '1' => 'Command',
                        '2' => 'Event'
                };
                $msgType .=
                        ': ' . defined($msgTypes{$msgType})?
                                        $msgTypes{$msgType} : 'unknown type';

                # Log required fields.
                print_log <<EOT;
DeviceFrom: $deviceFrom
DeviceTo: $deviceTo
MsgType: $msgType
MsgId: $msgId
param1id: $param1Id
param2value: $param1Val
EOT

                # Log optional fields.
                if(defined($param2Id))
                {
                        print_log "param2id: $$param2Id";
                        print_log 'param2value: ' .
                                (defined($param2Val))? $param2Val : 'undefined';
                }

                # Use X10 ID as target.
                my($target);
                my $x10_id;
                %dev2x10 =
                { # device ID to X10 ID
                        '162' => 'A5',
                        '186' => 'A3',
                        '187' => 'B1',
                        '188' => 'A8',
                        '189' => 'B3',
                        '190' => 'B4',
                        '191' => 'A10',
                        '192' => 'A9',
                        '218' => 'A6'
                }; # dev2x10

                $x10_id = $dev2x10{$deviceTo};
                if(defined($x10_id))
                {
                        $target = new X10_Item($x10_id);
                }

                # Probably can convert arbitrary msgID / setting rules
                #   to %msg2Setting if they're exclusive and regular.
                if($msgId eq '760' )
                { # new item in param1
                        $target = new X10_Item($param1Val);
                }


                # Execute message on target.
                if($msgId eq '192' || $param2Val eq '192')
                { # ON
                  print_log "Turn device $x10_id ON";
                  set $target ON;
                }
                if($msgId eq '193' || $param2Val eq '193')
                { # OFF
                  print_log "Turn device $x10_id OFF";
                  set $target OFF;
                }
                if($msgId eq '184')
                { # in param1
                  print_log "Setting device $x10_id to $param1Val%";
                  set $target "$param1Val%";
                }
        } # Process message.
}


my(%motionStates) =
{
        'MOTION' => '0',
        'STILL' => '1'
};
my(%motionLocation2DeviceId) =
{
        $Hall_Motion => '183',
        $Landing_Motion => '184',
        $Kitchen_Motion => '185'
};
my(@motionLocations) = keys(motionLocation2DeviceId);
foreach my($motionLocation) (@motionLocations)
{
        if($state = state_now($motionLocation)
        {
                lmce_motion($motionStates{$state}, $motionLocation);
        }
}


# subs ########################################################################

sub connect_lmce
{
        print_log "Configuring sockets";
        $pluto_device_event_receiver =
                new  Socket_Item(undef, undef, '192.168.1.1:3450','device_event_receiver','tcp','record');
        $pluto_device_command_sender =
                new  Socket_Item(undef, undef, '192.168.1.1:3450','device_command_sender','tcp','record');


        print_log "Closing sockets if any left open";
        if(active_now($pluto_device_event_receiver))
        {
                stop($pluto_device_event_receiver);
        }
        if(active_now($pluto_device_command_sender))
        {
                stop($pluto_device_command_sender);
        }


        print_log "Open and setup new sockets";
        start($pluto_device_event_receiver);
        set $pluto_device_event_receiver "COMMAND 179";

        start($pluto_device_command_sender);
        set $pluto_device_command_sender "EVENT 179";
        set $pluto_device_command_sender "PLAIN_TEXT";
}


sub send_pluto_message
{
        my($message) = @_;


        set $pluto_device_command_sender "MESSAGET " . length($message);
        set $pluto_device_command_sender $message;
}


sub update_temp
{
        my($sensor, $temp) = @_;


        # Example message@
        # 167=temp sensor ID, 2=event, 25=event ID (temp changed), 30=value, temperature (string)
        # my($message) = "167 -1000 2 25 30 $random_number.2";


        # Map iButtons to lmce device numbers.
        my(%sensorId2LMCEDeviceId) =
        {
                0 => 166,
                1 => 167
        }
        my($lmce_device) = $sensorId2LMCEDeviceId{$sensor};

        my($message) = "$lmce_device -1000 2 25 30 $temp.2";
        send_pluto_message($message);
        print_log "Updating sensor $lmce_device $temp";
}


sub lmce_motion
{
        my($motionState, $device_id) = @_;


        # 6780=Detector ID, 2=event, 9=event ID (tripped), 25=tripped value, 1=value (tripped 0=OFF || 1=ON)
        my($message) = "$device_id -1000 2 9 25 $motionState";
        send_pluto_message($message);
}

By the way, I've now seen an even shorter message from the DCERouter to switch a light off:

69    218     1       193

This means we now have 3 ways the DCERouter may ask us to switch off a light:

69 218 1 193
69 218 1 193 97 ""
0 204 1 760 10 "C2" 154 "193"

God knows why!

Changes to code:

Code: [Select]
        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*)/
                        or $msg =~/(\w*)\s(\w*)\s(\w*)\s(\w*)/ ) {
                print_log "DeviceFrom: $1";
                print_log "DeviceTo: $2";
                print_log "MsgType: $3 (1=Command, 2=Event)";
                print_log "MsgId: $4";
                if (defined $5) { print_log "param1id: $5";}
                if (defined $6) { print_log "param2value: $6";}
                if (defined $7) { print_log "param2id: $7";}
                if (defined $8) { print_log "param2value: $8";}

                #############################################################
                # $1    $2      $3      $4      $5      $6      $7      $8
                # from  to      msgtype msgid   p1id    p1val   p2id    p2val
                # Example command from orbiter
                # 69    206     1       192     97      ""      98      ""
                # 69    206     1       193     97      ""
                # 69    205     1       184     76      "100"
                # 69    218     1       193
                # Example command from admin site
                # 0     204     1       760     10      "C2"    154     "192"
                # 0     204     1       760     10      "C2"    154     "193"
                #############################################################

I'd like to just make sure my cleaned up Perl code is working correctly before adding anything to it. The main reason to clean it up is to make it more maintainable for improvements like that one you just reported. When it's tested OK, you can upgrade it, or I'll try to get to it.
Title: Re: LinuxMCE and Misterhouse
Post by: chrisbirkinshaw on December 15, 2007, 11:18:39 pm
I'll test this later when I get home. I've spotted another possible LMCE bug.

I have a device 218 which is configured as a Light switch on/off device. When controlled from the floorplan the device works correctly:

12/15/07 09:48:13 PM Pluto Device Message received: 69 218 1 192 97 "" 98 ""
...
12/15/07 09:48:13 PM Turn device A6 ON


You can see that it is being sent an ON command. However when triggered as part of a scenario where it is set to "on" LMCE tries to set it's brightness to 100%, which of course fails as dim levels are unsupported on this on/off module. Why is LMCE trying to do this? See below:

12/15/07 09:47:02 PM Pluto Device Message received: 69 162 1 184 76 "100"
...
12/15/07 09:47:02 PM Setting device A5 to 100%
CM11 error, invalid cm11 x10 code: +0



I also have a problem trying to figure out how to get MH to report lamp status back to LMCE if they are changed by MH. I'm guessing we need to fire an event but can't seem to find a suitable one in the list on the admin website.

You're right, we should move this to the dev forum. Once I test this code we can start a new post there with the work so far.

Thanks,

Chris

Title: Re: LinuxMCE and Misterhouse
Post by: ddamron on December 16, 2007, 01:55:19 am
Chris,

Insteon is backwards compatible with X10.
Insteon controllers can send and receive X10
Insteon devices can be programmed to respond to X10 commands
Insteon devices can be programmed to TRANSMIT X10 (eg. a switch can transmit an X10 command)
Insteon devices do NOT repeat X10 commands

HTH

Dan
Title: Re: LinuxMCE and Misterhouse
Post by: chrisbirkinshaw on December 26, 2007, 06:15:17 pm
I wish we had insteon in Europe!

Have tested the code. Got this error:

Error in user code file /opt/misterhouse/data/mh_temp.user_code

  12/26/07 04:46:52 PM: Global symbol "%motionLocation2DeviceId" requires explicit package name at (eval 538) line 291.
BEGIN not safe after errors--compilation aborted at (eval 538) line 1134.
Line 286:  {
Line 287:          $Hall_Motion => '183',
Line 288:          $Landing_Motion => '184',
Line 289:          $Kitchen_Motion => '185'
Line 290:  };
Line 291:  my(@motionLocations) = keys(motionLocation2DeviceId);
Line 292:  my $light_states = 'on,brighten,dim,off';
Line 293:  my $state;
Line 294:  $timer_kitchen_movement = new Timer();
Line 295:  my $Kitchen_Motion_state;
Line 296:  my $Kitchen_Motion_state_now;


It might be an idea to install MH. It's all contained within a folder - no real install as such apart from the init script, so it's very quick to get running and non-invasive.

btw did you incorporate my last set of changes into the code?

Merry Christmas by the way!

Cheers,

Chris
Title: Re: LinuxMCE and Misterhouse
Post by: Matthew on December 26, 2007, 08:54:58 pm
It occurs to me that we're collaborating on development not only outside SVN, but in a Users forum thread. Will you reply to this post just once more, and I'll reply to that with a link to continuing this thread to a new one in the Developers forum? Thanks (and sorry).

You're right, we should move this to the dev forum. Once I test this code we can start a new post there with the work so far.

I have continued this thread as a new topic "LMCE/MisterHouse Perl Glue" (http://forum.linuxmce.org/index.php?topic=3573.0) in the Developers forum. Please direct all discussion of this code to that topic.


I'd like to just make sure my cleaned up Perl code is working correctly before adding anything to it. The main reason to clean it up is to make it more maintainable for improvements like that one you just reported. When it's tested OK, you can upgrade it, or I'll try to get to it.