Interface firmware
Introduction
The interface firmware turns the opentherm gateway into a serial to
opentherm interface. This can be useful for experimenting with the opentherm
protocol.
Operation
The firmware reports received opentherm messages to the serial interface in
the normal way. But it doesn't forward them on its own from the master to
the slave, or vice versa. It has to be told to transmit an opentherm message
by specifying the message as 8 hexadecimal characters on the serial
interface, followed by a carriage return. The firmware determines whether to
send the message to the termostat or the boiler depending on bit 6 of the
first byte. This bit is 0 in Master-to-Slave messages (the firmware sends
the message to the boiler) and 1 in Slave-to-Master messages (the firmware
sends the message to the thermostat).
Use
The quickest way to get started using this interface is to write a small
program that listens on the serial interface. On every BXXXXXXXX or
TXXXXXXXX message received, strip the B or T and send the remaining 8
hexadecimal digits back over the serial line. Once that part is working, you
can start adding code to manipulate the messages.
Serial commands
In addition to the hexadecimal messages, the firmware supports a limited and
slightly modified set of serial commands compared to the gateway firmware:
- LA=[function|state]
- LB=[function|state]
- LC=[function|state]
- LD=[function|state]
- LED A / LED B / LED C / LED D - These commands can be used to configure
the functions of the four LEDs that can optionally be connected to pins
RB3/RB4/RB6/RB7. When the function is set to "U" (the default), the
corresponding LED can be turned off and on by specifying a 0 (off) or 1 (on)
state.
The following functions are currently available:
- Receiving an Opentherm message from the thermostat or boiler
- Transmitting an Opentherm message to the thermostat or boiler
- Transmitting or receiving a message on the master interface
- Transmitting or receiving a message on the slave interface
- Transmission error has been detected
- Raised power mode active on thermostat interface.
- User controlled state
- GW=R
- Gateway reset - Reset the gateway.
- PR=item
- Print Report - The following items are currently defined:
- About opentherm interface (prints the welcome message)
- Tweaks. Reports the state of the ignore transitions setting.
- Report the reference voltage setting
- EP=state
- Enable smart-power - Configure how the gateway should handle smart-power
signals on the opentherm line toward the thermostat. The state argument
controls whether smart-power support is enabled (EP=1) or disabled (EP=0).
- SP=mode
- Request smart-power - send a smart power request or response onto the
opentherm line.
Possible modes are:
- Request the boiler to provide low power.
- Request the boiler to provide medium power
- Request the boiler to provide high power
- Invert the boiler line
- Invert the thermostat line
- IT=state
- Ignore Transitions - If the opentherm signal doesn't cleanly transition
from one level to the other, the circuitry may detect multiple transitions
when there should only be one. When this setting is off (IT=0), the gateway
will report "Error 01" for those cases. With this setting on (IT=1), any
rapid bouncing of the signal is ignored.
- VR=level
- Voltage Reference - Change the reference voltage used as a threshold for
the comparators. This configuration option is stored in non-volatile memory
so it will persist even if the gateway has been powered off.
The level must be specified as a single digit according to the following
table:
|
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
PIC16F88 |
0.625V |
0.833V |
1.042V |
1.250V |
1.458V |
1.667V |
1.875V |
2.083V |
2.292V |
2.500V |
PIC16F1847 |
0.832V |
0.960V |
1.088V |
1.216V |
1.344V |
1.472V |
1.600V |
1.728V |
1.856V |
1.984V |
The normal value is 4 on a PIC16F88 and 5 on a PIC16F1847.
- DP=address
- Debug Pointer - Set the debug pointer to a file register. The contents
of the selected file register is reported in response to the command. The
address must be specified in hexadecimal, using 2 characters on a PIC16F88,
2 or 3 characters on a PIC16F1847.
|