A Classic ASP Proliphix API Emulator

The focus of my recent posts, and of my development during off hours of late, has been the implementation of HTTP for the DigiLinX system. The driving force behind these efforts has been a goal that I have set to replace the one-to-one dependency of the DigiLinX HVAC interface upon the AprilAire line of products. I’ve worked with AprilAire enough to establish the opinion that there must be a better, cheaper, more efficient solution.

And I found one. Proliphix is an HVAC manufacturer that offers a line of IP-addressable thermostats. I’ve been using them in my own home for over a year now, and have become a huge fan. From a homeowner standpoint, they offer a bevy of features above and beyond standard programmable thermostats. From a developer standpoint, they offer a fairly substantial, yet simple API. I’ll go into more detail about the pluses of Proliphix (and the minuses of AprilAire) in an upcoming post. For now I want to post a set of ASP pages that I have been using in my development to emulate the API.

In an ideal world, I would have a testing environment with multiple active Proliphix thermostats hooked into the small DigiLinX development environment on my desk at work. However, time and space constraints forced me to seek out an alternative way to develop my driver. My solution was to build a set of asp pages that would emulate the Proliphix API and allow me to develop my Lua driver for the DigiLinX environment.

The zip file attached to this post contains 4 asp pages. Drop them all in the same folder of an IIS web server that has classic asp enabled, and you have a mini Proliphix testing environment. If you want your environment to emulate a home with more than one thermostat, simply use another computer in the same manner. Some notes on the included files:

Proliphix.asp – this is the main file that accepts incoming API calls. It sets Application variables to the values sent in by commands, and reports back the current state of those values when asked. To learn how to use this file, refer to the Proliphix API document, available on the Proliphix web site.

ProliphixMonitor.asp – This asp page reports, in a human readable form, the current states of all major Proliphix variables. I usually keep this page open while I’m testing against proliphix.asp to see if my commands were accepted, and as a point of comparison when reviewing my HVAC driver for DigiLinX.

ProliphixConsts.asp – This is where all the API constants are defined for the first two files. The only item that you care about in this file is the first constant defined in the file. Set thisRoomName to whatever room name you wish to assign to the emulator. This is particularly useful when you want to emulate a system that has multiple thermostats.

ProliphixMethods.asp – Similar to ProliphixConsts.asp, this is simply the implementation of the set and get methods, along with some display helper methods.

Here are some examples of how to use the emulator:

To fetch the current state of the system MODE (Off, heat, cool, auto)
http://localhost/proliphix.asp?ACTION=get&OID4.1.1

To set the MODE to OFF:
http://localhost/proliphix.asp?ACTION=pdp&OID4.1.1=1&submit=SUBMIT

To get the current temperature in the zone:
http://localhost/proliphix.asp?ACTION=get&OID4.3.2.1

I hope this saves someone the trouble of having to write this themselves some day.

UPDATE: I’ve moved the emulator into my DigiDrivers project on CodePlex. You can find a link to it on my projects page.

3 Responses

  1. can your ASP Proliphix emulator be used with an actual device or is it meant only to simulate multiple devices?

  2. Not sure what you mean, exactly. You can host the asp pages on a computer and it will emulate a Proliphix thermostat. It uses the Application scope, so you can only emulate a single device per computer. However, if you want to emulate multiple thermostats, you can drop a copy of the asp files on multiple computers.

    These files are not meant to drive an actual thermostat. They’re meant to provide a testing environment that acts like a thermostat, so if you are trying to write software that works with the Proliphix products, you can do so without using an actual device.

  3. I am interested to know if you have made any progress on writing the driver for Proliphix thermostats. I agree that the Aprilaire thermostats seem antiquated in the way they interact with NetStreams or any other system for that matter.

Leave a Reply