Update: Foxit Reader has a problem as well, but they released a new version on 3/9/09
Thursday, March 5, 2009
Adobe Acrobat Reader Vulnerability
In case you're unaware, there is a major problem with Adobe Acrobat which doesn't even require you to open a PDF file. The best thing to do? Uninstall Acrobat Reader and install Foxit Reader. Foxit Reader is much lighter on resources as well.
Update: Foxit Reader has a problem as well, but they released a new version on 3/9/09
Update: Foxit Reader has a problem as well, but they released a new version on 3/9/09
Tuesday, March 3, 2009
xPL Gameport Enhanced & Released
This weekend, I was trying to add a CDS sensor in the family room to more accurately sense darkness. It works great with a DS10A, but I wanted to hardwire it to make it more reliable. I tried connecting it to an input on my gameport device that I use for contact closure detection, but the resistance of the CDS sensor with the light on is apparently too high for the gameport to detect a closed condition. What else can I use? What about using the X and Y axis inputs on the gameport as analog inputs? So that's what I did. I updated my gameport app to read the axis values and send out sensor.basic messages on changes. I had to add a larger debounce delay when sampling since the CDS input bounces a little when changing. In any case, it's up & running for a couple days now and works well.
This is probably one of my most favorite apps I've written and I know I haven't released it yet, so here it is. You'll need a config.txt file in the same directory. For each gameport you have hooked up, you'll need to label the inputs - 4 button inputs and 2 axis inputs. The final parameter will be the polling time in ms. The polling interval for the axis inputs in derived from the polling time specified in the file.
config.txt format:
<gameport0_button0>,<gameport0_button1>,<gameport0_button2>,<gameport0_button3>,<gameport0_xaxis>,<gameport0_yaxis>,<polling interval>
example:
garagedoor,doorbell,blank02,blank03,FRDark,yaxis0,50
If you have more than one gameport connected, then specify all the inputs first, then the polling interval (all on a single line):
garagedoor,doorbell,backdoor,garagemotion,FRDark,yaxis0, amppower,dvdpower,tvpower,blank13,xaxis1,yaxis1,50
Finally, don't forget to install the DirectX redistributable runtime from here.
I have only tested the app with the Super Joy Box 8 USB to gameport adapter, which has 4 gameports and gives you 16 digital and 8 analog inputs for about $20.
This is probably one of my most favorite apps I've written and I know I haven't released it yet, so here it is. You'll need a config.txt file in the same directory. For each gameport you have hooked up, you'll need to label the inputs - 4 button inputs and 2 axis inputs. The final parameter will be the polling time in ms. The polling interval for the axis inputs in derived from the polling time specified in the file.
config.txt format:
<gameport0_button0>,<gameport0_button1>,<gameport0_button2>,<gameport0_button3>,<gameport0_xaxis>,<gameport0_yaxis>,<polling interval>
example:
garagedoor,doorbell,blank02,blank03,FRDark,yaxis0,50
If you have more than one gameport connected, then specify all the inputs first, then the polling interval (all on a single line):
garagedoor,doorbell,backdoor,garagemotion,FRDark,yaxis0, amppower,dvdpower,tvpower,blank13,xaxis1,yaxis1,50
Finally, don't forget to install the DirectX redistributable runtime from here.
I have only tested the app with the Super Joy Box 8 USB to gameport adapter, which has 4 gameports and gives you 16 digital and 8 analog inputs for about $20.
Monday, March 2, 2009
Sample EventGhost Python Script for Parsing xPL Messages
To make my EventGhost xPL plugin really useful, you really need to be able to pick apart an xPL message to extract data from it. Luckily, EG allows you to associate a script with a macro. This makes it pretty simple to create complex interactions based on xPL messages. Just create an event to trigger on 'xPL.*' and add an action to it that's a Python script. Here's a sample script that sends an acknowledgment message when Blabber receives the word 'test' from a user. This script can easily be extended to handle all your xPL interactions.
import re
# split up the event components
xPLSplit = eg.event.suffix.split(':')
# make the pieces easy to remember
xPLType = xPLSplit[0]
xPLSchema = xPLSplit[1]
xPLSource = xPLSplit[2]
xPLTarget = xPLSplit[3]
xPLBody = xPLSplit[4]
# we only want xpl-trig messages
if xPLType == "xpl-trig":
# only want messages from blabber
if re.search('doghouse-blabber',xPLSource):
bodySplit = xPLBody.split(',')
# extract the components of the message body
for i in range(3):
if re.search('device',bodySplit[i]):
senderSplit = bodySplit[i].split('=')
elif re.search('type',bodySplit[i]):
typeSplit = bodySplit[i].split('=')
elif re.search('current',bodySplit[i]):
currentSplit = bodySplit[i].split('=')
# we only want the message type and messages that
# contain the word 'test'
if typeSplit[1] == "message" and currentSplit[1]=="test":
# if we get 'test' we'll reply back to the sender
# that we got his message
returnMsg = "device="+senderSplit[1]+"\n"+"current=EG got your test"
eg.plugins.xPL.sendxPL(u'xpl-cmnd', u'control.basic', xPLSource, \
returnMsg)
Don't Pay Regular Price for Your Monthly Services
I just got off the phone with DirecTV who offered me $10 off per month for the next 12 months, free HBO for 3 months and Starz for 6 months. They had even offered free HD for a year with a free HD DVR, but I declined as I'm still considering the SageTV route. It's an annual ritual for me, calling them when my current promo ends, and getting a lower price with some extras. If you have DirecTV and are out of contract, call them and say 'cancel' when the robot asks what you are calling about. When you get to a CSR, tell them about the great deal DISH or Comcast is offering you and that you'd really like to stay with them but the other deals are so much less. You should never pay regular price for cable or satellite service - especially in this economy. I also do the same thing every 6 months with my Internet provider, Comcast. Cellphone bills may also be up for negotiation if you're out of contract. Our is as good as it can get. We're on the Sprint SERO plan until they go under for $30/month, 500 minutes, unlimited data & SMS, 7-7 N&W.
HAL Thinks the Piano is a Person
I was messing around with HAL microphone VR last week and ran a mic from the HA server to the living room. It worked decently when I was the only one home. However, when my kids started practicing piano, HAL went crazy. Every 10 seconds, it would think its attention word was called - despite attempts to adjust the selectivity higher. Not only that, but once the piano had HAL's attention, it was able to tell it to "set the mode to normal" and "turn on nook light" and "good bye." Needless to say, the microphone has been disconnected.
Sunday, March 1, 2009
Zephyr Bluetooth Heart Rate Monitor
I just received a Zephyr HRM - a heart rate monitor that sends its data to a PC or smartphone via Bluetooth. It was a reasonable $99 + $30 for FedEx Priority shipping from New Zealand to the States. It shows up as a Bluetooth serial port after pairing with a PC so it makes it very easy to development a .NET application for it. I've currently got code running to talk to the device, verify the integrity of the data packet (CRC) and update new heartbeat timestamps. I'll be using it to track my workouts at home. I may even get adventurous and try to write an app for my WinMo HTC Touch Pro phone, but that will be some time in the future.
Saturday, February 28, 2009
xPLGCal - Reminders From Your Google Calendar
This is a first release of xPLGCal. This app scans your Google Calendars every 15 minutes and sends an osd.basic message if an event is starting within 15 minutes. It will check up to 4 calendars. To use it, just create a config.txt file specifying a name and an associated Google Calendar "magic cookie." There's no need to explicitly store the Google password using this method. Here's how to find your GCal magic cookie. Make sure to replace 'basic' with 'full' on the magic cookie URL.
Your config.txt file contains a single line and goes in the same directory as the binary and will look like this with two users (John and Jane):
John,http://www.google.com/calendar/feeds/johnjohnjohn%40gmail.com/private-a33868799adfe999399e992939949edc/full,Jane,http://www.google.com/calendar/feeds/jp47574%40gmail.com/private-0123456789abcdef01234567890abcde/full
Now, just fire it up...
Your config.txt file contains a single line and goes in the same directory as the binary and will look like this with two users (John and Jane):
John,http://www.google.com/calendar/feeds/johnjohnjohn%40gmail.com/private-a33868799adfe999399e992939949edc/full,Jane,http://www.google.com/calendar/feeds/jp47574%40gmail.com/private-0123456789abcdef01234567890abcde/full
Now, just fire it up...
Sunday, February 22, 2009
BlueTracker Released
I'm releasing my BlueTracker application which tracks bluetooth devices and issues updates over xPL. It currently works with only the Microsoft BT stack, but you can hack your BT dongle to use the Microsoft stack. I don't have any Widcomm devices so it doesn't have any support for that driver - but it should be easy enough to add when the 32 Feet.NET SDK is released with Widcomm support (It's in Beta currently). You can read my previous posts on BlueTracker to get an idea how it works. Grab it.
Saturday, February 21, 2009
Trying Out Gigabit Ethernet
Since I've been toying with the idea of SageTV as an HD DVR, I've been thinking about converting part of my LAN to run GigE. Our house was built in 1999, before Cat-5e was standardized, so we've always had a 100 Mbps network on plain old Cat-5. We also only put in 2 runs of Cat-5 per location, so I ended up splitting the Cat-5 runs for the LAN (2 pairs for the LAN and 2 pairs that I could use for other low voltage needs). However, GigE needs all 4 pairs. As a test, I freed up 2 pairs on one of the living room runs, allowing me to have all 4 pairs in one run. I was able to link up two D-Link GigE switches over that run at gigabit speed. I put a cheapo Airlink GigE NIC in the HA server but I don't have any other GigE devices to test the throughput I can get over my wiring. I guess I'll find out when I eventually build a Sage server with a GigE NIC.
Update: I put another Airlink GigE NIC in our kids' computer and was able to get around 250 Mbps file transfers - not bad running over 10 year old Cat-5 wiring, Cat-5 jacks and a Cat-5 patch panel.
Update 3/22/09: I'm now seeing about 400 Mbps to our new media server with the same Airlink card.
Update: I put another Airlink GigE NIC in our kids' computer and was able to get around 250 Mbps file transfers - not bad running over 10 year old Cat-5 wiring, Cat-5 jacks and a Cat-5 patch panel.
Update 3/22/09: I'm now seeing about 400 Mbps to our new media server with the same Airlink card.
Tuesday, February 17, 2009
Blabber - an xPL Jabber Gateway
A couple months ago, I added Jabber functionality to my xPL sCU application. I've decided to make the Jabber portion available as a standalone xPL app called Blabber. This app will let you use IM to send it messages, which you can use in your automation scripts. It also allows your automation system to send instant messages back to you.
First, you'll need to set up a Jabber account which Blabber will use. Google probably has the most reliable Jabber server and it's what I use. Add your personal IM account to the Blabber account's roster. Once that's done, you can set up your config.txt file. It's just a single line file:
<user name>,<server>,<password>
For example, assuming your Blabber account is xplblabber@gmail.com then your config.txt file would be as follows:
xplblabber,gmail.com,your_password
After you've saved config.txt in the Blabber directory, you can start it up. You'll notice a debug window that prints information messages. Now you can interface to it.
When you IM with Blabber, it will generate sensor.basic messages:
source = doghouse-blabber.xyz
dest = *
type = xpl-trig
sensor.basic
{
device=your_email@gmail.com/gmail.some_resource_numbers
type=message
current=the text of the message you sent
}
Blabber will also keep track of your status:
source = doghouse-blabber.xyz
dest = *
type = xpl-trig
sensor.basic
{
device=your_email@gmail.com/gmail.some_resource_numbers
type=status
current=available
}
One thing you can use IM for is if you're not home, you can create a script that will forward the contents of osd.basic messages to you over IM. Just create a control.basic packet like this:
dest = doghouse-blabber.xyz
type = xpl-cmnd
control.basic
{
device=your_email@gmail.com/gmail.some_resource_numbers
current=somebody rang the doorbell
}
Download Blabber. I've only tested this on XP, but it should work on Win2k.
First, you'll need to set up a Jabber account which Blabber will use. Google probably has the most reliable Jabber server and it's what I use. Add your personal IM account to the Blabber account's roster. Once that's done, you can set up your config.txt file. It's just a single line file:
<user name>,<server>,<password>
For example, assuming your Blabber account is xplblabber@gmail.com then your config.txt file would be as follows:
xplblabber,gmail.com,your_password
After you've saved config.txt in the Blabber directory, you can start it up. You'll notice a debug window that prints information messages. Now you can interface to it.
When you IM with Blabber, it will generate sensor.basic messages:
source = doghouse-blabber.xyz
dest = *
type = xpl-trig
sensor.basic
{
device=your_email@gmail.com/gmail.some_resource_numbers
type=message
current=the text of the message you sent
}
Blabber will also keep track of your status:
source = doghouse-blabber.xyz
dest = *
type = xpl-trig
sensor.basic
{
device=your_email@gmail.com/gmail.some_resource_numbers
type=status
current=available
}
One thing you can use IM for is if you're not home, you can create a script that will forward the contents of osd.basic messages to you over IM. Just create a control.basic packet like this:
dest = doghouse-blabber.xyz
type = xpl-cmnd
control.basic
{
device=your_email@gmail.com/gmail.some_resource_numbers
current=somebody rang the doorbell
}
Download Blabber. I've only tested this on XP, but it should work on Win2k.
Monday, February 16, 2009
Subscribe to:
Posts (Atom)