Skip to content

Add Thermostat PI Heating/Cooling Demand Channels#764

Merged
cdjackson merged 1 commit into
openhab:mainfrom
lucasec:pi-heating-cooling-demand
Jun 6, 2022
Merged

Add Thermostat PI Heating/Cooling Demand Channels#764
cdjackson merged 1 commit into
openhab:mainfrom
lucasec:pi-heating-cooling-demand

Conversation

@lucasec
Copy link
Copy Markdown
Contributor

@lucasec lucasec commented Jun 5, 2022

This adds the "PI Heating Demand" and "PI Cooling Demand" standard thermostat channels. These channels are represented as a percentage (Dimensionless unit), and indicate whether there is a current heating or cooling call from the thermostat. They are fully supported by auto-discovery for the generic device type.

My electric line voltage thermostats generally report 0% for no heat and 100% for full heating power. They also report values in between when they are limiting the current to the heater. I am not aware of how low voltage thermostats handle this spec, e.g. do they only report 0 and 100 or do they come up with some number in between even when they only electrically support "on" and "off".

I used Number:Dimensionless as this seems to be the generally accepted way to represent a percentage under the units of measurement system. I see some ongoing debate in #597 wrt. the relative humidity channel. If desired, I can submit a separate PR to update the humidity channel to the same type.

Copy link
Copy Markdown
Contributor

@cdjackson cdjackson left a comment

Choose a reason for hiding this comment

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

Thanks. Looks generally good with just a couple of small comment.
I'd like to get the reporting configuration implemented so it's one less thing to do in #743

</channel-type>

<!-- Thermostat Heating Demand -->
<channel-type id="thermostat_heatingdemand">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggest to make this an advanced channel (so please add advanced="true".

</channel-type>

<!-- Thermostat Cooling Demand -->
<channel-type id="thermostat_coolingdemand">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggest to make this an advanced channel (so please add advanced="true".

// Configure reporting
ZclAttribute attribute = serverCluster.getAttribute(ZclThermostatCluster.ATTR_PIHEATINGDEMAND);
CommandResult reportingResponse = attribute
.setReporting(REPORTING_PERIOD_DEFAULT_MIN, REPORTING_PERIOD_DEFAULT_MAX, 1).get();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please can you add reporting configuration here as well. See one of the converters like the OnOff switch which supports this with the ZclReportingConfig class.

ZclAttribute attribute = serverCluster.getAttribute(ZclThermostatCluster.ATTR_PICOOLINGDEMAND);
CommandResult reportingResponse = attribute
.setReporting(REPORTING_PERIOD_DEFAULT_MIN, REPORTING_PERIOD_DEFAULT_MAX, 1).get();
handleReportingResponse(reportingResponse, POLLING_PERIOD_DEFAULT, REPORTING_PERIOD_DEFAULT_MAX);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please can you add reporting configuration here as well. See one of the converters like the OnOff switch which supports this with the ZclReportingConfig class. and the updateConfiguration method

@lucasec lucasec force-pushed the pi-heating-cooling-demand branch from 67b3e04 to e7e7939 Compare June 5, 2022 23:54
@cdjackson cdjackson added this to the 3.3 milestone Jun 5, 2022
@lucasec
Copy link
Copy Markdown
Contributor Author

lucasec commented Jun 6, 2022

There seem to be a few surprises with the reporting config, trying to debug.

This adds the "PI Heating Demand" and "PI Cooling Demand" standard
thermostat channels. These channels are represented as a
percentage (Dimensionless unit), and indicate whether there is a
current heating or cooling call from the thermostat. They are fully
supported by auto-discovery for the generic device type.

Signed-off-by: Lucas Christian <lucas@lucasec.com>
@lucasec lucasec force-pushed the pi-heating-cooling-demand branch from e7e7939 to aa7a092 Compare June 6, 2022 01:07
@lucasec
Copy link
Copy Markdown
Contributor Author

lucasec commented Jun 6, 2022

Disregard, it seems my zigbee stick got into some kind of loop and needed to be power cycled. Confirmed the reporting configuration is working as expected. Squashed commits to prepare for merge.

@cdjackson
Copy link
Copy Markdown
Contributor

Thanks. Looks good.

@cdjackson cdjackson merged commit b1421ee into openhab:main Jun 6, 2022
pgaufillet pushed a commit to pgaufillet/org.openhab.binding.zigbee that referenced this pull request Sep 7, 2023
This adds the "PI Heating Demand" and "PI Cooling Demand" standard
thermostat channels. These channels are represented as a
percentage (Dimensionless unit), and indicate whether there is a
current heating or cooling call from the thermostat. They are fully
supported by auto-discovery for the generic device type.

Signed-off-by: Lucas Christian <lucas@lucasec.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants