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

OpenTherm device #3921

Open
wants to merge 47 commits into
base: dev
Choose a base branch
from
Open

OpenTherm device #3921

wants to merge 47 commits into from

Conversation

khenderick
Copy link

@khenderick khenderick commented Oct 20, 2022

What does this implement?

This PR introduces support for opentherm devices such as:

Those are typically connected to an ESP8266 or ESP32

The functional aspect (OpenTherm communications) is heavily based on ihormelnyk/opentherm_library.

The goal of this integration is not to provide a full-blown climate device, but rather expose a bunch of OpenTherm data and functionality. To make use of this data and functionality is up to the user. This could be by - for example - using the exposed enities in ESPHome/HA automations or by using the exposed entities in other components (e.g. a combination of PID Climate and a few Template Outputs)

As this is my first contribution, I'm also looking for constructive criticism on how to enhance this integration where needed.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#2379

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266

Example entry for config.yaml:

opentherm:
  read_pin: 21
  write_pin: 22

sensor:
  - platform: opentherm
    ch_min_temperature:
      name: "CH minimum temperature"
    ch_max_temperature:
      name: "CH maximum temperature"
    dhw_min_temperature:
      name: "DHW minimum temperature"
    dhw_max_temperature:
      name: "DHW maximum temperature"
    pressure:
      name: "pressure"
    modulation:
      name: "modulation"
    boiler_temperature:
      name: "boiler temperature"
    return_temperature:
      name: "return temperature"

binary_sensor:
  - platform: opentherm
    ch_active:
      name: "CH active"
    dhw_active:
      name: "DHW active"
    flame_active:
      name: "flame active"
    fault:
      name: "fault"
    diagnostic:
      name: "diagnostic"

switch:
  - platform: opentherm
    ch_enabled:
      name: "CH enabled"
    dhw_enabled:
      name: "DHW enabled"

number:
  - platform: opentherm
    ch_setpoint_temperature:
      name: "CH setpoint temperature"
      min_value: 20.0
      max_value: 45.0
      step: 0.5
      restore_value: true
    dhw_setpoint_temperature:
      name: "DHW setpoint temperature"
      min_value: 38.0
      max_value: 60.0
      step: 0.5
      restore_value: true

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@probot-esphome
Copy link

Hey there @khenderick,
Thanks for submitting this pull request! Can you add yourself as a codeowner for this integration? This way we can notify you if a bug report for this integration is reported.
In __init__.py of the integration, please add:

CODEOWNERS = ["@khenderick"]

And run script/build_codeowners.py

(message by NeedsCodeownersLabel)

@khenderick khenderick changed the title DIYLess OpenTherm device OpenTherm device Oct 21, 2022
@khenderick
Copy link
Author

This branch isn't stale, but I'd like to get some feedback on the best way forward here. See for example #3921 (comment).

The current code is already running for many months now, working without any issues.

@github-actions github-actions bot removed the stale label Jun 1, 2023
esphome/components/opentherm/__init__.py Outdated Show resolved Hide resolved
esphome/components/opentherm/binary_sensor.py Outdated Show resolved Hide resolved
esphome/components/opentherm/opentherm.h Outdated Show resolved Hide resolved
esphome/components/opentherm/opentherm.h Outdated Show resolved Hide resolved
esphome/components/opentherm/opentherm.h Outdated Show resolved Hide resolved
esphome/components/opentherm/number/__init__.py Outdated Show resolved Hide resolved
esphome/components/opentherm/number/__init__.py Outdated Show resolved Hide resolved
esphome/components/opentherm/sensor.py Outdated Show resolved Hide resolved
esphome/components/opentherm/switch/__init__.py Outdated Show resolved Hide resolved
esphome/components/opentherm/switch/__init__.py Outdated Show resolved Hide resolved
@khenderick
Copy link
Author

Thanks for the feedback @jesserockz. I've made the requested changes.

I also brought the PR up-to-date with pending changes from my separate component repo. These changes include some new sensors etc, but also include a refactor to spread communication in time, getting rid of the "took a long time for an operation"-messages. I did my best to also apply your suggestions to that new code.

Copy link
Contributor

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 14, 2024
@khenderick
Copy link
Author

This PR is not stale from my end.

I still hope that eventually I will get some constructive feedback and that it will get merged in. If it's unlikely this will ever be merged in, I also would like to know. To be honest, it's a bit demotivating to have a PR open for well over a year with some review feedback, but nothing about if and when it would or could be merged in.

@github-actions github-actions bot removed the stale label Feb 15, 2024
@olegtarasov olegtarasov mentioned this pull request Apr 26, 2024
13 tasks
@rotilho
Copy link

rotilho commented May 17, 2024

Hello @khenderick! I'm very excited about this PR; thanks for putting in the effort. I really appreciate it.

I'm not part of the esphome team, but I've worked with GitHub before and see why nobody reviewed your PR. If you don't re-request the review, the PR won't appear in the list of PRs to be reviewed. I'd also mark the previous review as closed, just in case.

Again, thank you 🙏

@codecov-commenter
Copy link

codecov-commenter commented May 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.13%. Comparing base (4d8b5ed) to head (b510178).
Report is 627 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3921      +/-   ##
==========================================
+ Coverage   53.70%   54.13%   +0.42%     
==========================================
  Files          50       50              
  Lines        9408     9619     +211     
  Branches     1654     1698      +44     
==========================================
+ Hits         5053     5207     +154     
- Misses       4056     4086      +30     
- Partials      299      326      +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@khenderick
Copy link
Author

Hello @khenderick! I'm very excited about this PR; thanks for putting in the effort. I really appreciate it.

I'm not part of the esphome team, but I've worked with GitHub before and see why nobody reviewed your PR. If you don't re-request the review, the PR won't appear in the list of PRs to be reviewed. I'd also mark the previous review as closed, just in case.

I've re-requested the review, thanks for the tip. Hope it helps 🤞.

Again, thank you 🙏

You're welcome 🙂. In case you didn't know yet, you can already use this component directly via https://github.com/khenderick/esphome-opentherm 👍.

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.

None yet

7 participants