Wednesday, September 8, 2010

Bridging xPL Revisited

I originally talked about bridging xPL across the Internet using EventGhost in this post. More recently, I wrote about pulling the sender/receiver plugins out of EventGhost here. I did that but haven't gotten around to cleaning up the code. The problem with either of solution is that it's not very secure, so I've always tunneled them through SSH. If either Internet connection goes down, I have to manually restart the SSH session (since leaving my password and keys lying around so I can automate the login probably isn't a good idea).

Instead, I've decided to bridge the connection using IM with our Blabber app. I just set up 2 GMail accounts, one for each house, and added one to the other's chat list and fired up the local and remote Blabber apps. I wrote a script to capture certain xPL messages and embed them in an xPL message sent to Blabber. On the receiving end, the xPL message generated by Blabber is parsed out in my xPLSCU scripting engine.

The big advantage is there's no need to manually set up SSH tunnels as the messages go over Google's chat server encrypted with TLS. If the link goes down, Blabber will just keep trying to send messages until the link comes back up. No manual intervention necessary. I've had it running for a day now and it seems to be working out well. I've already had the remote ISP connection go down for about an hour, and when the cable modem was automatically restarted, the Blabber conversations continued on their own. Very cool! For added security, you can also encode your messages before sending them to Blabber.

No comments:

Post a Comment