Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(config): support Intermatic PE653 v3.1 with water temperature reading #7545

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

function1st
Copy link

@function1st function1st commented Jan 12, 2025

Pull Request

Title

feat(config): support Intermatic PE653 v3.1 with water temperature reading

Description

This pull request adds support for the Intermatic PE653 device running firmware v3.1, tested using a Raspberry Pi 5 and a RaZberry 7 Z-Wave serial device. The patch updates both the config file and the command class code so that the water temperature reading is parsed correctly. In current testing, the UI label may display this measurement as "Air Temperature," but it is effectively the pool water temperature for the PE653.

Changes

  1. Updated manufacturer-proprietary command class to parse and store the water temperature from the PE653 v3.1 firmware payload.
    • @IntermaticPE653CC.ts
  2. Modified config file for manufacturer 0x0072 to define the “waterTemperature” property as a readable number.
    • @pe653.json

Testing

• Tested the modified config and command class on a device running firmware v3.1.
• Confirmed that the water temperature is read and displayed (labeled as “Air Temperature” in the UI, but functionally correct).
• Verified no regression occurs with legacy firmware or other devices.

@function1st function1st changed the title Feat/intermatic pe653 feat(config): support Intermatic PE653 v3.1 with water temperature reading Jan 12, 2025
} from "@zwave-js/core/safe";
import { type CCEncodingContext, type CCParsingContext } from "@zwave-js/cc";
import { Bytes } from "@zwave-js/shared";
import { validateArgs } from "@zwave-js/transformers";

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import validateArgs.
Comment on lines +1 to +7
import {
CommandClass,
ManufacturerProprietaryCC,
CCAPI,
ValueMetadata,
ValueID,
} from "zwave-js";

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import CommandClass.
Copy link
Member

@AlCalzone AlCalzone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR. I have a few preliminary remarks - didn't look at everything in depth, as this is still a bit all over the place (understandably, since implementing a proprietary CC isn't documented).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain what this file has to do with your changes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These implementations cannot be here. If they are needed, they must be in the packages/cc/src/cc/manufacturerProprietary folder where the other one is located too. You can call the one using the legacy manufacturer ID IntermaticPE653LegacyCC or so to avoid naming collisions.
However it does look like this code isn't actually used? As is, it wouldn't build.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this file should have been copied, not moved. After all there are still users with the old version.

Comment on lines +2 to +5
"manufacturer": "Intermatic 0x0072 WaterTemp",
"manufacturerId": "0x0072",
"label": "PE653 0x0072 WaterTemp",
"description": "Pool Control 0x0072 WaterTemp",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just edit the manufacturer ID, keep the rest as-is. Unless the device is marketed under a new name?

Comment on lines +16 to +36
"proprietary": {
"manufacturerProprietaryConfig": {
"manufacturerId": 114,
"commandClasses": {
"waterTemperature": {
"type": "number",
"unit": "°F",
"min": 0,
"max": 100,
"readOnly": true,
"valueChangeOptions": ["always"],
"stateless": false,
"isFromConfig": true,
"ccSpecific": {
"propertyName": "waterTemperature",
"propertyKey": "waterTemperature"
}
}
}
}
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems unnecessary

Comment on lines -484 to 538
// Fixes #4588: Firmware v3.4 has numerous bugs related to multi-endpoint support.
// Firmware v3.3 and v3.1 do not appear to have the same issues.
"$if": "firmwareVersion === 3.4",
"commandClasses": {
// Force use of Multi Channel CC V1 despite the device reporting V2
"add": {
"Multi Channel": {
"isSupported": true,
"version": 1
}
},
// The firmware handles requests on some endpoints incorrectly, often reporting garbage
// that confuses discovery or inhibits operation. Remove all of these broken CCs.
"remove": {
// BasicCC: All endpoints control the state of Switch 1 so only keep the root endpoint
// to reduce clutter and to handle received BASIC_SET events.
"Basic": {
"endpoints": [1, 2, 3, 4, 5]
},
// ManufacturerSpecificCC: Endpoint 1 erroneously reports an incorrect manufacturer
// and product ID, unlike on the root endpoint.
"Manufacturer Specific": {
"endpoints": [1]
},
// ClockCC: Endpoint 1 erroneously reports a time with an invalid minute field,
// unlike on the root endpoint.
"Clock": {
"endpoints": [1]
},
// AssociationCC: Endpoint 1 erroneously reports that it supports 133 associated nodes
// but association commands don't work at all, unlike on the root endpoint.
"Association": {
"endpoints": [1]
},
// VersionCC: Endpoint 1 reports an unknown version, unlike on the root endpoint.
"Version": {
"endpoints": [1]
}
}
},
// The device sometimes sends BASIC_SET to the lifeline association when the state of Switch 1
// changes but the value is always 0 so treat it as an event.
"mapBasicSet": "event"
},
{
"commandClasses": {
// Force use of Multi Channel CC V1 despite the device reporting V2
"add": {
"Multi Channel": {
"isSupported": true,
"version": 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the comments. They explain why each compat flag exists.

Comment on lines +540 to 544
"Manufacturer Proprietary": {
"isSupported": true,
"version": 1,
"optional": false
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you share an interview log? I'd expect this to be advertised as supported.

Comment on lines -537 to -548
},
"overrideQueries": {
// The response to the setpoint query is off by one bit: https://github.com/zwave-js/node-zwave-js/issues/5335
"Thermostat Setpoint": [
{
"method": "getSupportedSetpointTypes",
"result": [
1, // Heating
7 // Furnace
]
}
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this issue fixed in this device version?

Comment on lines +549 to +563
"endpoints": {
"0": {
"commandClasses": {
"0x72": {
"isSupported": true,
"version": 1
},
"0x91": {
"isSupported": true,
"version": 1,
"optional": false
}
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise, I'd like to see the interview log to know if this is necessary.

@AlCalzone
Copy link
Member

Additionally, do you have some documentation for that proprietary protocol? I wonder what else is in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants