Disclaimer: Build and use this at your own risk!
OpenTherm is a protocol that major central heating manufacturers use to control and monitor their products with.
There are several open-source hardware projects related to build an gateway interface so you can send and receive commands on this bus.
DomotiGa supports OpenTherm using the Home-built Gateway, or "OpenTherm GateWay" (OTGW).
Gateway configuration¶You can access the gateway configuration using Interfaces -> OpenTherm
- Connection to the gateway can be done using a serial interface or through the network.
- For serial select the serial InterfaceType and set the Serial Port
- For network select the tcp InterfaceType and set the TCP Host and Port
- Poll Interval
- Temp. override
- Sync clock
- If Relay Enabled is selected, the values read by Domotiga can be accessed by other devices on the port configured under Relay Port
Checking OTGW functionality.¶
Once succesfully configured the auto-create functionality will create some devices for you.
One of them is the Opentherm Thermostat.
The next thing that should be done is modifying the settings of this device as shown in the screenshots below.
Look at the checkbox 'device can be dimmed' if you don't mark this checkbox chances will be you won't be able to Set a temperature yourself!
After completing these steps you will be able to use an event to set.device value1 of the thermostat.
Notice the Override now became active.
Aditionally your room thermostat will show a little logo indicating Opentherm Communication.
DomotiGa device info¶
The following devices are used together with the gateway:
The OpenTherm interface now supports 5 devices:
value1 = Room Temperature set point (°C) = OpenTherm MsgID=16
value2 = Room Temperature sensor (°C) = OpenTherm MsgID=24
value3 = Status setpoint override
value4 = Status Opentherm master
"Idle" = OpenTherm MsgID=0, Lowerbyte: 0000 0000
"Heating up room" = OpenTherm MsgID=0, Lowerbyte: 0000 0010
"Heating up boiler" = OpenTherm MsgID=0, Lowerbyte: 0000 0100
"Cooling down room" = OpenTherm MsgID=0, Lowerbyte: 0001 0000
"Error" = OpenTherm MsgID=0, Lowerbyte: 0000 0001
The setpoint of the thermostat can be changed (overwritten) by seting value1
value1 = CH set point (°C) = OpenTherm MsgID=57
value2 = CH temperature (°C) = OpenTherm MsgID=1
value3 = Modulation level (%) = OpenTherm MsgID=17
value4 = Water pressure (Bar) = OpenTherm MsgID=18
value1 = Boiler set point (°C) = OpenTherm MsgID=56
value2 = Boiler water temperature (°C) = OpenTherm MsgID=25
value1 = Flame status (On/Off) = OpenTherm MsgID=0, Lowerbyte: 0000 1000
value2 = Burner starts (counter) = OpenTherm MsgID=116
value3 = CH Burner operation (hours) = OpenTherm MsgID=120
value4 = DHW Burner operation (hours) = OpenTherm MsgID=123
value1 = Outside Temperature Sensor (°C) = OpenTherm MsgID=27
If no outside sensor is connected (received temperature = 0.00) the outside temperature can be send to the thermostat by setting the first value of the device. This can be done by setting up a regularly triggered event with as action to set the temperature as returned by WeatherUnderground:
Alternative, use a scripted action in this event like:
replace the X with the of the OpenTherm outside temperature device, and replace the Y with the of the temperature sensor.
NOTE: although verifying all the checksums show my PIC is programmed ok, it doesn't seem to run yet...
I get only garbage in startup... still investigating...
Some info about programming the PIC with a cheap PIC programmer under Linux.
I have a Olimex PIC-PG2 programmer, like this one. PIC-PG2
You must have a computer with build-in serial port so it can supply the programming voltage.
Laptop serial ports or USB to serial converters don't work.
I used Ubuntu 12.10 64 Bits installation, follow this steps to program it.
$ cd ~/install $ wget http://picpgm.picprojects.net/download/picpgm_v2780.tar.gz $ tar xzvf picpgm_v2780.tar.gz $ sudo ./install.sh
If you are running a 64 Linux distro install ia32 libs:
$ sudo apt-get install ia32-libs
Download gateway.hex from here gateway.hex
Insert PIC in 18pins section of programmer.
Program PIC when on first serial port:
$ sudo picpgm -port /dev/ttyS0 -pic 16F88 -p ./gateway.hex PIC Development Programmer Version 220.127.116.11 http://picpgm.picprojects.net Copyright 2002-2012 Christian Stadler (firstname.lastname@example.org) (built on Dec 9 2012 at 10:45:35) ================================================================== Autodetecting Programmer ... Programmer: JDM Programmer at /dev/ttyS0 PIC name: PIC16F88 Device ID: 0x0768 Flash: 8 kByte EEPROM: 256 Byte Erasing whole device ... done! Programming Code Memory 0x00002000 Verifing Code Memory 0x00002000 => Code memory OK! Programming Data Memory 0x00000100 Verifing Data Memory 0x00000100 => Data memory OK! Programming Config Memory 0x00000012 Verifing Config Memory 0x00000012 => Config memory OK! time 7.0 seconds!
- About Protocol
- Home-built Gateway
- OpenTherm related forum
- Domoticaforum OpenTherm Forum
- Domoticaforum OpenTherm Topic
Added by sj3fk3 almost 6 years ago
This is sooo cool!! Now I only need to get my (two left) hands on a gateway