- Platform information:
- Hardware: Raspberry Pi3 Model B rev. 1.2 with 32Gb MicroSD
- OS: Linux 6.1.21-v7+
- Java Runtime Environment: which java platform is used and what version
- openHAB version: 4.0.4
Hello everyone!
First of all, I apologize if in this topic I raise questions that were previously asked by someone. I honestly tried to find similar situations, but unfortunately I didn’t find solutions suitable for me ((
Preface:
I am making a controller for controlling home heating and heating the boiler (and other consumers of thermal energy).
The source of thermal energy is vacuum solar collectors.
A backup source of thermal energy is also provided.
Structurally, this is implemented simply: the main data sources, temperature sensors DS18B20, are connected to the Raspberry Pi3 running OpenHab ver.4.0.4 via GPIO via a 1-Wire bus, the RPi output controls a group of relays that control power to circulation pumps and solenoid valves (control the movement/ supply of heat carrier in the system).
I successfully connected temperature sensors and relays to OpenHab: data from the sensors is displayed, relays are turned on and off through the switch functionality.
Temperature sensors in the OH are configured via OneWireGPIO Binding.
The relays in the OH are configured via GPIO Binding/Pigpio Remote.
Estimated logic of operation and functionality of the controller:
0. I want to heat the room and/or boiler to the desired temperature. The controller controls the system using automatic modes or manual functions to achieve these goals.
1.
5 temperature sensors are used:
- tSC (measure the temperature of the Solar Collector, use the data in algorithms)
- tWT (measure the temperature of the Water Tank, use the data in algorithms)
- tRoom (we measure the temperature in the Room, use the data in algorithms)
- tBL (measure the boiler temperature, use the data in algorithms)
- tOutdoor (we measure the temperature outside, we use the data as information)
Several relays are used to control power:
- several valves
- Pump 1 for circulation of heat carrier in the system
- Pump 2 for supplying heat carrier to a backup source of thermal energy
2.Control heating of the room and/or boiler through several (more than 10) Modes/Rules, which are functionally implemented in various options for the direction of movement of the heat carrier in the system.
Examples:
“Mode 1” (SC-WT-R-U) - with thermal energy from the solar collector (SC) we heat the Water Tank (WT, heat carrier), we heat the room heating radiators (R), we heat the heat exchanger to dissipate excess heat (Utilizer, U ).
Functionally, this is realized by turning on the power relay for the heat carrier circulation pump (Pump 1), as well as turning on several other relays that turn on the heat carrier supply valves on WT, R, U.
“Mode 2” (SC-R-BL) - with thermal energy from the solar collector (SC) we heat the room heating radiators (R), we heat the boiler (BL).
Functionally, this is realized by turning on the power relay for the heat carrier circulation pump (Pump 1), as well as turning on several other relays that turn on the heat carrier supply valves on R, BL.
3. Have the concepts of “Seasons” (Winter/Spring/Summer/Autumn), each of which has a set range (example
range for “Winter”: from 00:00:00 01.12.YYYY to 23:59:59 28.02.YYYY,
range for “Spring” from 00:00:00 01.03.YYYY to 23:59:59 31.05.YYYY,
range for “Summer” from 00:00:00 01.06.YYYY to 23:59:59 31.08.YYYY,
range for “Autumn” from 00:00:00 01.09.YYYY to 23:59:59 30.11.YYYY).
Depending on which season range corresponds to the current time and date, the controller works with those modes that are allowed for the current season.
Example:
for the “Summer” season, “Mode 1” (SC-WT-R-U) is allowed, “Mode 2” (SC-R-BL) is prohibited.
for the “Winter” season, “Mode 2” (WT-R-BL) is allowed, “Mode 1” (SC-WT-R-U) is prohibited.
4. Have the concepts of “Part of the day” (Morning, Day, Evening, Night), each of which has a set range (example
range for “Morning” from 05:00:00 to 06:59:59,
range for “Day” from 07:00:00 to 17:59:59,
range for “Evening” from 18:00:00 to 21:59:59,
range for “Night” from 22:00 to 04:59:59).
Depending on which time of day range corresponds to the current time and season, the controller operates with those modes that are allowed for the current time of day and season.
Example:
for “Night” “Mode 3” (WT-BL) is allowed, for “Morning”, “Day”, “Evening” is prohibited, allowed for all seasons,
for “Night” and “Day” “Mode 11” (SC-WT-R) is allowed, for “Morning”, “Evening” it is prohibited, for the seasons “Spring” and “Autumn” it is allowed, for the seasons “Winter” and “Summer” " is prohibited.
5. Have a state switch for “Home habitability” (“Inhabited”, “Uninhabited”) in the form of a Switch in the interface, which determines the list of modes allowed for operation.
Example:
for a switch in the “Uninhabited” state, only the mode is allowed “Mode 1” (SC-WT-R-U). This mode is the only one available for this condition.
for a switch in the “Inhabited” state, “Mode 1” (SC-WT-R-U) is allowed, but provided that tSC>tSC-max and/or tBL>tBL-max, and all other embedded modes are allowed (Mode 2 , Mode 3…and others).
6. Have a “Manual” or “Auto” state switch in the form of a Switch in the interface, which determines the control mode of the controller by the system.
Example:
For a switch in the “Manual” state, the user can forcefully enable any mode included in the controller program.
For a switch in the “Auto” state, the controller controls the inclusion of modes automatically, in accordance with the established algorithms/conditions.
7. Have a switch for the “Room heating” mode. For example, “Mode 7”. Its purpose is forced heating of heating radiators from an alternative source of thermal energy. This mode must be available for activation by the user when the controller is in the “Auto” state, regardless of the mode currently running.
In action, when this mode is turned on, the functionality of setting the countdown timer and its activation should be displayed with the launch of “Mode 7”, during which this mode will operate. After the timer expires, “Mode 7” is turned off and the Mode that preceded the activation of “Mode 7” is activated. Then the controller operates in automatic mode.
8. Have a switch for the “Boiler heating” mode. For example, “Mode 8”. Its purpose is forced heating of the boiler from an alternative source of thermal energy. This mode must be available for activation by the user when the controller is in the “Auto” state, regardless of the mode currently running.
In action, when this mode is turned on, the functionality of setting the countdown timer and its activation should be displayed with the launch of “Mode 8”, during which this mode will operate. After the timer expires, “Mode 8” is turned off and the Mode that preceded the activation of “Mode 8” is activated. Then the controller operates in automatic mode.
9. Have in the front-end interface the main functionality of controlling the controller and information display/icons:
- setting buttons (“-”,“numerical value”,“-”) room heating temperature (tRoom-set)
- button to turn on forced room heating with timer countdown indication
- button to turn on the forced heating of the boiler with a timer countdown indication
- indication of current time and date
- indication of actual room temperature (tRoom)
- indication of the actual boiler temperature (tBL)
- indication of the actual temperature outside (tOutdoor)
- information about the current Season
- information about the current Part of the day
- information about the current status of the house habitability switch (Inhabited or Uninhabited)
- information about the current status of the controller mode switch (Manual or Auto)
- information about the current Mode/Rule of operation of the controller
10. Have convenient settings functionality and indication of main parameters in the backend interface:
- setting the hysteresis value tSC/tSC-max
- setting the hysteresis value tWT/tWT-max
- setting the hysteresis value tBL/tBL-max
- setting the hysteresis value tRoom/tRoom-set
- setting the tSC-max value
- setting the tWT-max value
- setting the tBL-max value
- indication of the actual temperature of the solar collector (tSC)
- indication of actual Water Tank temperature (tWT)
- setting ranges for the concept “Seasons”
- setting ranges for the concept “Part of the day”
- state switch for “Home habitability” - “Inhabited” or “Uninhabited”
- controller mode switch “Manual” or “Auto”
Forgive me if I’m boring you with such a long preface)), but I tried to present my thoughts on the planned project as thoroughly and systematically as possible, and now on my many questions:
1. Based on the description above, tell me how to correctly build a hierarchy of actions in OH when implementing everything planned? Where to start, what follows what? Step by step, if you don’t mind.
2. How to create the concept of “Seasons”?
3. How to make the concept “Part of the day”?
4. How to make “Modes” (Rules)? At least with 1-2 examples.
5. How to make a “Home Habitability” state switch?
6. How to make a “Manual” or “Auto” state switch?
7. How to make a switch for Mode 7 “Room heating”? Using his example, I will understand how to make a similar switch for Mode 8 “Boiler heating”.
8. How to make a frontend interface?
9. How to make a backend interface?
I would appreciate any help!