Monday, June 23, 2008

UPB Functionality Moved

I'm having some issues with multiple serial ports interacting in starCOMUltra and Bill is taking a look at it. Basically, what I have is a WGL800 attached to one serial port and the UPB PIM on another. I was trying to send a UPB command out one serial port after it receives a wireless X10 signal from the WGL800, but for some reason it locks sCU. While Bill is investigating this problem, I added a serial port to my xPL sCU app and moved the PIM there. It was a very smooth transition as I just had to copy the jscript I was developing on sCU to xPL sCU. Now, UPB functionality in the system is controlled by xPL. This adds another layer of communication to get UPB going, but it's transparent to the user and UPB is much faster than X10 so it's not noticeable. When the sCU issue is resolved, I can just copy everything back to the sCU script and be up and running in no time.

Once I got the basic communication established, I was able to work more on integrating UPB. As we are running both X10 and UPB, and sCU and the TimeCommander+ have no UPB support, I had to implement a method to maintain state of non-X10 devices. We already have state mirrored in mySQL and the database is accessible in jscript, sCU and our web interfaces, so this was the logical place to dump UPB device state. After I got all that worked out, I implemented register reads and writes from/to the PIM, UPB device queries and handling of status responses. I also added code to handle status reports from devices when local control turns on the device. I threw in some error handling to retry commands for PIM busy and device NAK conditions. Finally, I coded a function to parse the UPStart export file so that both sCU and xPL sCU have the most updated list of UPB devices. All this achieves the basic level of UPB functionality I initially set out to do. I have some kinks to work out as some things aren't quite working perfectly yet, but when that's done, I'm going to park the UPB stuff for a while and work on other projects. In the future, I want to take a look at other UPB features, like links, etc.

Sunday, June 22, 2008

RFID Battery Mod Follow Up

It's been almost 6 months since I did the battery mod for the RFID receivers. All 3 transmitters are going strong. This is what I was looking for in terms of battery life, especially since the form factor with the battery pack isn't an issue. I did extend the antenna on the receiver some time ago. The range is pretty decent and I'm able to pick up the cars before they reach the driveway.

Thursday, June 19, 2008

UPB Integration

I finally got around to working on integrating UPB with our system. I picked up an HAI Serial UPB PIM and started building support for it into starCOMUltra using its serial port feature. I wrote a lot of miscellaneous functions in the sCU hosted script in order to create the UPB packets. I had to build a couple more tasks to take care of mapping devices to their proper control tasks since we will be running a mixed UPB and X10 environment. There's still further integration needed, such as using the device names as defined in WinEVM, but designating which are UPB. This will make it easy to keep the ASP pages working without too many changes. Then I need to pull in the data from the UPStart file to map the device names to UPB address. So much to do and so many other projects going...

Tuesday, June 17, 2008

Client-Server with HAL

With my xPL issues out of the way, I was able to get to testing my new app. I'm not quite sure what to call it. It started out as a way to make HAL talk via SAPI instead of HAL Voices or its default voices, as I have a 2nd copy of HAL Deluxe. However, I'm not really interested in forking out $30 again for HAL Voices, which are just repackaged AT&T Natural Voices and I already own that.

I finished up a first pass last night & learned more about GUI stuff using VB 2008 Express Edition. Here's a look at the app:



One copy of the app runs on the server, where the HAL master resides. Other copies can run on other machines, or clients. You configure it with the GUI. The client interfaces with the VR on the local machine and sends the recognized phrase, over xPL, to the server copy of this application. The server copy then pushes that into the master HAL copy, which performs whatever action is requested, and sends a TTS response back out over xPL to the client. The client will then play the TTS response using either SAPI or a HAL voice, depending on what's configured.

Here's a short video of it in action. The client is on the left, the master is on the right in an RDP session. The next thing to do will be to figure out how to push the VR phrases from the master HAL to the client so it's aware of all the added phrases in the master.

Monday, June 16, 2008

xPL Network Problem Resolved!

I've been having problems with an xPL install on one of our laptops. It has both ethernet and wireless networking, with one shutting off when the other is active. There is an xPL network setting, specifying which addresses to listen to for xPL messages. (It can be set using xPLHAL.) By default, it is configured to use "ALL" interfaces, but for whatever reason it is not working on my laptop. I changed the Listen To setting to the ethernet IP address (which is what it's connected to the most), and voila - we have xPL working! However, I can't use xPL wirelessly unless I change the Listen To address. Sounds like that'd be a good xPL app to switch that when networking changes - at least until that's fixed with the hub. Still, the xPL hub needs to be restarted when you change network adapters. That's not very convenient.

