News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

Misterhouse now intercepts Pluto messages

Started by tinia, October 19, 2005, 10:25:44 PM

Previous topic - Next topic

archived

Hi,

I've created first dirty Misterhouse script that registers message interceptor for all messages from DCE Router....

You have to follow first few steps from Aaron text message intercepting tutorial (create logic handler device) and then add this to your Misterhouse setup :

pluto_interceptor.pl

##############################################################################
$pluto_event_receiver = new  Socket_Item(undef, undef, '192.168.0.1:3450','event_receiver','tcp','record');

$pluto_command_sender = new  Socket_Item(undef, undef, '192.168.0.1:3450','command_sender','tcp','record');

if ($Startup) {
start $pluto_event_receiver;
       set $pluto_event_receiver "COMMAND 6778";
       
start $pluto_command_sender;
set $pluto_command_sender "EVENT 6778";
set $pluto_command_sender "PLAIN_TEXT";
set $pluto_command_sender "MESSAGET 22";
# intercepts all messages, I guess it's better to be selective here !!!!
set $pluto_command_sender "6778 -1000 8 0 0 0 0 0";

}
   

if (my $msg = said $pluto_event_receiver) {
       print_log "Pluto Event received: $msg\n";
       print      "Pluto Event received: $msg\n";
}


and then you should get DCE messages in MH logs.

Will continue this work, I just thought I'll post in case some other will pop in too.... Next step would be to register MH as parent device and add some child devices that will be controlled from MH as their parent and also from Pluto Orbiters and Scenarios....

HTH,

regards,

Rob.

archived

Hi Rob

after a week travelling for job, it is great to sit back on my home automation project and find this kind of news.

I didn't try it yet (I was planning to re-install MH at a later stage), but I think I will reschedule something and will give it a try very shortly.

This also push me strongly to put seriously my hands on Perl ...

Thanks for your great job

Marco