Now I'm really pulling at straws to resolve this issue. I wrote a small C# util to delete Link 86 From DID 86 in an attempt to delete the Link from my Rain8 zone 22 which is DID 86. Fired off the command to the DID and it didn't work. The code does work since I can turn Rain8 zones off and on with it as well as HLC switches. Posted the code for review...
using System;
using System.IO.Ports;
class UPBCommunication
{
static byte[] cr = { 0x0D };
static byte[] ctlt = { 0x14 };
static byte[] ctlw = { 0x17 };
public static void Main()
{
SerialPort mySerialPort = new SerialPort("COM4");
mySerialPort.BaudRate = 4800;
mySerialPort.Parity = Parity.None;
mySerialPort.StopBits = StopBits.One;
mySerialPort.DataBits = 8;
mySerialPort.Handshake = Handshake.None;
mySerialPort.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler);
mySerialPort.ReadTimeout = 1500;
mySerialPort.WriteTimeout = 1500;
mySerialPort.RtsEnable = false;
mySerialPort.DtrEnable = true;
if (!mySerialPort.IsOpen)
{
mySerialPort.Open();
}
// Place in message mode
mySerialPort.Write(ctlw, 0, ctlw.Length);
mySerialPort.Write("70028E");
mySerialPort.Write(cr, 0, cr.Length);
mySerialPort.Write(ctlt, 0, ctlt.Length);
mySerialPort.Write("09040101FF030000EF"); // Start setup mode
// mySerialPort.Write("080001410122642F");
mySerialPort.Write(cr, 0, cr.Length);
mySerialPort.Write(ctlt, 0, ctlt.Length);
mySerialPort.Write("08040156FF0C563C"); // Delete link #86 on WGL zone #86 rain 22
mySerialPort.Write(cr, 0, cr.Length);
mySerialPort.Write(ctlt, 0, ctlt.Length);
mySerialPort.Write("07040101FF04F0"); // End setup mode
// mySerialPort.Write("080001410122642F");
mySerialPort.Write(cr, 0, cr.Length);
mySerialPort.Close();
}
private static void DataReceivedHandler(
object sender,
SerialDataReceivedEventArgs e)
{
SerialPort sp = (SerialPort)sender;
string indata = sp.ReadExisting();
Console.WriteLine("Data Received:");
Console.Write(indata);
}
}