I have a feeling this will resolve the problem I was having with xPL dying after installing the bluetooth adapter on another machine. The bluetooth adapter also creates a network device and is probably confusing xPL the same way the wireless adapter was.

Thursday, June 12, 2008

xPLAudreyTTS released

I have released the first version of xPLAudreyTTS here.

Dusting off xPLHALi

It's been a while since I worked on xPLHALi. I made just a small change to it, making the xPL portion of the script engine more generic - meaning it can see all xPL messages (other than config and heartbeats) - so there's no need for an external scripting engine. It's more a feature for other users since I already have my xPL/xAP scripting engine. I plan on adding an option to disable this feature if desired. I may add support for xAP messages to the scripting engine and am thinking about a bridge to connect 2 instances of HAL over xPL.

I've finished up the config stuff for xPLAudreyTTS. I have a dropdown box to choose the default voice. I just need to create instructions and zip everything together. The rest of the config will be from a text file. It's a simple interface:



Wednesday, June 11, 2008

xPLAudreyTTS Update

I ran into a few more stumbling blocks when I discovered I can't just send xPL messages to non-existent xPL devices and have my app grab them. Apparently, the xPL hub doesn't forward packets for non-existent devices. That means I had to create xPL listeners for each Audrey I want to send TTS to, like Medianet does for each player. I eventually got it all sorted out last night and have started some testing of it. If all goes well, I'll post it up here.

In the meantime, I've been testing my xPL/xAP/starCOMUltra scripting app. I've converted all my Floorplan scripts and have turned it off a couple days ago. After a few problems in my script, I got a clean run with it overnight, no small feat considering my system pumped out 21 xAP messages/minute and about 10 xPL messages/minute overnight.

Tuesday, June 10, 2008

xPLTTSAudrey

Last night, I started writing a VB.net app to push TTS to our 3Com Audreys. It's been taxing my amateur programming skills. I've been giving myself a crash course on SAPI, launching external processes, and just when I thought I had it all figured out, I had to learn about threads. I think I've got it all working though, I just need to figure out how I'm going to direct TTS to the various Audreys around the house. I suppose a config file that maps Audrey IP addresses to xPL target names will work.

Anyway, it works by picking up xPL tts.basic messages sent to it. It extracts the speech data, does a text to WAV conversion, runs LAME on the resulting WAV file to create an MP3, then does an HTTP get from the specified Audrey's web server to push the MP3 to it (using this method).

Monday, June 9, 2008

Nokia 800 Arrives!

My replacement Nokia 800 just arrived. I haven't had a chance to play with it yet since it's charging right now. The unit itself looks brand new as promised, but the USB cable and power supply look used. Not a big deal. I will miss the hard case of the 770 as this only has a pouch to cover it.

Friday, June 6, 2008

Phasing out xAP Floorplan

I have been using xAP Floorplan for a while as my xPL and xAP scripting engine. It's an awesome package, but I don't really need all the extra auto-generated things and I have my own floorplan interface. I prefer to code up my own triggers rather than having to do it through a web interface. I also would rather program in JScript, but Floorplan only supports VBScript. Finally, I don't really want to bridge xPL to xAP - I'd rather just operate on the raw xPL messages. These are just my personal preferences. xAP Floorplan has been extremely stable & James has always been a responsive developer, and I highly recommend it for anyone interested in a scripting engine for xAP and xPL. I do still use many of his other apps.

I've been slowly working on what was xPL sCU. I've added a full scripting engine to it and support for xAP. I can trigger off of xAP or xPL events from within the same script file since I prefer to have everything in one gigantic script. Now I can code in my preferred JScript (although it will work with VBScript, PerlScript and PyScript too). And of course, I will have direct access to starCOMUltra. I've added all the hooks I need to app and I've been migrating Floorplan scripts over to my scripting engine. I'm about 40% through the conversion process. It's a little tedious but worth it to me.

PayPal Sucks

