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;
That's a typo on my part. Line 291 should be
my(@motionLocations) = keys(%motionLocation2DeviceId);
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?
I didn't include those last changes you mentioned, because I don't want to code to a moving target. Once the original code you posted is correctly converted to something maintainable, I can help upgrade it to include the new functionality. But I don't know if I'll be installing MH, because I want to use LMCE to do what MH does. However, I don't mind helping with Perl, especially as it's illustrating how MH does things, which could help illustrate how LMCE could do the same things, especially in Perl. But there is a possiblity, especially if MH is able to include other HW/systems/functions that aren't already in LMCE 0710+ (or easily added).
Merry Christmas by the way!
You too. I'm in Europe myself at the moment, so even less likely to install MH, or do much else unless some random chance pops up, until sometime in the first week of January.