mguinness / IntelliCenterGateway

Gateway to Pentair IntelliCenter Control System
MIT License
7 stars 5 forks source link

Any plans to support v1.064 firmware? #9

Open Gibby opened 2 years ago

Gibby commented 2 years ago

Just wondering if there are any plans to support the new firmware. In the mean time, I have been using https://github.com/jlvaillant/intellicenter

mguinness commented 2 years ago

I haven't upgraded to the new firmware. What exactly isn't working? Does the Home Page show all your equipment and if so, does subscribing work? Does the new firmware still provide access to port 6681?

Gibby commented 2 years ago

This is all that the test page shows, and I'm able to get the state:

image

This is what the home page shows, and I get an error when subscribing: image

New firmware does still provide access on port 6681, just seems like some of the commands have a changed a little bit and some of the return messages have changed.

On another note, the new Intellicenter 2 app from Pentair seems a lot better with the new firmware, I don't have near as many issues.

mguinness commented 2 years ago

Based on changes to Homebridge Pentair IntelliCenter Plugin it appears that the request for h/ware def has changed to include additional parameters:

const DISCOVER_COMMANDS: ReadonlyArray<string> = ['CIRCUITS', 'PUMPS', 'CHEMS', 'VALVES', 'HEATERS', 'SENSORS', 'GROUPS'];

discoverDevices() {
  this.discoverDeviceType(this.getConfig().isIntellicenter2 ? DISCOVER_COMMANDS[0] : '');
}

discoverDeviceType(deviceType: string) {
  this.discoverCommandsSent.push(deviceType);
  const command = {
    command: IntelliCenterRequestCommand.GetQuery,
    queryName: IntelliCenterQueryName.GetHardwareDefinition,
    arguments: this.getConfig().isIntellicenter2 ? 'CIRCUITS' : '', //PUMPS, CHEMS, VALVES, HEATERS, SENSORS, GROUPS,
    arguments: deviceType,
    messageID: uuidv4(),
  } as IntelliCenterRequest;
  this.sendCommandNoWait(command);
}

Since this project is effectively a proxy at heart, you can simply make the necessary changes to Index.cshtml & site.js to get that working. You can probably even try this in the Javascript console to see if you get a correct response:

cmd = { "command": "GetQuery", "queryName": "GetHardwareDefinition", "arguments": "CIRCUITS", "messageID": uuidv4() }; connection.invoke('Request', JSON.stringify(cmd));