After having to create a new personal PayPal account, I ran another auction for some home automation equipment and used my new PayPal account as the payment account (hoping it would not be a credit card transaction). It wasn't and everything went smoothly...until later in the day I received a phone call from a PayPal support person. He was trying to check if I had indeed set up the auction and the new PayPal account. The problem is, he was a complete ass about it. He had a very antagonistic tone and kept asking if am I planning on shipping the items. He also kept asking where I'm getting the items from, practically accusing me of setting up a fake auction and PayPal account to scam someone. I asked him was this really necessary? Does he need to know where my items are from? But he was very insistent. Obviously, I'm shipping something as I had already purchased and printed out a UPS shipping label using my PayPal account. I appreciate they are trying to prevent fraud, but learn some customer service skills if you don't want to alienate more customers. He didn't even bother asking me to verify any account information to determine if I was really the owner of the eBay and PayPal accounts.

Thursday, June 5, 2008

Nokia Comes Through

After not hearing an email response from Nokia support, I called their support line yesterday. I was told that since it has been in repair for over 30 days, I should expect a call from their Executive Resolution team in about an hour. I wasn't called though. This morning, about 20 hours later, I received an email asking me to call their Executive Resolution department. I was told, as a one time gesture, due to the delays with the repair of my Nokia 770, they would replace it with a brand new Nokia 800. Needless to same, I am very pleased with the outcome. After faxing a form back and forth, it should be about a week or two before I have my replacement in hand. Thank you Nokia, although I still have another 770 from the same purchase that I will always wonder when it will WSOD.

Wednesday, June 4, 2008

More Negative News About eBay

Trouble at eBay

I Want the HTC Touch Pro!

The QWERTY sibling to the HTC Diamond has officialy been announced. It should be in the States toward the end of the year, just in time for my cell contract to be up for renewal.

Tuesday, June 3, 2008

Emailing Nokia (Lack of) Support

I've sent a couple emails to Nokia support to find out what other options I have regarding my dead 770. I contacted them on the May 15th and they responded on the 15th. I also emailed them on the May 21st and we exchanged 6 emails all within hours of each other. I sent an email May 29th and they have yet to reply, so I emailed again 6 hours ago and I'm still waiting. My thread must have been flagged for ignoring. That way they can keep claiming Nokia is unaware of this white screen of death problem. I suppose if they admitted it, they would be open to class action lawsuit. If people are suing over returning crap to Fry's, this certainly would merit legal action.

On a positive note, I purchased the 770s with my American Express card so my manufacturer warranty is doubled to two years. Although, I think I'd prefer to have Nokia refund my money so I can get some Atom based UMPCs later this year.

eBay Really Does Suck

A BusinessWeek article pretty much summarizes how I feel about eBay, after recently selling stuff there for the first time in two years.

Monday, June 2, 2008

Installed a UPB Phase Coupler

I just removed my Leviton Signal Bridge and installed an HAI UPB Phase Coupler. It was a quick installation since I already had the breakers and junction box installed. I ordered it from Automated Outlet and Martin over there has always been very helpful.

I picked up a bunch of HAL labeled UPB lamp and appliance modules so I'm going to start experimenting with some UPB devices. I'm going to run a hybrid X10 & UPB environment (the UPB coupler bridges both UPB and X10), but I'm not quite sure how I'll do it yet. The TimeCommander+ only supports X10 so I have a serial UPB PIM coming. I'm not sure if I'm going to rely on existing xAP or xPL to UPB bridges, or write my own and connect it directly to starCOMUltra, since that is where most of the automation is centralized.

eBay Sucks

I've been selling some items on eBay for the first time in a couple years. I have always said in my auctions that if you are paying by PayPal and funding with a credit card, the buyer should contact me for a different PayPal account. Why? Because the only PayPal accounts that can accept credit cards are Business and Premier and if you have those accounts, they will take 2.9% out of the total for EVERY transaction. So, I maintained a personal account and a premier account for credit cards. Now, if someone doesn't know how to read and pays for my auction with a credit card, I cannot decline their payment. I HAVE to convert my account to a premier account. My guess is PayPal wants to eventually get rid of all those personal accounts so they can take 2.9% out of every transaction, even if I'm just sending cash to my friend who paid for lunch the day before. Sure I can create another personal PayPal account, but it's a pain in the ass. I'd rather sell stuff on Craigslist and get paid less for it than to get continuously nickel & dimed by eBay.