Thursday, February 28, 2008

Another xPLHALi Feature

I have just added support for Google Calendar events. Now you can ask HAL "What do I have scheduled for today?" and it will read your schedule for the day. With the scripting engine, you can set up VR phrases to ask it "What do I have scheduled for tomorrow?" or "What do I have scheduled for Saturday?" Again, the scripting engine makes it so easy to do things that were formerly complex or impossible to do in HAL. Scripting engine code below:

function gCal0(eventDate)
' the url below is the google 'magic cookie'
gCal0=misc.gCalEvents( _
"http://www.google.com/calendar/feeds/userID/private-magicCookie/full", _
eventDate)
end function

sub SpeechNotify(e)
select case UCase(e.sSpeech)
case "WHAT DO I HAVE SCHEDULED FOR TODAY"
xPLHALi.TTS.Speak "your calendar has the following items., " _
& gCal0(Date)
case "WHAT DO I HAVE SCHEDULED FOR TOMORROW"
xPLHALi.TTS.Speak "your calendar has the following items., " _
& gCal0(DateAdd("d",1,Date))
end select
end sub

I'm not ready to release it. I have a few more things to try out before I do.

Tuesday, February 26, 2008

Added Serial Ports to xPLHALi

Now serving up version 0.3.5. I have added a popular feature - COM port support. You can now connect to serial devices not supported by HAL. All this can be done in the scripting engine. Sample code is included in script.vbs in the zip file to connect to a Cheapertronics RFID reader and track cars, people, etc. There is also sample code to connect to the W800 RF receiver. The app supports up to 2 serial connections. I will change the name of the app at some point since this is much more than just xPL now.

Monday, February 25, 2008

Quick Update to xPL HALi

I've added a couple new features, updated the example vbs script and updated the app to 0.3.1. Download link stays the same as in the previous post as I'm too lazy to update it.

I added a couple features for scripting: upon startup, the subroutine "Init" from your script file will execute. On shutdown of the app, the sub "Cleanup" will run. If you do a script reload, "Cleanup" will run followed by "Init".

The script.vbs file now has examples of Init and Cleanup. It shows how you can create a VR phrase in your script and has sample code showing how to handle the response to those phrases.

Another cool feature of the scripting engine is the ability to integrate all sorts of ActiveX objects. In the script.vbs sample, I've included commented out code to update an Excel spreadsheet every time a flag changes.

Sunday, February 24, 2008

xPL HALi 0.3 Released

