-
Notifications
You must be signed in to change notification settings - Fork 27
Home
- Download the latest firmware from the releases page (or compile yourself) and flash your ESP8266 board using the ESP Flash Download Tool or other software.
- Connect to OpenTherm Gateway hotspot, password: otgateway123456
- Open configuration page in browser: 192.168.4.1
- Set up a connection to your wifi network
- Set up a connection to your MQTT server: ip, port, user, password
- Set up a Opentherm GPIO IN & Opentherm GPIO OUT. No change for my board. Typically used IN = 4, OUT = 5
- Set up a Outdoor sensor GPIO & Indoor sensor GPIO. No change for my board.
- if necessary, set up a the Master Member ID
After connecting to your wifi network, you can go to the setup page at the address that ESP8266 received. The OTGateway device will be automatically added to homeassistant if MQTT server ip, login and password are correct.
By default, the "Equitherm" and "PID" modes are disabled. In this case, the boiler will simply maintain the temperature you set.
To use "Equitherm" or "PID" modes, the controller needs to know the temperature inside and outside the house.
Some boilers have the ability to connect inside and outside temperature sensors. If your boiler supports it, you can use the following settings:
- Indoor temperature source: Boiler
- Outdoor temperature source: Boiler
After this, you need to check the "Outdoor temperature" and "Indoor temperature" sensors. If any of them has a value of 0, then the boiler does not report the temperature via Opentherm and you need to use an external sensor or report the temperature from the home assistant using automation.
The highest accuracy of readings is when using external temperature sensors. I prefer to use DS18B20, but you can use any compatible sensor. These sensors must be connected directly to the ESP GPIO. Some OT adapters already have connectors to connect them.
After physically connecting the sensors, you need to set the GPIO numbers in the controller settings.
To do this, you need to go to the “Setup” page (where you set the GPIO OT) and change the parameters:
- Outdoor sensor GPIO
- Indoor sensor GPIO
And save the settings. Next, you need to change the device settings in the Home Assistant:
- Indoor temperature source: External
- Outdoor temperature source: External
After this you can check the sensors. To do this, look at the values of the "Indoor temperature" and "Outdoor temperature" sensors.
Of course you can combine temperature sources. For example, you can take the outside temperature from an external DS18B20 sensor, and the inside temperature from a Zigbee sensor using automation.
There is a simple automation that takes the temperature from any temperature sensor (eg Zigbee) and reports it to the controller. How to create automation in HA you can read here.
Before creating automation you must set the following settings:
- Indoor temperature source: Manual
After that, you can create automation. The automation code can be copied from here. Before saving, you need to change the entity IDs:
# The source sensor from which we take the temperature
source_entity: "sensor.livingroom_temperature"
# Target entity number where we set the temperature
# To report indoor temperature: number.opentherm_indoor_temp
# To report outdoor temperature: number.opentherm_outdoor_temp
target_entity: "number.opentherm_indoor_temp"
The same code can be used to report the outside temperature. For example, if you have a Zigbee temperature sensor that is installed outside.
But don't forget to set the following settings:
- Outdoor temperature source: Manual
There is a simple automation that takes the temperature from Home Assistant weather integration and reports it to the controller. It is important that the address of your home is entered correctly in the Home Assistant settings.
Before creating automation you must set the following settings:
- Outdoor temperature source: Manual
After that, you can create automation. The automation code can be copied from here. Before saving, you need to change the entity IDs:
# The source weather from which we take the temperature
source_entity: "weather.home"
# Target entity number where we set the temperature
# If the prefix has not changed, then you do not need to change it
target_entity: "number.opentherm_outdoor_temp"
Weather-compensated temperature control maintains a comfortable set temperature in the house. The algorithm requires temperature sensors in the house and outside.
Instead of an outdoor sensor, you can use the weather forecast and automation for HA.
N - heating curve coefficient. The coefficient is selected individually, depending on the insulation of the room, the heated area, etc.
Range: 0.001...10, default: 0.7, step 0.001
K - сorrection for desired room temperature.
Range: 0...10, default: 3, step 0.01
T - thermostat correction.
Range: 0...10, default: 2, step 0.01
Tip. I created a table in Excel in which you can enter temperature parameters inside and outside the house and select coefficients. On the graph you can see the temperature that the boiler will set.
- Set the K and T coefficients to 0.
- The first thing you need to do is to fit the curve (N coefficient). If your home has low heat loss, then start with 0.5. Otherwise start at 0.7. When the temperature inside the house stops changing, increase or decrease the coefficient value in increments of 0.1 to select the optimal curve.
Please note that passive heating (sun) will affect the house temperature during curve fitting. This process is not fast and will take you 1-2 days. Important. During curve fitting, the temperature must be kept stable as the outside temperature changes.
At this stage, it is important for you to stabilize the indoor temperature at exactly 20 (+- 0.5) degrees.
For example. You fit curve 0.67; set temperature 20; the temperature in the house is 20.1 degrees while the outside temperature is -10 degrees and -5 degrees. This is good. - After fitting the curve, you must select the K coefficient. It influences the boiler temperature correction to maintain the set temperature. For example. Set temperature: 23 degrees; temperature in the house: 20 degrees. Try setting it to 2 and see how the temperature in the house changes after stabilization. Select the value so that the temperature in the house is close to the set.
- Now you can choose the T coefficient. Simply put, it affects the sharpness of the temperature change. If you want fast heating, then set a high value (6-10), but then the room may overheat. If you want smooth heating, set 1-5. Choose the optimal value for yourself.
- Check to see if it works correctly at different set temperatures over several days.
Read more about the algorithm here.
See Wikipedia.
In Google you can find instructions for tuning the PID controller.