Creating a Smart Heating System with Thermal Actuators
Hello everyone,
I’m really excited to share my journey of creating a smart heating system using thermal actuators. For years, I’ve been frustrated with the traditional heating setup in my home, where a single thermostat controls the entire house. It often resulted in some rooms being too cold while others were overly warm. After researching various solutions, I decided to take matters into my own hands and create a system that offers precise temperature control for each room.
My Setup
The core components of my system are:
- Thermal Actuators: These are silent and take about 3 minutes to fully open or close. I found them to be a cost-effective solution compared to commercially available products.
- Sonoff Basic Relays: These are easy to configure and allow me to control the actuators via MQTT.
- Temperature Sensors: I’m using DHT22 sensors paired with ESP8266 modules to monitor room temperatures.
All communication between the sensors, relays, and my openHAB setup is handled through MQTT, ensuring a seamless and efficient system.
The OpenHAB Implementation
On the openHAB side, I’ve set up groups to manage each room’s heating target temperatures. For example, in my living room, I have two temperature sensors whose average reading is used to control the radiator. This setup allows me to maintain consistent temperatures across multiple sensors and actuators.
Here’s a snippet of how I’ve configured the items in my heating_mode.items file:
plaintext
// Current target temperatures
Group:Number gHeatingTargetTemp (gHeating)
Number LR_Heating_TargetTemp “Living Room Heating Target [%.1f °C]” (gHeatingTargetTemp)
Number OF_Heating_TargetTemp “Office Heating Target [%.1f °C]” (gHeatingTargetTemp)
The Rules Engine
The rules engine in openHAB is where the magic happens. Every 5 minutes, the system checks the average temperature of each room and adjusts the actuators accordingly. This ensures that the heating remains within a predefined hysteresis range, preventing unnecessary fluctuations.
For example, if the target temperature for the living room is 22°C, the system will turn on the actuator if the average temperature drops below 21.8°C and turn it off once it reaches 22.2°C.
plaintext
rule “Check heating actuators every 5 minutes”
when Time cron “0 0/5 * * * ?” or Item gHeatingTargetTemp received update then
var Number hylow = 0
var Number hyhigh = 0
gHeatingTargetTemp.members.forEach[ temp |
hylow = (temp.state as Number) - hysteresis
hyhigh = (temp.state as Number) + hysteresis
val String GroupName = temp.name.substring(0, 3)
val nums = gTemperature.allMembers.filter[i | i.name.contains(GroupName + “Temp”)]
if (nums.size > 0) {
val avg = nums.map[state as Number].reduce[result, value | result = (result + value) ] / nums.size
gHeatingActuators.members.filter[i | i.name.contains(GroupName + “Heating_Actuator”)].forEach [ i |
if (avg <= hylow) {
if (i.state == OFF) {
i.sendCommand(ON)
}
}
if (avg >= hyhigh) {
if (i.state == ON) {
i.sendCommand(OFF)
}
}
]
}
]
end
Results and Satisfaction
The results have been phenomenal. Each room now maintains the exact temperature I set, and I rarely need to make manual adjustments. The system is so efficient that it even adjusts the Nest thermostat based on the state of the actuators, ensuring that the heating mode aligns with my preferences.
I’m particularly impressed with how the system handles different heating modes, such as “NORMAL,” “PARTY,” and “AWAY.” This flexibility allows me to adapt the heating to various scenarios without manual intervention.
Conclusion
This project has been a rewarding experience, combining my love for DIY projects with the practical benefits of a smart home. It’s been a journey of learning, problem-solving, and innovation, and I’m thrilled with the outcome.
If anyone has questions or would like to share their own heating setups, I’d love to hear from you! Let’s continue to inspire each other and push the boundaries of smart home automation.
Best regards,
[Your Name]