Hayward Pro Logic PS Help

First, I'm a novice coder at best and I've never done anything in Hubitat.

This is the interface I'm trying to use: Hayward AQ-CO-SERIAL

I'm able to send and receive using Telnet and a Serial-Telnet adapter, but some of the commands don't work. I'm pretty sure It's because of how I'm doing the checksum.

Below is how I'm sending commands. The commands replicate a button Press and a button Release, that's why there are two.

        def lightsCommandP = [16,2,1,9,0,28,16,3] as byte[]
        def lightsCommandR = [16,2,2,9,0,29,16,3] as byte[]
        def lightsR = new String(lightsCommandR)
        def lightsP = new String(lightsCommandP)
        sendMessage(lightsP)
        sendMessage(lightsR)

Any suggestions would be appreciated.

Thank you Jorge Martinez (Monoprice 6 Zone) and Mike Maxwell (Generic Component Parent Demo)

Which options are you using on telnetConnect()? What does the implementation of sendMessage() contain?

You probably want to use this to make a hex string from your byte array, because String will parse them as ASCII or UTF-8.

https://docs.hubitat.com/index.php?title=HexUtils_Object#byteArrayToHexString

Your command packets look correct (including the checksum field) from a quick skim of the doc.

Try this:

def lightsP = hubitat.helper.HexUtils.byteArrayToHexString(lightsCommandP)
def lightsR = hubitat.helper.HexUtils.byteArrayToHexString(lightsCommandR)
sendMessage(lightsP)
sendMessage(lightsR)

Assuming sendMessage(msg) contains something like:

sendHubCommand(new hubitat.device.HubAction(msg, hubitat.device.Protocol.TELNET))

Thanks for the help on this.

It was me being dense, as usual. The commands are listed 1-28 and I didn't read the heading: Data (in Hexadecimal).

I'm able to send commands using Habitat devices now. Didn't have to convert to hex.

Next is to update Habitat device status if a manual change is made from the Pool Controller Panel. Any idea how I'd do that?

I can get the status from the Pool Controller, I just don't understand how to set the status of the HE device.

9 is the same in both decimal and hex. ;). I'll bet your example was one of the working ones, not a non working one like I assumed.

You can adopt one or more of the standard capabilities, if they are close enough to what you want your driver to support. The commands and attributes of each are described here: https://docs.hubitat.com/index.php?title=Driver_Capability_List

Otherwise you can declare your own custom commands and attributes as described here: Device Definition - Hubitat Documentation

1 Like