core icon indicating copy to clipboard operation
core copied to clipboard

OpenTherm Gateaway - no service set_max_ch_setpoint

Open lloyda opened this issue 2 years ago • 10 comments

The problem

pyotgw has the function set_max_ch_setpoint, but this does not appear to have been exposed as a service in opentherm_gw integration. Would it possible to expose this? Alternatively, is there a way to send a raw command to the OTGW (eg SH=66)?

What version of Home Assistant Core has the issue?

core-2023.1.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

opentherm-gw

Link to integration documentation on our website

https://www.home-assistant.io/integrations/opentherm_gw

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

lloyda avatar Jan 08 '23 11:01 lloyda

Hey there @mvn23, mind taking a look at this issue as it has been labeled with an integration (opentherm_gw) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of opentherm_gw can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign opentherm_gw Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


opentherm_gw documentation opentherm_gw source (message by IssueLinks)

home-assistant[bot] avatar Jan 08 '23 11:01 home-assistant[bot]

pyotgw has the function set_max_ch_setpoint, but this does not appear to have been exposed as a service in opentherm_gw integration. Would it possible to expose this?

It's definitely possible, but not planned at the moment. PRs are welcome though.

Alternatively, is there a way to send a raw command to the OTGW (eg SH=66)?

This is not implemented in pyotgw, so will be more difficult to do. I'm also not sure if I'd be in favor of such a feature in Home Assistant. Depending on how you connect to the gateway, you may be able to do this via an external command or script.

mvn23 avatar Jan 08 '23 23:01 mvn23

I was just looking for the same feature. I intend to test what is the minimum water temperature that will still heat the home, especially with the current cold water in NL. So I hope this could be implemented quickly, but I don't know how to do that without breaking the code. The value is readable (as max_ch_setpoint), but not settable. Although with otmonitor.exe I can change it, and in HA I see the value has changed. But I'd rather set it through HA, keep it low when it is not too cold outside, and allow a temporary higher water value when the house is cold after some longer absence, or it's very cold outside and I need to provide more heat. So I would like to request this feature to be implemented.

jan-gerard avatar Jan 25 '23 21:01 jan-gerard

Thanks for the reminder. This has actually moved up on my list of priorities, but first I'm working on a cleanup of the existing code as there's still a lot of legacy code in there to deal with deprecated configurations. After that is done, this one is next. It could take some time though, as I have a holiday planned first.

mvn23 avatar Jan 25 '23 22:01 mvn23

@jan-gerard As is usually the way with HA, there is more than one way to achieve something.

In lieu of this service, I did it another way

shell_command:
  send_otgw_command: /bin/bash -c "curl -X POST http://192.168.1.164/api/v1/otgw/command/{{ key }}={{ value }}"

This is called from an automation:

action:
  - service: shell_command.send_otgw_command
    data:
      key: SH
      value: "60"

lloyda avatar Jan 26 '23 17:01 lloyda

@jan-gerard As is usually the way with HA, there is more than one way to achieve something.

In lieu of this service, I did it another way

shell_command:
  send_otgw_command: /bin/bash -c "curl -X POST http://192.168.1.164/api/v1/otgw/command/{{ key }}={{ value }}"

This is called from an automation:

action:
  - service: shell_command.send_otgw_command
    data:
      key: SH
      value: "60"

Brilliant! Thanks. This works like a sunnetje. I made a helper variable, that I can set through the GUI, and which then sends the shell command. And the value from the opentherm gateway is updating the helper variable when it changes. Now I'm going to experiment with the hot water limit, and see what is the lowest I can achieve, so I can check if a heatpump will be applicable.

jan-gerard avatar Jan 26 '23 20:01 jan-gerard

Hello,

@lloyda It's not working with my configuration (Nodo gateway v2 with ethernet module USR-TCP232-T2). What one is yours? I tested adding -u "user:pass" and with GET instead PUT, but unsuccessly.

@mvn23 Do you want me to write the set_max_ch_setpoint service? It seems very similar to the set_control_setpoint service.

Best regards, Patrick.

PatrickGlesner avatar Mar 20 '23 12:03 PatrickGlesner

PRs are always welcome. I can't merge anything, but I will definitely review any PRs related to the integration.

mvn23 avatar Mar 20 '23 12:03 mvn23

PRs are always welcome. I can't merge anything, but I will definitely review any PRs related to the integration.

Ok. I'll try do that this week.

PatrickGlesner avatar Mar 20 '23 13:03 PatrickGlesner

@lloyda It's not working with my configuration (Nodo gateway v2 with ethernet module USR-TCP232-T2). What one is yours? I tested adding -u "user:pass" and with GET instead PUT, but unsuccessly.

I'm using Nodo gateway, but with the WiFi module.

lloyda avatar Mar 20 '23 13:03 lloyda

I'm using Nodo gateway, but with the WiFi module.

Ok, I understood. WiFi module has an API (from rvbreemen, I suppose) not the ethernet module :-(

PatrickGlesner avatar Mar 22 '23 14:03 PatrickGlesner

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.