I managed to optimize the OTGW code and free up some space. I then promptly used that space to implement some features that have been requested by users over the years.
OTGW firmware 5.0 has the following new features:
- Add support for a 2nd central heating circuit using the new C2, and H2 commands.
- New TS command to select if a connected temperature sensor is used for the outside temperature (O), or the return water temperature (R). The current setting can be verified with the PR=D command.
- Support additional commands, like SH, SW and VS, in standalone mode.
- Report additional values in a PS=1 report: 7 (Cooling control), 8 (Control setpoint 2), 19 (DHW flow rate), 23 (CH2 room setpoint), 31 (CH2 flow temperature), 33 (Boiler exhaust temperature), 70 (V/H master status), 71 (V/H control setpoint), 77 (Relative ventilation).
- Use a WriteData request when sending the following IDs as alternative messages: 1 (TSet), 8 (TSetCH2), 14 (MaxRelMod), and 71 (VSet).
- Repeat alternative messages that didn't receive a valid response.
Make sure to upgrade OTMonitor to version 5.0 before upgrading the firmware. Older versions of OTMonitor will not be able to preserve the settings stored in EEPROM.
I also created a test suite. This should have exercised most of the functionality. So I'm quite hopeful that there will not be any stupid bugs in the normal functioning of the OTGW. But because large portions of the code have changed, there is always a change that I missed something. Please let me know if you run into any issues.
For people building from source: My development environment has changed from MPLAB v8.53 to MPLAB X v3.65. This allowed me to do the development on linux. I expect it will also still work on windows with MPLAB X. Just don't use MPLAB X v5.40 or later. Starting with that version, MPASM is no longer included in the MPLAB X IDE and it is crucial to build the firmware.