Showing posts with label UPB. Show all posts
Showing posts with label UPB. Show all posts

Tuesday, June 30, 2009

Somewhat Quiet Last Few Months

I've been a little preoccupied with other things, but I have been working on some small projects here & there. I just haven't felt like writing about them. I'll try to summarize what I've been doing for the past several weeks/months.

Last night, I hardwired the sensor that detects when our alarm is armed. Originally, it was a CDS cell covering the armed LED on one of the alarm keypads. The sensor was then connected to the CDS input of an X10 Hawkeye. It worked well 99% of the time, but once in a while, it would a miss detecting a change due to some RF collision. Not a major problem as the alarm is completely separate from the HA system, but annoying for automating events. So, I ran a pair of wires from the CDS cell at the keypad to the wiring closet. I terminated it on the X-Axis of the third gameport controller I've deployed. It works perfectly now.

I've gotten fairly adept at fishing wire with no special tools. For the CDS wire, I routed it from eyelevel where the keypad is to just above the baseboard. I used a string with bolts tied on and dropped it into the wall from an eyelevel hole. I drilled a small hole above the baseboard and used a vacuum to suck the string out. I then fished the wire through by taping the string to it.

I also added a 2nd HDHomerun (which also involved fishing wires - some Cat-5E and RG6.) I have it currently connected to an HD antenna in the attic.

I've been slowly deploying more of the UPB modules I got on clearance from Fry's. As my UPB network got bigger, I started to notice some limitations in my handling of it. I wrote my own code to handle UPB since my old TimeCommander+ does not have the capability. It resides in my xPL starCOMUltra bridge as described here. It's actually just a generic serial interface in the bridge. All of the actual code handling UPB is in the hosted JScript.

To make a long story short, I was having problems with retries and sending commands to the UPB PIM too fast. I solved this by adding JScript code to build a command queue and beef up the retry/busy/NAK logic. It uses the built in Queue structure, similar to JavaScript and described here.

I also bought a couple more HP thin clients off of eBay. I am now planning on installing .NET on them, so I've also purchased these 512MB flash disks so I have enough room for it (.NET needs about 150MB free on the C: drive). I also found some cheap 512MB RAM upgrades as well. One will be deployed at our other house for more minor automation projects and the second one will replace the current T5700, which functions as a networked contact closure device. I want to test out & phase in the new one before taking the existing one offline to upgrade and move elsewhere in the house.

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.

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...

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.