khenderick / esphome-opentherm

OpenTherm support for ESPHome
MIT License
14 stars 4 forks source link

Collaboration with Smart Autotune Thermostat ( HACS ) #21

Open sergeantd83 opened 1 month ago

sergeantd83 commented 1 month ago

Hi @khenderick! @Alexwijn and I created a HACS custom component called Smart Autotune Thermostat. At the moment we are able to control an Opentherm Gas boiler through an OTGW ( MQTT or Serial ). We would like to expand the compatibility of supported devices to DIYLess and Ihor Melnyk boards and I came across your work. It looks that your ESPhome component is the perfect solution in order to support these boards. But in order to achive it, we need your help. Your component is missing the Max Modulation sensor ( ID14 ) and an input number for max_modulation management. These 2 sensors will be used in order to implement the native Low-Load control operation like most modern thermostats do. If you can help us it will be amazing! Then we will be able to create a new coordinator for your component.

P.S. This is the MQTT coordinator as an example.

Thanks in advance.

khenderick commented 1 month ago

Hi,

That sounds great! I'll try to make an implementation this week and I'll keep you posted for it's progress. Do one of you have a boiler with which you would be able to test the changes on? I'm not sure my boiler will support this sensor and/or input.

Thanks!

sergeantd83 commented 1 month ago

Thank you for your response! SAT already works with the Opentherm Gateway board for more than 2 years. So SAT is working perfectly with our gas boilers even in Low Load Control management ( manipulating the Max Modulation of the gas boiler ). Unfortunately we don't own any DIYLess / Ihor Melnyk board so we can't really perform any tests from our side. But If you create the Max modulation sensor and the Max Modulation management input_number, you can test it super easy. When you change the Max Modulation management input_number value then the Max modulation sensor should change respectively, actually Max Modulation sensor/input_number combination should work just as the Control Setpoint sensor/input number. For your convenience we have a Boiler Compatibility List that provenly works with SAT. So if your boiler is in the list ( or your gas boiler brand ), then SAT definitely is compatible with your boiler and your boiler supports the ID14.

Thanks again for your help!

khenderick commented 1 month ago

Quickly looking into the spec, I can see the need for a max modulation input number, but it looks like ID14 is a write field, so there no possibility of a sensor. Did I misunderstand something?

sergeantd83 commented 1 month ago

OK I get your point. Here are some more details about how the OTGW creator manipulates the special IDs https://otgw.tclcode.com/firmware.html#dataids. IMG_4098

That’s why I asked you for a Max modulation sensor.

So it looks that just the Max Modulation input number is just fine for this type of connection.

Almost forgot it, can you also include an input number for ID57 ( MaxTSet )? This will allow a user to choose his own Max CH water setpoint.

I think we need only these 2 input numbers in order to support these boards!

sergeantd83 commented 1 month ago

Also here why you need fixed values for min and max? Since you already have the boundary values as sensors in your .yaml.


      name: "DHW setpoint temperature"
      min_value: 38.0
      max_value: 60.0
      step: 0.5
      restore_value: true```
khenderick commented 1 month ago

The idea of having a min & max value for DHW was twofold;

Adding ID57 shouldn't be a problem either. I'll also take a look at having the member ID available as a sensor, since that's used for the compatibility list.

sergeantd83 commented 1 month ago

Since I don't think I can dynamically change the min/max of a sensor at runtime, this allows a user to clamp the input to the min/max returned by the boiler.

This makes sense. In SAT, since it is a custom component, we are able to use these sensors as boundary values.

Adding ID57 shouldn't be a problem either. I'll also take a look at having the member ID available as a sensor, since that's used for the compatibility list.

Amazing! Thank you very much for your precious help! When you will be ready, we will write the coordinator for your component.

khenderick commented 1 month ago

These are implemented and are available.

However, it seems my browser doesn't support setting the maximum modulation level (at least, for DHW it uses a higher modulation than the set maximum) and does also not support setting the maximum CH setpoint (it just returns an invalid data error).

Please keep me posted on progress on your end, and feel free to tag me if I can help you out. I'll keep this ticket open for now.

sergeantd83 commented 1 month ago

Great news! Now it is on @Alexwijn side to create the coordinator. I hope very soon the coordiantor will be ready for testing. Also I would like to invite you in the SAT Discord server so we can discuss the progress of this work.

However, it seems my browser doesn't support setting the maximum modulation level (at least, for DHW it uses a higher modulation than the set maximum).

This is completely normal, since DHW modulation management algorithm is completeley different than the CH modulation management algorithm. You can only interfere with the boiler's max modulation only when the CH is enabled.

Thank you very much again!