HVAC Framework - Thermostat Preview

I have been working on a collection of components for controlling HVAC equipment directly from openHAB without requiring a physical smart thermostat. The software thermostat component has reached a point that is ready for others to review and has been posted to GitHub.
The thermostat can be adjusted manually or use preset modes. The modes can be selected by the user or set by an external function such as a calendar or presence detection.

HABPanel Widget:

HABPanel Popup:

I have been developing this framework to support HVAC automation plans I have for my house. I intend to setup every room with a temperature sensor, a software thermostat, and electric air dampers. The software thermostats will be used to control the whole home furnace / air conditioner and ceiling fans.

I am trying to design everything to work internationally. Item names can be in any language. The user interface will be in English by default but can be shown in other languages using translation lists. I will need others to contribute these translations.

My next focus is on the software and hardware interface between openHAB and physical equipment, such as a furnace. This is being developed with a number of protections to prevent damage to the equipment, such as adjusting dampers to relieve excess duct pressure.

Is anyone else interested using these components once they are finished? If so, what features would you want to see implemented?

WARNING: This is just a preview of the thermostat. The framework is not yet ready to air condition a house.
NOTE: Anyone reviewing the code, be aware that it gets somewhat convoluted to provide flexibility and support multiple languages.


hI; I am new to openhab and try to make Smart home Thermostat like this.
is it possible to use for it a DS18B20 temp sensor and some relay board?
so i could control the heating ?
thank you for help .

If you are trying to control a heater for a single area then the thermostat should be able to be used as is. You would need to use the heating status switch from the thermostat to control a physical relay.
If this scenario applies to you then let me know what you already have setup and I will try to help you with getting the rest working.

If you are looking for anything more complex than a single heater, like multiple zones for a central air unit, then more components will be needed. I have not had much time to work on this so the other components are not ready.

Hi, i try to control spa, pool over the openhab sistem. Have ds18b20 sensors for temp and ralay board with 8 ralay. Try to control it over gpio.

And use a ph sensor just to show the value.

Thank you!

Nice greets oliver

Hi , now i have installed openhab2 on raspberry pi 3. installed a DS18B20 and a relay board on pi: 14,15,17,18.
see the temperature and can control the relay board .
how can i bind your files to openhab?
thank you!

I will have limited internet access for the next week, but can help more after that. In the mean time, please take a look at the documentation on git hub.

ok, thank you :slight_smile:

Hi, can we write over email? thx

What type of heat do you have? I have electric baseboard heat with separate thermostats in every room. Are you planning to use arduinos in place of thermostats?

I’m very interested and am planning to do a similar control scheme for my system. Maybe we could work together :slight_smile:

I’ll have a close look at your thermostat control which I’m sure will come in very handy for what I’m trying to achieve.

In my case, with my new house I’ve inherited a zoned, ducted refrigerated reverse cycle Fujitsu HVAC system. The house is two storey with high ceilings and large voids which connect the first and second floors. The outdoor and indoor units work, but due to the layout of my house and the fact there’s only one temperature sensor upstairs, the system is nowhere near optimal and I’m wasting $$$$'s in electricity. It’s worth noting that in Australia this sort of problem is common, so if we came up with a solution I’m sure it would be popular.

First floor has one zone only. Second floor has three zones, one of which covers all three upstairs bedrooms, the second zone is for a home theatre, and the third is for an open activity room next to the void. Master bedroom are currently serviced by a central evaporative cooler, but I’m looking at converting the ducting over to the refrigerative system later.

During the summer, with all interior doors closed the bedroom furthest away from the HVAC indoor unit does not cool down enough, while the other two closer bedrooms get too cold. The theatre room gets way too cold, and the activity room gets too warm because the cool air falls down to the first floor. Basically the system was designed badly and I’m sure I can fix it for MUCH less than a new zoned commercial system would cost (to put a new system in now would cost >$30k, and I’m sure still won’t work properly).

What I’m planning to do is give each room it’s own zone and temperature sensor, possibly with ceiling fans placed above the voids. I’ve found a Modbus based interface which will allow commands to be sent and retrieved from the indoor HVAC unit. With this interface I can select fan speed (low/med/high/auto), an overall temperature setpoint, and operating mode (heat/cool/dry/fan/auto). I can also send to the unit a temperature reference to make use of the HVAC unit’s internal temperature control loop.

I can see my design consisting of the following:
-New dampers installed so that every air outlet can be switched on or off
-Temperature sensors in all rooms
-Modbus interface from OpenHAB to the HVAC indoor unit to command mode, setpoint and fan speed
-Relay board which opens/closes dampers as necessary
-Software thermostats for each room, for automatic control

I plan on making a proof of concept initially with the Modbus interface, relay board and one temperature sensor. Once this is proven to work I’ll install hardware for all zones to allow for full manual control. Then I can consider automating. This is where it gets tricky, and I think this is the sort of problem you have in mind to develop a solution to. I’ve been googling for days and haven’t found anyone doing a home automation based zone controller.

Here’s how I imagine the basic control narrative:
-User chooses which rooms are to be conditioned and the desired temperature setpoint of each room
-OpenHAB would then set the HVAC unit mode and setpoint temperature based on the most extreme setting (i.e. in summer the coldest temperature setpoint would be sent to the HVAC unit, in winter the warmest temperature). Unsure if the inbuilt Auto mode should be used here, it will require some testing to see how it behaves.
-Dampers are then actuated on and off to keep the temperature in each room to be within a certain band (say 2 degree C plus or minus)
-Fan speed would be adjusted based on how many dampers are open (the more dampers open the higher the fan speed). The inbuilt Auto fan speed mode may be used, but again I’ll need to test to see how it behaves.

Once this is achieved, some advanced functions could be looked at. For example:
-Presence detection for full smart control
-Void ceiling fan control - in summer the fans would pull cool air upwards to assist cooling the second floor, in winter the fans would push warm air downwards to ensure proper heating of the first floor
-Ceiling fans in all rooms to reduce temperature differential between the floor and the ceiling
-Humidity monitoring for each room - if the humidity gets too high OpenHAB could command the HVAC unit to operate in Dry mode, if it gets too low it could activate the central evaporative cooler for a few minutes to give the house a blast of moist air
-CO2 monitoring - the evaporative cooler could be used to provide an occasional blast of fresh air as required to keep CO2 levels in check

Apologies if this was long winded, but I’ve put it in black and white for my benefit also so I know what I’m working towards :grin:

Thank you for your effort on this project. Having a virtual thermostat available for openbhab2 will greatly benefit this community. I would like to implement this code in an automation system that I am building and would greatly appreciate any help with implementing this code into my setup.

I have an automation system setup with openHab2, rpi2, mqtt, rfm nodes. The system is currently barebone with just a few sensors hooked up. I have the code for the widget implemented as well as the rule file placed in my system. I am not sure where to place the en.json file, or what other configurations required for this to function. Any direction in the next steps to take would help greatly.

Thank you

Jason, any update on this project? This is exactly what I want to do as well, dampers on every room with individual touch screens in each room.