You are here: Reference for External Control Systems > Using PuTTY to Test External Control Systems

Using PuTTY to Test External Control Systems

The Halogen/HAL external control message protocol is ASCII text based, which means that you can use a standard telnet client to connect to the control server and exchange messages. This is often useful when developing and testing a HAL configuration that contains external controls, either to monitor the operation of your external control system or to serve as a simple form of external control system before the production system is ready or available.

Any telnet client will work, but this section shows how to do this with PuTTY, an open source telnet client application that is free, easy to install and use, and runs on all versions of Windows.

How to obtain and install PuTTY

The top level web page for PuTTY is http://www.putty.org. That page contains a link to a page that has links for downloading the PuTTY application. All you need is the latest release version of putty.exe for Windows on Intel x86. Download this file and put it in an accessible folder on your PC. Since the complete installation is a single file, putting it on the desktop works great.

Starting PuTTY and configuring it for communications with the Halogen control server

Start PuTTY by double clicking on the putty.exe file. This brings up the PuTTY Configuration window:

To connect to the Halogen external control server, do the following:
  1. Start Halogen and load your configuration that contains the external controls you’d like to test
  2. In the PuTTY configuration window:
    1. Enter localhost in the Host Name text box
    2. Change the Connection type to Telnet
    3. Change the port number to 4996
    4. Click the Open button

To connect to the HAL external control server, do the following:
  1. Start Halogen and Apply your configuration that contains the external controls you’d like to test to the HAL.
  2. Open the HAL property dialog by double clicking on the HAL title bar in the Halogen Hardware Workspace.

  3. Observe the HAL's configured IP addresses and pick one that you want to use with PuTTY. The address you choose needs to be on the same network as your PC that is running PuTTY.
  4. In the PuTTY configuration window:
    1. Enter HAL's IP address in the Host Name text box
    2. Change the Connection type to Telnet
    3. Change the port number to 4996
    4. Click the Open button

For example, the HAL1 host properties dialog will look something like this:

Here, We’ve added a static IP of 10.0.0.113. We’ll use this in the PuTTY Configuration window:

Communicating with the Halogen/HAL control server

Connecting PuTTY to either Halogen or HAL establishes communication between the telnet client and the control server. Now you can send and receive messages using the PuTTY window that appears. For example, suppose you have a Level control configured in Halogen that is control number 1 and currently has a value of 60.5%. To request the current value of this control, type <L&1> into the PuTTY window and then press Enter. This will send the message to Halogen, which will respond with <L&1&605>. If all is right with your test system, you’ll see something like this:

Your Halogen configuration will be something like this: (the Level external control is linked to the Level block’s level control)

How to use PuTTY when testing external control systems

Here are a few ideas for what you can do:

  1. Test your HAL external controls by sending and receiving external control messages
  2. To do this, connect PuTTY to your HAL or Halogen external control server and type external control messages into the PuTTY window and observe what HAL sends in response.

  3. See how the HAL control server responds when you change external controls either from Halogen or from actual remotes in the HAL system.
  4. Connect PuTTY to your HAL or Halogen external control server and change external controls from within the HAL system. Observe what the control server sends to PuTTY.

  5. See how the HAL control server responds when configured presets activate or deactivate that affect external control values or link activations.
  6. Connect PuTTY to your HAL or Halogen external control server and activate or deactivate presets that contain blocks or links related to external controls. Observe what the control server sends to PuTTY.

  7. Use PuTTY to monitor the operation of your external control system
  8. You can connect any number of external control clients to a Halogen or HAL Control Server. This means that when you are developing and testing your control system with a commercial product, such as an AMX system, you can also connect to the control server using PuTTY.

    note: This lets you monitor most of the interaction between your external control system and your Halogen/HAL Control Server. This works because when external controls change, the Halogen/HAL Control Server sends these changes to all connected external control clients. So, when your external controller changes a control on the HAL, the HAL control server sends the change to your PuTTY client.

    To use PuTTY in this way, first connect PuTTY to the Halogen/HAL Control Server that you want to monitor. Next connect your control system to the same Halogen/HAL Control Server. As your external control system interacts with the HAL system, external control messages will appear in the PuTTY window, giving you information about the operation of your external control system.