I have released the latest version of xPL HALi. It features full scripting support for VBScript, JScript, Python and Perl. I have moved 99% of my logic out of HAL (which wasn't a lot to begin with) into the scripting engine. Code executes faster, is easier to edit and is a lot more flexible. There are previous posts in my blog with more information on the app (xPL and VR features).

In the zip file you'll find a directory called 'samples' that contains sample scripts in all 4 languages. In the main directory is 'script.vbs' that is a more thorough example and shows all the events of HALi that I have chosen to expose to the scripting engine. Note also, the call to print a message to the lower debug screen, which may be helpful debugging scripts. Since I use very few aspects of HAL, a majority of the events are not tested so good luck with those.

The lower debug screen will also print out standard error messages related to scripting either at load or runtime. If you have a script problem, you can edit it and click the reload button to re-initialize the scripting engine. No need to restart the app.

To run this app, you'll need .NET 2 and .NET 3.5 and obviously a version of HAL that supports HALi.

updated link to point to 0.3.5 version

Friday, February 22, 2008

HAL's New Scripting Engine - xPL HALi

I just finished adding a scripting engine into xPL HALi. Now, there's no reason at all to create any IF/THEN logic inside HAL. No more painful point and click to create logic. Now, it's possible and easy to create very complex logic. The engine currently uses only VBScript but it seems pretty easy to make it support JScript, Python and Perl. I uploaded a short video of it in action.

Wednesday, February 20, 2008

Windsurfer WiFi Antenna Booster

I just made one of these in about 10 minutes with a piece of aluminum foil, some glue and a printout of the template. I did a quick test and the signal strength went from about 80% to 100%. Not bad. Here are some YouTube videos about the antenna.

This is a picture of it on one of our wireless routers:



xPL HALi 0.2 Released

Testing went faster than I thought so I'm releasing version 0.2 of xPL HALi. Read the sample config.txt file in the zip for instructions on how to add commands. Have at it.

Tuesday, February 19, 2008

New Version of xPL HALi Coming

I've been working on changes to xPL HALi to make it more than just an xPL-HALi bridge. It will now read in a configuration file that specifies VR phrases and associates a number of xPL commands with that phrase. This will give you have the ability to directly issue xPL commands from VR.

A sample line in the config file will be a comma separated list:

turn off bass amp,i have turned off the bass amp,xpl-cmnd,doghouse-scu.xyz,x10.basic,device=BassAmp,command=off

In response to the phrase "turn off bass amp", xPL HALi will issue an xpl-cmnd of schema x10.basic to app doghouse-scu.xyz tellin it turn off the BassAmp. HAL will confirm the phrase by saying "i have turned off the bass amp" via TTS.

Look for it to drop in the next few days after I've had some time to test it.

Monday, February 18, 2008

Cheap 350VA UPS at Staples $19.99 AR

Cheap APC UPS $19.99 AR with free shipping too. Use the Staples Easy Rebate to file it online so there's nothing to mail or photocopy. This is perfect for security cameras, etc.

Saturday, February 16, 2008

Video of xPL Gmail in Action

Here's a video of the xPL Gmail script I hacked together the other day. On the right of the screen is an RDP session to the HA server showing xPL Gmail running in a command prompt and the DCM message viewer below that. To the left is our HA GUI. I just added the capability of displaying osd.basic messages to our GUI.

A test email is sent to the monitored Gmail account. xPL Gmail polls for new mail periodically and when it finds a new message, it issues an osd.basic xPL message which is captured by the DCM logger. xAP Floorplan grabs OSD messages and dumps them into the HA MySQL database which our GUI pulls data from. The message gets displayed in the GUI for a short time before disappearing.

Friday, February 15, 2008

xPL Gmail Notifier

I've taken the Python source for Gmail Notifier and modified it (with code from the Python xPL Toolkit) to issue an xPL osd.basic message when it encounters a new email message. Since it's Python, you can easily modify notifier.py to change the xPL message to whatever you want. I'll leave that as an exercise to you. A few things, before you grab the zip file (comments I left in the code):

# * changes to remove the tray icon as pytrayicon is not
# supported in windows
# * removed the popup that notifies of a new email
# * added xPL support to generate osd.basic messages
# containing sender of new email
# * since there's no tray icon, you cannot reconfigure from the gui
# after you've configured once before. therefore if you need to
# change your settings again, edit .notifier.conf located in
# c:\documents and settings\your_login

You'll need to install a few things first besides Python - PyGTK and GTK. Go here and follow the directions for PyGTK for Microsoft Windows. Finally, here's my zip file.


Wednesday, February 13, 2008

AT&T DSL Pricing Going Up

We have Comcast at our main house and AT&T DSL at our other. The price of DSL is going up $5 per month starting this month! That's a 25% increase over what we're paying for 1.5Mbps service. The service is pretty bad as it is but we don't use it that much. No wonder the US has the worst/priciest Internet experience - pretty sad considering we invented the Internet. That's what happens when there's no competition and you allow all the regional bells to merge together. Funny that AT&T announced "free" hotspot access for many of their broadband customers a few weeks before they announced their raising broadband prices. Free my ass.

If you are staying with AT&T, like we are, because there's no cheaper alternative, then hit this link to lock in your current rate for 1 year before you start financing their "free" wifi hotspots.